Fix Entity#isTicking and update Paper entity command (#11590)

fixes #10299
This commit is contained in:
Jason Penilla
2024-11-09 07:41:26 -07:00
parent 02cdc61bbc
commit 13a6161350
5 changed files with 4 additions and 21 deletions

View File

@@ -5422,19 +5422,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
boolean flag = this.distanceManager.runAllUpdates(this.chunkMap);
boolean flag1 = this.chunkMap.promoteChunkMap();
@@ -0,0 +0,0 @@ public class ServerChunkCache extends ChunkSource {
}
}
+ // Paper start
+ public boolean isPositionTicking(Entity entity) {
+ return this.isPositionTicking(ChunkPos.asLong(net.minecraft.util.Mth.floor(entity.getX()) >> 4, net.minecraft.util.Mth.floor(entity.getZ()) >> 4));
+ }
+ // Paper end
+
public boolean isPositionTicking(long pos) {
if (!this.level.shouldTickBlocksAt(pos)) {
return false;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java