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:
Jason Spradlin committed 2017-02-25 09:08:57 -06:00
1 parent 536dab7239
commit 49d7306fca
1 file changed
+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();