mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fix for #4233, in which thermal evaporation tower was attempting to render with contents above its max capacity, causing out-of-bounds error that crashed client.
This commit is contained in:
1 parent
536dab7239
commit
49d7306fca
1 file changed
+4
-1
+4
-1
@@ -46,7 +46,10 @@ public class RenderThermalEvaporationController extends TileEntitySpecialRendere
|
||||
MekanismRenderer.glowOn(tileEntity.inputTank.getFluid().getFluid().getLuminosity());
|
||||
|
||||
DisplayInteger[] displayList = getListAndRender(data, tileEntity.inputTank.getFluid().getFluid());
|
||||
displayList[(int)(((float)tileEntity.inputTank.getFluidAmount()/tileEntity.inputTank.getCapacity())*((float)getStages(data.height)-1))].render();
|
||||
|
||||
float tankFillPercentage = Math.min(((float)tileEntity.inputTank.getFluidAmount()/tileEntity.inputTank.getCapacity()), 1);
|
||||
|
||||
displayList[(int)(tankFillPercentage * ((float)getStages(data.height)-1))].render();
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
|
||||
|
||||
Reference in new issue
Block a user