Skip to content

Commit b32acc2

Browse files
authored
Fix crates voiding the inventories of their stack after being placed down (#4012)
1 parent eb51e5a commit b32acc2

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

src/main/java/com/gregtechceu/gtceu/common/machine/storage/CrateMachine.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,11 @@ public void onMachinePlaced(@Nullable LivingEntity player, ItemStack stack) {
119119
IMachineLife.super.onMachinePlaced(player, stack);
120120
CompoundTag tag = stack.getTag();
121121
if (tag != null) {
122-
this.isTaped = tag.contains("taped") && tag.getBoolean("taped");
123-
if (isTaped) {
122+
if (tag.contains("taped") && tag.getBoolean("taped")) {
124123
this.inventory.storage.deserializeNBT(tag.getCompound("inventory"));
125124
}
126-
127-
tag.remove("taped");
128-
this.isTaped = false;
129125
setRenderState(getRenderState().setValue(GTMachineModelProperties.IS_TAPED, isTaped));
130126
}
131-
stack.setTag(null);
132127
}
133128

134129
@Override

0 commit comments

Comments
 (0)