From 0d1f1cd4e8597f7934e909348a3d440e2c497f0d Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Mon, 18 Nov 2024 21:37:16 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fixed=20handling=20of=20f?= =?UTF-8?q?luids=20that=20were=20removed=20from=20modpack=20in=20tank=20up?= =?UTF-8?q?grade=20so=20that=20it=20properly=20gets=20set=20as=20empty=20a?= =?UTF-8?q?nd=20doesn't=20crash=20in=20some=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../client/render/BackpackDynamicModel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 0e8c14bd..ef1c0375 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ loader_version_range=[4,) mod_id=sophisticatedbackpacks mod_name=Sophisticated Backpacks mod_license=GNU General Public License v3.0 -mod_version=3.20.23 +mod_version=3.20.24 mod_group_id=sophisticatedbackpacks mod_authors=P3pp3rF1y, Ridanisaurus mod_description=Fancy and functional backpacks. diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackDynamicModel.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackDynamicModel.java index 3684b060..feb96c1d 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackDynamicModel.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/client/render/BackpackDynamicModel.java @@ -211,7 +211,7 @@ private void addLeftSide(@Nullable BlockState state, @Nullable Direction side, R } private void addFluid(List ret, FluidStack fluidStack, float ratio, double xMin) { - if (Mth.equal(ratio, 0.0f)) { + if (fluidStack == FluidStack.EMPTY || Mth.equal(ratio, 0.0f)) { return; }