9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0280-Paper-Improve-Fix-MC-44654.patch
2025-06-27 19:11:50 +08:00

47 lines
2.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen <23108066+Owen1212055@users.noreply.github.com>
Date: Fri, 20 Jun 2025 16:02:24 -0400
Subject: [PATCH] Paper: Improve Fix MC-44654
Original license: GPLv3
Original project: https://github.com/PaperMC/Paper
https://github.com/PaperMC/Paper/commit/4b3f967e49f069ca94535f1ef5c2695cc8eadc4a
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.
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 5fda5eadd37ec52ca6470d4aeb18a20c192811be..8ef27db6cefdf63ee87b0fb3cc019803ed056b0f 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -4957,6 +4957,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
this.levelCallback.onMove();
+
+ // Paper start - Fix MC-44654Add commentMore actions
+ 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
diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java
index d92045528d1a63799322418d86fab0bc580b7a99..8e8cf73082478b991f929beef678dcf9be70ac8a 100644
--- a/net/minecraft/world/entity/EntityType.java
+++ b/net/minecraft/world/entity/EntityType.java
@@ -216,7 +216,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
.fireImmune()
.sized(6.0F, 0.5F)
.clientTrackingRange(10)
- .updateInterval(10) // CraftBukkit - SPIGOT-3729: track area effect clouds
+ .updateInterval(Integer.MAX_VALUE)
);
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)