From edb76b2778716608088ddd4300044befdf6abd09 Mon Sep 17 00:00:00 2001 From: Ghzdude <44148655+ghzdude@users.noreply.github.com> Date: Sun, 11 Aug 2024 14:39:25 -0700 Subject: [PATCH] fix another issue (#74) --- .../MetaTileEntityLargeDistillery.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/gregicality/multiblocks/common/metatileentities/multiblock/standard/MetaTileEntityLargeDistillery.java b/src/main/java/gregicality/multiblocks/common/metatileentities/multiblock/standard/MetaTileEntityLargeDistillery.java index 27a7265..9dd59dc 100644 --- a/src/main/java/gregicality/multiblocks/common/metatileentities/multiblock/standard/MetaTileEntityLargeDistillery.java +++ b/src/main/java/gregicality/multiblocks/common/metatileentities/multiblock/standard/MetaTileEntityLargeDistillery.java @@ -52,22 +52,17 @@ */ public class MetaTileEntityLargeDistillery extends GCYMRecipeMapMultiblockController implements IDistillationTower { - protected DistillationTowerLogicHandler handler = null; + protected final DistillationTowerLogicHandler handler; public MetaTileEntityLargeDistillery(ResourceLocation metaTileEntityId) { - this(metaTileEntityId, false); - } - - public MetaTileEntityLargeDistillery(ResourceLocation metaTileEntityId, boolean useAdvHatchLogic) { super(metaTileEntityId, new RecipeMap[] { RecipeMaps.DISTILLATION_RECIPES, RecipeMaps.DISTILLERY_RECIPES }); this.recipeMapWorkable = new LargeDistilleryRecipeLogic(this); - if (useAdvHatchLogic) - this.handler = new DistillationTowerLogicHandler(this); + this.handler = new DistillationTowerLogicHandler(this); } @Override public MetaTileEntity createMetaTileEntity(IGregTechTileEntity metaTileEntityHolder) { - return new MetaTileEntityLargeDistillery(this.metaTileEntityId, usesAdvHatchLogic()); + return new MetaTileEntityLargeDistillery(this.metaTileEntityId); } /** @@ -118,7 +113,7 @@ protected void formStructure(PatternMatchContext context) { } protected boolean usesAdvHatchLogic() { - return getCurrentRecipeMap() == RecipeMaps.DISTILLATION_RECIPES && this.handler != null; + return getCurrentRecipeMap() == RecipeMaps.DISTILLATION_RECIPES; } @Override @@ -265,7 +260,10 @@ protected boolean setupAndConsumeRecipeInputs(@NotNull Recipe recipe, @Override protected IMultipleTankHandler getOutputTank() { - return handler.getFluidTanks(); + if (usesAdvHatchLogic()) + return handler.getFluidTanks(); + + return super.getOutputTank(); } } }