From a1831ffc4504f982a5d69acac84bdc20e32866ec Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Tue, 28 Jan 2025 15:05:33 +0800 Subject: [PATCH] Fix entity movement in custom fluid types (#1922) --- .../minecraft/world/entity/LivingEntity.java.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/patches/net/minecraft/world/entity/LivingEntity.java.patch b/patches/net/minecraft/world/entity/LivingEntity.java.patch index fd43d4c7b7..7c6604f0a9 100644 --- a/patches/net/minecraft/world/entity/LivingEntity.java.patch +++ b/patches/net/minecraft/world/entity/LivingEntity.java.patch @@ -492,6 +492,18 @@ } protected float getWaterSlowDown() { +@@ -2193,8 +_,9 @@ + public void travel(Vec3 p_21280_) { + if (this.isControlledByLocalInstance()) { + FluidState fluidstate = this.level().getFluidState(this.blockPosition()); +- if ((this.isInWater() || this.isInLava()) && this.isAffectedByFluids() && !this.canStandOnFluid(fluidstate)) { +- this.travelInFluid(p_21280_); ++ // Neo: Call (patched-in overload of) #travelInFluid for custom fluid types ++ if ((this.isInWater() || this.isInLava() || this.isInFluidType(fluidstate)) && this.isAffectedByFluids() && !this.canStandOnFluid(fluidstate)) { ++ this.travelInFluid(p_21280_, fluidstate); + } else if (this.isFallFlying()) { + this.travelFallFlying(); + } else { @@ -2205,7 +_,7 @@ private void travelInAir(Vec3 p_362457_) {