|
52 | 52 | */ |
53 | 53 | public class MetaTileEntityLargeDistillery extends GCYMRecipeMapMultiblockController implements IDistillationTower { |
54 | 54 |
|
55 | | - protected DistillationTowerLogicHandler handler = null; |
| 55 | + protected final DistillationTowerLogicHandler handler; |
56 | 56 |
|
57 | 57 | public MetaTileEntityLargeDistillery(ResourceLocation metaTileEntityId) { |
58 | | - this(metaTileEntityId, false); |
59 | | - } |
60 | | - |
61 | | - public MetaTileEntityLargeDistillery(ResourceLocation metaTileEntityId, boolean useAdvHatchLogic) { |
62 | 58 | super(metaTileEntityId, new RecipeMap[] { RecipeMaps.DISTILLATION_RECIPES, RecipeMaps.DISTILLERY_RECIPES }); |
63 | 59 | this.recipeMapWorkable = new LargeDistilleryRecipeLogic(this); |
64 | | - if (useAdvHatchLogic) |
65 | | - this.handler = new DistillationTowerLogicHandler(this); |
| 60 | + this.handler = new DistillationTowerLogicHandler(this); |
66 | 61 | } |
67 | 62 |
|
68 | 63 | @Override |
69 | 64 | public MetaTileEntity createMetaTileEntity(IGregTechTileEntity metaTileEntityHolder) { |
70 | | - return new MetaTileEntityLargeDistillery(this.metaTileEntityId, usesAdvHatchLogic()); |
| 65 | + return new MetaTileEntityLargeDistillery(this.metaTileEntityId); |
71 | 66 | } |
72 | 67 |
|
73 | 68 | /** |
@@ -118,7 +113,7 @@ protected void formStructure(PatternMatchContext context) { |
118 | 113 | } |
119 | 114 |
|
120 | 115 | protected boolean usesAdvHatchLogic() { |
121 | | - return getCurrentRecipeMap() == RecipeMaps.DISTILLATION_RECIPES && this.handler != null; |
| 116 | + return getCurrentRecipeMap() == RecipeMaps.DISTILLATION_RECIPES; |
122 | 117 | } |
123 | 118 |
|
124 | 119 | @Override |
@@ -265,7 +260,10 @@ protected boolean setupAndConsumeRecipeInputs(@NotNull Recipe recipe, |
265 | 260 |
|
266 | 261 | @Override |
267 | 262 | protected IMultipleTankHandler getOutputTank() { |
268 | | - return handler.getFluidTanks(); |
| 263 | + if (usesAdvHatchLogic()) |
| 264 | + return handler.getFluidTanks(); |
| 265 | + |
| 266 | + return super.getOutputTank(); |
269 | 267 | } |
270 | 268 | } |
271 | 269 | } |
0 commit comments