aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0004-MC-Utils.patch
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2020-01-31 16:09:56 +0000
committerShane Freeder <[email protected]>2020-01-31 16:09:56 +0000
commit859f1296fe05f28df5379fba59c9f1d93551474b (patch)
treed4496ac9f64304af61aa3eeb6b37977b1ba3dda4 /Spigot-Server-Patches/0004-MC-Utils.patch
parentb21010e7e39958c2fda4d5e4e0dc5d9ee6e9bdda (diff)
downloadPaper-859f1296fe05f28df5379fba59c9f1d93551474b.tar.gz
Paper-859f1296fe05f28df5379fba59c9f1d93551474b.zip
Remove entities from per-chunk list (Fixes #2918)
Diffstat (limited to 'Spigot-Server-Patches/0004-MC-Utils.patch')
-rw-r--r--Spigot-Server-Patches/0004-MC-Utils.patch18
1 files changed, 13 insertions, 5 deletions
diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch
index dde8fa4064..8ff9bbf665 100644
--- a/Spigot-Server-Patches/0004-MC-Utils.patch
+++ b/Spigot-Server-Patches/0004-MC-Utils.patch
@@ -1,4 +1,4 @@
-From 9360a474d1de17fd98648746c9ec18708a1711ad Mon Sep 17 00:00:00 2001
+From c750b5ba92a117b69ce896b1147e65a79044a244 Mon Sep 17 00:00:00 2001
From: Aikar <[email protected]>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
@@ -1700,7 +1700,7 @@ index c88a62f6b..5dbd3e60f 100644
this.d = i;
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
-index 55373cae0..517014d21 100644
+index 55373cae0..af10c18d4 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
@@ -1769,7 +1769,15 @@ index 55373cae0..517014d21 100644
this.entitySlices[k].add(entity);
}
-@@ -395,6 +413,7 @@ public class Chunk implements IChunkAccess {
+@@ -374,6 +392,7 @@ public class Chunk implements IChunkAccess {
+ }
+
+ this.entitySlices[i].remove(entity);
++ this.entities.remove(entity); // Paper
+ }
+
+ @Override
+@@ -395,6 +414,7 @@ public class Chunk implements IChunkAccess {
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
}
@@ -1777,7 +1785,7 @@ index 55373cae0..517014d21 100644
@Nullable
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
// CraftBukkit start
-@@ -507,6 +526,7 @@ public class Chunk implements IChunkAccess {
+@@ -507,6 +527,7 @@ public class Chunk implements IChunkAccess {
// CraftBukkit start
public void loadCallback() {
org.bukkit.Server server = this.world.getServer();
@@ -1785,7 +1793,7 @@ index 55373cae0..517014d21 100644
if (server != null) {
/*
* If it's a new world, the first few chunks are generated inside
-@@ -545,6 +565,7 @@ public class Chunk implements IChunkAccess {
+@@ -545,6 +566,7 @@ public class Chunk implements IChunkAccess {
server.getPluginManager().callEvent(unloadEvent);
// note: saving can be prevented, but not forced if no saving is actually required
this.mustNotSave = !unloadEvent.isSaveChunk();