From 884ee10788eb17242b758028e23c8be4fc41e7c2 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:57:45 -0800 Subject: [PATCH] Fixed broken fluid handlers --- .../exdeorum/blockentity/helper/FluidHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/thedarkcolour/exdeorum/blockentity/helper/FluidHelper.java b/src/main/java/thedarkcolour/exdeorum/blockentity/helper/FluidHelper.java index 7462e08d..b2b4e105 100644 --- a/src/main/java/thedarkcolour/exdeorum/blockentity/helper/FluidHelper.java +++ b/src/main/java/thedarkcolour/exdeorum/blockentity/helper/FluidHelper.java @@ -30,7 +30,9 @@ public class FluidHelper extends FluidTank { @Override public FluidTank readFromNBT(CompoundTag nbt) { super.readFromNBT(nbt); - this.fluid.setAmount(Math.min(this.capacity, this.fluid.getAmount())); + if (!this.fluid.isEmpty()) { + this.fluid.setAmount(Math.min(this.capacity, this.fluid.getAmount())); + } return this; }