Skip to content

Commit

Permalink
Merge pull request #122 from Thorfusion/117-bug-rendering-crash-with-…
Browse files Browse the repository at this point in the history
…mariculture-infinity-water-bucket-placed-in-evaporation-controller

#117 bug rendering crash with mariculture infinity water bucket placed in evaporation controller
  • Loading branch information
DrParadox7 authored May 26, 2023
2 parents a402fbf + 0494164 commit 02d4be8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public void renderAModelAt(TileEntityThermalEvaporationController tileEntity, do
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();
displayList[(int) (((float) tileEntity.inputTank.getFluidAmount() / tileEntity.inputTank.getCapacity()) * ((float) getStages(data.height) - 1))].render();


MekanismRenderer.glowOff();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void onUpdate()
{
ChargeUtils.discharge(2, this);

if(inventory[0] != null)
if(inventory[0] != null && fluidTank.getFluidAmount() <= (fluidTank.getCapacity() - 1000))
{
if(inventory[0].getItem() instanceof IFluidContainerItem)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ public void onUpdate()
{
updateTemperature();
}

manageBuckets();
if (inputTank.getFluidAmount() <= (inputTank.getCapacity() - 1001)) {
manageBuckets();
}

ThermalEvaporationRecipe recipe = getRecipe();

Expand Down

0 comments on commit 02d4be8

Please sign in to comment.