diff options
author | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
commit | 974b0afca91844fed61c5fda9293bbcd88752c2f (patch) | |
tree | d3a7b65e14f34b7cc8928efaf6403f67eaaaf708 /Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch | |
parent | 8b2122a291e3ea68f0e1516209914ef43a2d55e9 (diff) | |
download | Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.tar.gz Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.zip |
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue,
switching to Mojang's implementation which doesn't appear to share it. I
already removed the important bit in the last upstream merge, this is
just unused and unnecessary now. So we remove it.
Diffstat (limited to 'Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch')
-rw-r--r-- | Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch new file mode 100644 index 0000000000..a77b14b155 --- /dev/null +++ b/Spigot-Server-Patches/0146-Fix-Double-World-Add-issues.patch @@ -0,0 +1,37 @@ +From 54c81de7d1b0aa3d7741b255d4fda4f562d20c8a Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Tue, 21 Jun 2016 22:54:34 -0400 +Subject: [PATCH] Fix Double World Add issues + +Vanilla will double add Spider Jockeys to the world, so ignore already added. + +Also add debug if something else tries to, and abort before world gets bad state + +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index 721a3cd81..90d069539 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -508,7 +508,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + + public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) { +- if (world.addEntity(entity, reason) && entity.isVehicle()) { ++ if (!entity.valid && world.addEntity(entity, reason) && entity.isVehicle()) { // Paper + // CraftBukkit end + Iterator iterator = entity.bx().iterator(); + +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 7ed3a0677..7900fca57 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -1098,6 +1098,7 @@ public abstract class World implements IBlockAccess { + public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason + org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot + if (entity == null) return false; ++ if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper + // CraftBukkit end + int i = MathHelper.floor(entity.locX / 16.0D); + int j = MathHelper.floor(entity.locZ / 16.0D); +-- +2.12.2.windows.2 + |