diff options
author | Jakub <53441451+kuba6000@users.noreply.github.com> | 2022-03-02 19:06:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 19:06:30 +0100 |
commit | 058ef46cb368f3a311a39b2a67110b080d373221 (patch) | |
tree | bc27455795d3a92a6cbf9571ad7349cc11cd152d /src/main/java | |
parent | 8e885785653e90f429c360f5648ae16ec3a3a621 (diff) | |
download | GT5-Unofficial-058ef46cb368f3a311a39b2a67110b080d373221.tar.gz GT5-Unofficial-058ef46cb368f3a311a39b2a67110b080d373221.tar.bz2 GT5-Unofficial-058ef46cb368f3a311a39b2a67110b080d373221.zip |
Add Circuit from controller inventory slot to stored inputs (#960)
* Add controller inventory slot to stored inputs
* Prevent adding circuit twice
Diffstat (limited to 'src/main/java')
3 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 9c5c933f91..e84e05fbd8 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -249,7 +249,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public void onStructureChange() { mStructureChanged = true; } - + @Override public void onMachineBlockUpdate() { mUpdated = true; @@ -269,11 +269,11 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mMufflerHatches.clear(); mMaintenanceHatches.clear(); } - + public boolean checkStructure(boolean aForceReset) { return checkStructure(aForceReset, getBaseMetaTileEntity()); } - + public boolean checkStructure(boolean aForceReset, IGregTechTileEntity aBaseMetaTileEntity) { if(!aBaseMetaTileEntity.isServerSide()) return mMachine; // Only trigger an update if forced (from onPostTick, generally), or if the structure has changed @@ -739,7 +739,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } return false; } - + public boolean addOutput(FluidStack aLiquid) { if (aLiquid == null) return false; FluidStack copiedFluidStack = aLiquid.copy(); @@ -864,6 +864,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } } + if(getStackInSlot(1) != null && getStackInSlot(1).getUnlocalizedName().startsWith("gt.integrated_circuit")) + rList.add(getStackInSlot(1)); return rList; } @@ -1117,14 +1119,14 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { currenttip.add(String.format("Progress: %d s / %d s", tag.getInteger("progress"), tag.getInteger("maxProgress"))); - + super.getWailaBody(itemStack, currenttip, accessor, config); } @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); - + tag.setBoolean("hasProblems", (getIdealStatus() - getRepairStatus()) > 0); tag.setFloat("efficiency", mEfficiency / 100.0F); tag.setInteger("progress", mProgresstime/20); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java index a8fbb74cc9..862f5186b3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DistillationTower.java @@ -168,7 +168,6 @@ public class GT_MetaTileEntity_DistillationTower extends GT_MetaTileEntity_Enhan } } } - tInputList.add(mInventory[1]); ItemStack[] inputs = tInputList.toArray(new ItemStack[0]); ArrayList<FluidStack> tFluidList = getStoredFluids(); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java index 97695ac2b8..6634124248 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java @@ -157,7 +157,6 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_En } } } - tInputList.add(mInventory[1]); ItemStack[] inputs = tInputList.toArray(new ItemStack[0]); ArrayList<FluidStack> tFluidList = getStoredFluids(); |