aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/metatileentity
diff options
context:
space:
mode:
authorD-Cysteine <54219287+D-Cysteine@users.noreply.github.com>2021-12-08 16:49:20 -0700
committerGitHub <noreply@github.com>2021-12-09 00:49:20 +0100
commit695012134efafe33c839a26b4b00e14718ed74fa (patch)
treecf6dce3626c7ab1ae383c1651f24405b96c39652 /src/main/java/gregtech/api/metatileentity
parent0b70f6cd6ff8b224600fc8e47816912aa8fce223 (diff)
downloadGT5-Unofficial-695012134efafe33c839a26b4b00e14718ed74fa.tar.gz
GT5-Unofficial-695012134efafe33c839a26b4b00e14718ed74fa.tar.bz2
GT5-Unofficial-695012134efafe33c839a26b4b00e14718ed74fa.zip
Add threshold support to item and fluid covers (#785)
* Add threshold support to item and fluid covers * Switch to storing in NBT * Add handling for migration path * Adjust item threshold max value
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity')
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index bff79743be..fc5fa64d91 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
@@ -176,9 +176,10 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
GT_CoverBehaviorBase<?> tBehavior = getCoverBehaviorAtSideNew(i);
if (tBehavior == null)
continue;
- mCoverData[i] = tBehavior.createDataObject();
if (aNBT.hasKey(COVER_DATA_NBT_KEYS[i]))
- mCoverData[i].loadDataFromNBT(aNBT.getTag(COVER_DATA_NBT_KEYS[i]));
+ mCoverData[i] = tBehavior.createDataObject(aNBT.getTag(COVER_DATA_NBT_KEYS[i]));
+ else
+ mCoverData[i] = tBehavior.createDataObject();
}
}
if (mSidedRedstone.length != 6) mSidedRedstone = new byte[]{0, 0, 0, 0, 0, 0};