From 8ce323d70c8e2b75a5da4480de369bf5e29bfc88 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 13:59:23 -0500 Subject: [PATCH] Avoid copying empty NBT when draining bottles When filling a barrel from a bottle, ensured that empty NBT tags (ex: "{}") are replaced with null values and not transferred to the fluid unnecessarily. This ensures that water bottles placed in a barrel properly merge with the current contents of the barrel instead of not matching because {} != null. --- .../thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java index feb42eb8..07efec79 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java @@ -249,6 +249,7 @@ public class BarrelBlockEntity extends ETankBlockEntity { // Transfer any extra NBT tags from other mods to the fluid var nbt = playerItem.getTag().copy(); nbt.remove("Potion"); + if (nbt.isEmpty()) nbt = null; fluid = new FluidStack(Fluids.WATER, 250, nbt); if (this.tank.fill(fluid, IFluidHandler.FluidAction.SIMULATE) > 0) {