mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 07:20:00 +08:00
0f479b740d
* master: MC-135506: Experience should save as Integers Fix EXP orb merging causing values to go negative - Closes #1169 Add "Safe Regen" Duplicate UUID resolver and make default
34 lines
1.5 KiB
Diff
34 lines
1.5 KiB
Diff
From 41011bfa8744eec1ba2c81054d8e20cb2cf73e82 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 eb56940a18..7f999cbd5b 100644
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
|
@@ -1135,7 +1135,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;
|
|
|
|
@@ -1143,6 +1143,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
|
|
|