mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-27 15:33:03 +00:00
Improved fluid height calculation expression...
...to properly respect maxHeight
This commit is contained in:
1 parent
1fadcfbf59
commit
1115fe8c7d
1 file changed
+7
-2
@@ -185,7 +185,9 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
}
|
||||
}
|
||||
|
||||
float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
|
||||
float percent = (float)logic.getLiquidAmount() / (float)logic.getCapacity();
|
||||
float height = percent * (maxHeight - minHeight);
|
||||
//float height = logic.getLiquidAmount() / (logic.getCapacity() * 1.03F) / 16F;
|
||||
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
|
||||
|
||||
Fluid fluid = logic.liquid.getFluid();
|
||||
@@ -402,7 +404,10 @@ public class SearedRender implements ISimpleBlockRenderingHandler
|
||||
maxZ = rec.fluidRenderProperties.maxZ;
|
||||
}
|
||||
}
|
||||
float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
|
||||
float percent = (float)logic.getLiquidAmount() / (float)logic.getCapacity();
|
||||
float height = percent * (maxHeight - minHeight);
|
||||
|
||||
//float height = (logic.getLiquidAmount() / (logic.getCapacity() * 1.05F) * 0.6875F) / maxHeight;
|
||||
renderer.setRenderBounds(minX, minHeight, minZ, maxX, minHeight + height, maxZ);
|
||||
|
||||
Fluid fluid = logic.liquid.getFluid();
|
||||
|
||||
Reference in new issue
Block a user