From 42946c9ac1fdb250d8648a1128285a2409e4265c Mon Sep 17 00:00:00 2001 From: HoleFish <48403212+HoleFish@users.noreply.github.com> Date: Tue, 22 Oct 2024 03:07:05 +0800 Subject: Make some machine drops stackable with new ones (#3392) Co-authored-by: Martin Robertz --- .../java/gregtech/common/tileentities/machines/MTEHatchOutputME.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java') diff --git a/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java b/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java index 7ebe9929c3..40980c5f14 100644 --- a/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java +++ b/src/main/java/gregtech/common/tileentities/machines/MTEHatchOutputME.java @@ -58,7 +58,8 @@ import gregtech.api.util.GTUtility; public class MTEHatchOutputME extends MTEHatchOutput implements IPowerChannelState { - private long baseCapacity = 128_000; + private static final long DEFAULT_CAPACITY = 128_000; + private long baseCapacity = DEFAULT_CAPACITY; private BaseActionSource requestSource = null; private @Nullable AENetworkProxy gridProxy = null; @@ -302,7 +303,7 @@ public class MTEHatchOutputME extends MTEHatchOutput implements IPowerChannelSta @Override public void setItemNBT(NBTTagCompound aNBT) { super.setItemNBT(aNBT); - aNBT.setLong("baseCapacity", baseCapacity); + if (baseCapacity != DEFAULT_CAPACITY) aNBT.setLong("baseCapacity", baseCapacity); } @Override -- cgit