Skip to content

Commit

Permalink
Fix entity movement in custom fluid types (#1922)
Browse files Browse the repository at this point in the history
  • Loading branch information
sciwhiz12 authored Jan 28, 2025
1 parent 9eab4c5 commit a1831ff
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patches/net/minecraft/world/entity/LivingEntity.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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_) {
Expand Down

0 comments on commit a1831ff

Please sign in to comment.