Skip to content

Commit

Permalink
I accidentally removed the part that notified the multiblock that the…
Browse files Browse the repository at this point in the history
… fluid was changed 💀
  • Loading branch information
Zorbatron committed Jul 16, 2024
1 parent a4a25f1 commit 16764b0
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ public ModularUI.Builder createTankUI(InfiniteTank fluidTank, String title, Enti
}

private Supplier<String> getFluidNameText(InfiniteTank fluidTank) {
return () -> {
try {
return fluidTank.getFluid().getLocalizedName();
} catch (NullPointerException e) {
return "";
}
};
return () -> fluidTank.getFluid() != null ? fluidTank.getFluid().getLocalizedName() : "";
}

private Supplier<String> getFluidAmountText(InfiniteTank fluidTank) {
Expand All @@ -101,6 +95,7 @@ private Supplier<String> getFluidAmountText(InfiniteTank fluidTank) {
private void setFluid(@Nullable FluidStack fluid) {
if (fluid != null) {
this.fluidTank.setFluid(new FluidStack(fluid.copy(), FLUID_AMOUNT));
this.fluidTank.onContentsChanged();
}
}

Expand Down

0 comments on commit 16764b0

Please sign in to comment.