diff --git a/CraftBukkit-Patches/0155-Use-Standard-List-for-EntitySlices.patch b/CraftBukkit-Patches/0155-Use-Standard-List-for-EntitySlices.patch index 7884ec4c09..0d716c4934 100644 --- a/CraftBukkit-Patches/0155-Use-Standard-List-for-EntitySlices.patch +++ b/CraftBukkit-Patches/0155-Use-Standard-List-for-EntitySlices.patch @@ -26,14 +26,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.world = world; this.locX = i; this.locZ = j; - this.heightMap = new int[256]; +@@ -0,0 +0,0 @@ public class Chunk { + /* CraftBukkit start for (int k = 0; k < this.entitySlices.length; ++k) { - this.entitySlices[k] = new EntitySlice(Entity.class); + this.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot } + // CraftBukkit end */ - Arrays.fill(this.f, -999); @@ -0,0 +0,0 @@ public class Chunk { j = MathHelper.clamp(j, 0, this.entitySlices.length - 1); @@ -58,6 +59,32 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return this.entitySlices; } +diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java +@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider { + + // CraftBukkit start - moved from Chunk. + for (int k = 0; k < chunk.entitySlices.length; ++k) { +- chunk.entitySlices[k] = new EntitySlice(Entity.class); ++ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot + } + // CraftBukkit end + chunk.addEntities(); +diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java ++++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +@@ -0,0 +0,0 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider + for (int k = 0; k < chunk.entitySlices.length; ++k) { +- chunk.entitySlices[k] = new EntitySlice(Entity.class); ++ chunk.entitySlices[k] = new org.bukkit.craftbukkit.util.UnsafeList(); // Spigot + } + + queuedChunk.loader.loadEntities(chunk, queuedChunk.compound.getCompound("Level"), queuedChunk.world); diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java