From 16764b0db3bd6f9405d64ec0cb67a11c0beb76a8 Mon Sep 17 00:00:00 2001 From: Zorbatron Date: Mon, 15 Jul 2024 21:28:20 -0400 Subject: [PATCH] I accidentally removed the part that notified the multiblock that the fluid was changed :skull: --- .../MetaTileEntityCreativeReservoirHatch.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zorbatron/zbgt/common/metatileentities/multi/multiblockpart/MetaTileEntityCreativeReservoirHatch.java b/src/main/java/com/zorbatron/zbgt/common/metatileentities/multi/multiblockpart/MetaTileEntityCreativeReservoirHatch.java index 375ce0a3..63c3a96d 100644 --- a/src/main/java/com/zorbatron/zbgt/common/metatileentities/multi/multiblockpart/MetaTileEntityCreativeReservoirHatch.java +++ b/src/main/java/com/zorbatron/zbgt/common/metatileentities/multi/multiblockpart/MetaTileEntityCreativeReservoirHatch.java @@ -85,13 +85,7 @@ public ModularUI.Builder createTankUI(InfiniteTank fluidTank, String title, Enti } private Supplier getFluidNameText(InfiniteTank fluidTank) { - return () -> { - try { - return fluidTank.getFluid().getLocalizedName(); - } catch (NullPointerException e) { - return ""; - } - }; + return () -> fluidTank.getFluid() != null ? fluidTank.getFluid().getLocalizedName() : ""; } private Supplier getFluidAmountText(InfiniteTank fluidTank) { @@ -101,6 +95,7 @@ private Supplier getFluidAmountText(InfiniteTank fluidTank) { private void setFluid(@Nullable FluidStack fluid) { if (fluid != null) { this.fluidTank.setFluid(new FluidStack(fluid.copy(), FLUID_AMOUNT)); + this.fluidTank.onContentsChanged(); } }