Skip to content

Commit 5a5c9fa

Browse files
committed
oops there's another one
1 parent 8e08b84 commit 5a5c9fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/gregtech/api/capability/impl/GTSimpleFluidHandlerItemStack.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ public FluidStack drain(int maxDrain, boolean doDrain) {
8484

8585
private void removeTagWhenEmpty(boolean doDrain) {
8686
if (doDrain && this.getFluid() == null) {
87-
this.container.setTagCompound(null);
87+
var tagCompound = container.getTagCompound();
88+
if (tagCompound != null) tagCompound.removeTag(FLUID_NBT_KEY);
8889
}
8990
}
9091

0 commit comments

Comments
 (0)