From 50c5c336d897df5948a1979562ccc5bb176cf280 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:00:53 -0400 Subject: [PATCH] Restructure Entity.updateWaterState overwrite to allow mod mixins to work (#30) --- .../mixin/entity/collisions/fluid/EntityMixin.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/fluid/EntityMixin.java b/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/fluid/EntityMixin.java index 75f09e540..f3f6b9828 100644 --- a/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/fluid/EntityMixin.java +++ b/src/main/java/me/jellysquid/mods/lithium/mixin/entity/collisions/fluid/EntityMixin.java @@ -127,15 +127,7 @@ protected boolean updateWaterState() { this.radium$isInModdedFluid = false; this.checkWaterState(); - if (this.radium$isInModdedFluid) { - this.handleModdedFluidBehaviors(); - } - - return this.isInFluidType(); - } - - private void handleModdedFluidBehaviors() { - if (!(this.getVehicle() instanceof BoatEntity)) { + if (this.radium$isInModdedFluid && !(this.getVehicle() instanceof BoatEntity)) { float fallDistanceModifier = Float.MAX_VALUE; boolean canExtinguish = false; @@ -154,6 +146,8 @@ private void handleModdedFluidBehaviors() { this.extinguish(); } } + + return this.isInFluidType(); } /**