Improve Fix MC-44654 (#12703)

This more properly implement spigot's fix for teleportation area effect clouds, now however supporting many other entity types specified in this bug report.

Currently, this is not an issue for (all) hanging blocks since they have a fix identical to this inside of setPos. Note however the client does not nicely support moving these entities anyways.
This commit is contained in:
Owen 2025-06-20 16:02:24 -04:00 committed by GitHub
parent 74fbcce5ae
commit 4b3f967e49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 11 deletions

View file

@ -1832,10 +1832,17 @@
int floor = Mth.floor(x);
int floor1 = Mth.floor(y);
int floor2 = Mth.floor(z);
@@ -3686,6 +_,12 @@
@@ -3685,7 +_,18 @@
serverLevel.getWaypointManager().updatePlayer(serverPlayer);
}
}
}
- }
+ // Paper start - Fix MC-44654
+ if (this.getType().updateInterval() == Integer.MAX_VALUE) {
+ this.hasImpulse = true;
+ }
+ // Paper end - Fix MC-44654
+ }
+ // Paper start - Block invalid positions and bounding box; don't allow desync of pos and AABB
+ // hanging has its own special logic
+ if (!(this instanceof net.minecraft.world.entity.decoration.HangingEntity) && (forceBoundingBoxUpdate || this.position.x != x || this.position.y != y || this.position.z != z)) {

View file

@ -1,14 +1,5 @@
--- a/net/minecraft/world/entity/EntityType.java
+++ b/net/minecraft/world/entity/EntityType.java
@@ -217,7 +_,7 @@
.fireImmune()
.sized(6.0F, 0.5F)
.clientTrackingRange(10)
- .updateInterval(Integer.MAX_VALUE)
+ .updateInterval(10) // CraftBukkit - SPIGOT-3729: track area effect clouds
);
public static final EntityType<Armadillo> ARMADILLO = register(
"armadillo", EntityType.Builder.of(Armadillo::new, MobCategory.CREATURE).sized(0.7F, 0.65F).eyeHeight(0.26F).clientTrackingRange(10)
@@ -1155,6 +_,22 @@
boolean shouldOffsetY,
boolean shouldOffsetYMore