diff options
author | Martin Robertz <dream-master@gmx.net> | 2021-12-02 17:13:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 17:13:44 +0100 |
commit | 10c8a2a18418d90fb50e52cc2778399fb87cfeab (patch) | |
tree | 8fda4bdf8000691233a85cd15949db50eae55a4d | |
parent | b61cfa20974ae772e35fb9d9766ca5328de8417c (diff) | |
parent | 8744c2c9664d157bb80895ca6d2956931401f1e2 (diff) | |
download | GT5-Unofficial-10c8a2a18418d90fb50e52cc2778399fb87cfeab.tar.gz GT5-Unofficial-10c8a2a18418d90fb50e52cc2778399fb87cfeab.tar.bz2 GT5-Unofficial-10c8a2a18418d90fb50e52cc2778399fb87cfeab.zip |
Merge pull request #46 from bombcar/catalyst-fix
fix chemplant not consuming catalyst
2 files changed, 8 insertions, 4 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java index d1ce55d3f2..56dff1b1e3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_NbtConsumable.java @@ -41,7 +41,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE } public GT_MetaTileEntity_Hatch_NbtConsumable(String aName, int aTier, int aInputSlots, String[] aDescription, boolean aAllowDuplicateTypes, ITexture[][][] aTextures) { - super(aName, aTier, aInputSlots*2, aDescription[0], aTextures); + super(aName, aTier, aInputSlots*2, aDescription, aTextures); mInputslotCount = getInputSlotCount(); mTotalSlotCount = getInputSlotCount()*2; mAllowDuplicateUsageTypes = aAllowDuplicateTypes; @@ -127,7 +127,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE if (i <= getSlotID_LastInput()) { fillStacksIntoFirstSlots(); } - } + } } // Only moves items in the first four slots @@ -141,7 +141,7 @@ public abstract class GT_MetaTileEntity_Hatch_NbtConsumable extends GT_MetaTileE } } - private final void tryFillUsageSlots() { + public final void tryFillUsageSlots() { int aSlotSpace = (mInputslotCount - getContentUsageSlots().size()); if (aSlotSpace > 0) { Logger.INFO("We have empty usage slots. "+aSlotSpace); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java index bcf76964d2..5edff05e48 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java @@ -762,6 +762,10 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { this.mOutputItems = tOutputItems; this.mOutputFluids = tOutputFluids; updateSlots(); + for (GT_MetaTileEntity_Hatch_Catalysts h : mCatalystBuses) { + h.updateSlots(); + h.tryFillUsageSlots(); + } // Play sounds (GT++ addition - GT multiblocks play no sounds) startProcess(); @@ -956,7 +960,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { if (damage >= getMaxCatalystDurability()) { log("consume catalyst"); addOutput(CI.getEmptyCatalyst(1)); - aStack = null; + aStack.stackSize -= 1; } else { log("damaging catalyst"); |