From 6a7cf80e41aa14f707d9441c72a3ff2e27751ece Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 12:47:01 -0500 Subject: [PATCH 1/5] Added Thirst Was Taken to test environment This allows easier testing for TWT compatibility and some common uses for fluid NBT (TWT uses it for water purity levels) --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index a2db9252..014906cc 100644 --- a/build.gradle +++ b/build.gradle @@ -145,6 +145,7 @@ dependencies { //modImplementation("curse.maven:inventorysorter-240633:4655091") modImplementation("curse.maven:cyclic-239286:4994392") modImplementation("curse.maven:flib-661261:4724762") + modImplementation("curse.maven:thirst-was-taken-679270:6660408") // DEV ONLY compileOnly('org.jetbrains:annotations:23.0.0') From 906cf0f658a51f12207e00ea89ab0e1a4421e803 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 12:47:40 -0500 Subject: [PATCH 2/5] Added map color to dust blocks This fixes map viewing for modpacks that use dust in the worldgen --- src/main/java/thedarkcolour/exdeorum/registry/EBlocks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/thedarkcolour/exdeorum/registry/EBlocks.java b/src/main/java/thedarkcolour/exdeorum/registry/EBlocks.java index b40dea57..587a5bd8 100644 --- a/src/main/java/thedarkcolour/exdeorum/registry/EBlocks.java +++ b/src/main/java/thedarkcolour/exdeorum/registry/EBlocks.java @@ -41,7 +41,7 @@ public class EBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ExDeorum.ID); // Materials - public static final RegistryObject DUST = BLOCKS.register("dust", () -> new FallingBlock(of().sound(SoundType.SAND).strength(0.4f))); + public static final RegistryObject DUST = BLOCKS.register("dust", () -> new FallingBlock(of().mapColor(MapColor.SAND).sound(SoundType.SAND).strength(0.4f))); public static final RegistryObject CRUSHED_NETHERRACK = BLOCKS.register("crushed_netherrack", () -> new FallingBlock(of().mapColor(MapColor.NETHER).sound(SoundType.SAND).strength(0.6f))); public static final RegistryObject CRUSHED_END_STONE = BLOCKS.register("crushed_end_stone", () -> new FallingBlock(of().mapColor(MapColor.SAND).sound(SoundType.SAND).strength(0.6f))); public static final RegistryObject CRUSHED_DEEPSLATE = BLOCKS.register("crushed_deepslate", () -> new FallingBlock(of().mapColor(DyeColor.GRAY).sound(SoundType.SAND).strength(0.8f))); From 3d14eeaf892cd2b2a26e4a6df28ecb36c10c60b8 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 13:57:31 -0500 Subject: [PATCH 3/5] Fixed barrel bottle extraction not draining liquid Fixed an issue where taking filling a water bottle from a barrel would fill the bottle but not drain the barrel. This is due to mismatched NBT values when extracting. This change moves the drain operation before the NBT operations and only modifies the item NBT if fluid NBT is present. --- .../exdeorum/blockentity/BarrelBlockEntity.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java index 8c7c45b4..feb42eb8 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java @@ -335,13 +335,15 @@ public class BarrelBlockEntity extends ETankBlockEntity { if (!player.getAbilities().instabuild) { playerItem.shrink(1); } + tank.drain(fluid, IFluidHandler.FluidAction.EXECUTE); var bottle = PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.WATER); - var nbt = bottle.getOrCreateTag(); - nbt.merge(fluid.getOrCreateTag()); + if (fluid.hasTag()) { + var nbt = bottle.getOrCreateTag(); + nbt.merge(fluid.getTag()); + } if (!player.addItem(bottle)) { player.drop(bottle, false); } - tank.drain(fluid, IFluidHandler.FluidAction.EXECUTE); level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BOTTLE_EMPTY, SoundSource.NEUTRAL, 1.0F, 1.0F); } From 8ce323d70c8e2b75a5da4480de369bf5e29bfc88 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 13:59:23 -0500 Subject: [PATCH 4/5] 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) { From a8805c7299611f8f6c97bf76d929566abd32f062 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Thu, 8 Jan 2026 12:50:26 -0500 Subject: [PATCH 5/5] NBT transfer when filling barrel with water bucket Filling a barrel with a water bucket now happens outside the normal tank mechanics if that water bottle has NBT. This allows NBT data to be preserved from the bucket when depositing or extracting water with NBT. This fixes some issues with Thirst Was Taken's water purity system. --- .../blockentity/BarrelBlockEntity.java | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java index 07efec79..65ca7b1d 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/BarrelBlockEntity.java @@ -226,6 +226,54 @@ public class BarrelBlockEntity extends ETankBlockEntity { var wasBurning = isBurning(); this.isBeingFilledByPlayer = true; + var playerItem = player.getItemInHand(hand); + + // Insert water bucket with NBT + if (playerItem.getItem() == Items.WATER_BUCKET && playerItem.hasTag()) { + var fluid = new FluidStack(Fluids.WATER, 1000, playerItem.getTag().copy()); + if (this.tank.fill(fluid, IFluidHandler.FluidAction.SIMULATE) == 1000) { + this.tank.fill(fluid, IFluidHandler.FluidAction.EXECUTE); + if (!player.getAbilities().instabuild) { + playerItem.shrink(1); + if (!player.addItem(new ItemStack(Items.BUCKET))) { + player.drop(new ItemStack(Items.BUCKET), false); + } + } + level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BUCKET_EMPTY, SoundSource.NEUTRAL, 1.0F, 1.0F); + this.isBeingFilledByPlayer = false; + tryInWorldFluidMixing(); + markUpdated(); + + if (wasBurning && !isHotFluid(this.tank.getFluid().getFluid().getFluidType())) { + this.progress = 0.0f; + } + + return InteractionResult.sidedSuccess(level.isClientSide); + } + } + + // Extract liquid with NBT + if (playerItem.getItem() == Items.BUCKET) { + var currentFluid = this.tank.getFluid(); + if (currentFluid.getFluid() == Fluids.WATER && currentFluid.hasTag() && currentFluid.getAmount() >= 1000) { + if (this.tank.drain(1000, IFluidHandler.FluidAction.SIMULATE).getAmount() == 1000) { + this.tank.drain(1000, IFluidHandler.FluidAction.EXECUTE); + var filledBucket = new ItemStack(Items.WATER_BUCKET); + filledBucket.setTag(currentFluid.getTag().copy()); + if (!player.getAbilities().instabuild) { + playerItem.shrink(1); + if (!player.addItem(filledBucket)) { + player.drop(filledBucket, false); + } + } + level.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.BUCKET_FILL, SoundSource.NEUTRAL, 1.0F, 1.0F); + this.isBeingFilledByPlayer = false; + tryInWorldFluidMixing(); + markUpdated(); + return InteractionResult.sidedSuccess(level.isClientSide); + } + } + } if (FluidUtil.interactWithFluidHandler(player, hand, this.tank)) { this.isBeingFilledByPlayer = false; @@ -241,7 +289,6 @@ public class BarrelBlockEntity extends ETankBlockEntity { } else { this.isBeingFilledByPlayer = false; // try one more time to transfer fluids between item and barrel - var playerItem = player.getItemInHand(hand); if (EConfig.SERVER.allowWaterBottleTransfer.get()) { var fluid = new FluidStack(Fluids.WATER, 250);