Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-17 12:00:07 +01:00
fc1e70df07
* master: Always process chunk registration after moving Always move Entity to its new Chunk even if unloaded If Entity is added to chunk, look up the chunk if current isnt set Ignore Dead Entities in entityList iteration Always process chunk removal in removeEntity
34 Zeilen
1.5 KiB
Diff
34 Zeilen
1.5 KiB
Diff
From c461973839a211b635e7b8446d8acc317726398f Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 28 Jul 2018 12:09:20 -0400
|
|
Subject: [PATCH] Always process chunk removal in removeEntity
|
|
|
|
Spigot might skip chunk registration changes in removeEntity
|
|
which can keep them in the chunk when they shouldnt be if done
|
|
during entity ticking.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
|
index 89d0127af..f8458a2b4 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -1134,7 +1134,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
|
this.everyoneSleeping();
|
|
}
|
|
|
|
- if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking
|
|
+ // if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - move down
|
|
int i = entity.ae;
|
|
int j = entity.ag;
|
|
|
|
@@ -1142,6 +1142,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
|
this.getChunkAt(i, j).b(entity);
|
|
}
|
|
|
|
+ if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking // Paper - always remove from current chunk above
|
|
// CraftBukkit start - Decrement loop variable field if we've already ticked this entity
|
|
int index = this.entityList.indexOf(entity);
|
|
if (index != -1) {
|
|
--
|
|
2.18.0
|
|
|