Skip to content

Commit

Permalink
fix TEPs getting stuck paused when full tank is drained when temp low…
Browse files Browse the repository at this point in the history
…er than min production (caused by f5d7a1e)
  • Loading branch information
thiakil committed Aug 22, 2024
1 parent 2f5f835 commit 30c1b84
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ public EvaporationMultiblockData(TileEntityThermalEvaporationBlock tile) {
//Default biome temp to the ambient temperature at the block we are at
biomeAmbientTemp = HeatAPI.getAmbientTemp(tile.getLevel(), tile.getBlockPos());
fluidTanks.add(inputTank = VariableCapacityFluidTank.input(this, this::getMaxFluid, this::containsRecipe, createSaveAndComparator(recipeCacheLookupMonitor)));
fluidTanks.add(outputTank = VariableCapacityFluidTank.output(this, MekanismConfig.general.evaporationOutputTankCapacity, BasicFluidTank.alwaysTrue, () -> {
onContentsChanged();
recipeCacheLookupMonitor.unpause();
}));
fluidTanks.add(outputTank = VariableCapacityFluidTank.output(this, MekanismConfig.general.evaporationOutputTankCapacity, BasicFluidTank.alwaysTrue, this));
inputHandler = InputHelper.getInputHandler(inputTank, RecipeError.NOT_ENOUGH_INPUT);
outputHandler = OutputHelper.getOutputHandler(outputTank, RecipeError.NOT_ENOUGH_OUTPUT_SPACE);
inventorySlots.add(inputInputSlot = FluidInventorySlot.fill(inputTank, this, 28, 20));
Expand All @@ -140,6 +137,14 @@ public void onCreated(Level world) {
updateSolars(world);
}

@Override
public void onContentsChanged() {
super.onContentsChanged();
if (getTemperature() > HeatAPI.AMBIENT_TEMP) {
recipeCacheLookupMonitor.unpause();
}
}

@Override
public boolean tick(Level world) {
boolean needsPacket = super.tick(world);
Expand Down

0 comments on commit 30c1b84

Please sign in to comment.