diff --git a/Spigot-Server-Patches/EAR-Fix-bug-with-teleporting-entities.patch b/Spigot-Server-Patches/EAR-Fix-bug-with-teleporting-entities.patch new file mode 100644 index 0000000000..5f816dd76a --- /dev/null +++ b/Spigot-Server-Patches/EAR-Fix-bug-with-teleporting-entities.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Tue, 22 Dec 2015 18:16:11 -0600 +Subject: [PATCH] EAR: Fix bug with teleporting entities + +[17:53:15] had a reproduceable issue of losing entities on teleport, now resolved +https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/pull-requests/52/overview + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -0,0 +0,0 @@ public abstract class Entity implements ICommandListener { + protected DataWatcher datawatcher; + private double ar; + private double as; +- public boolean ad; public boolean isAddedToChunk() { return ad; } // Spigot // PAIL +- public int ae; +- public int af; +- public int ag; ++ public boolean ad; ++ // PaperSpigot start - EAR: Fix bug with teleporting entities ++ public boolean isAddedToChunk() { ++ int chunkX = MathHelper.floor(locX / 16.0D); ++ int chunkY = MathHelper.floor(locY / 16.0D); ++ int chunkZ = MathHelper.floor(locZ / 16.0D); ++ ++ return ad && getChunkX() == chunkX && getChunkY() == chunkY || getChunkZ() == chunkZ; ++ } ++ public int ae; public int getChunkX() { return ae; } // PAIL ++ public int af; public int getChunkY() { return af; } // PAIL ++ public int ag; public int getChunkZ() { return ag; } // PAIL ++ // PaperSpigot end + public boolean ah; + public boolean ai; + public int portalCooldown; +-- \ No newline at end of file