summaryrefslogtreecommitdiffstats
path: root/nms-patches/Entity.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/Entity.patch')
-rw-r--r--nms-patches/Entity.patch16
1 files changed, 10 insertions, 6 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index 4356df00..478fbbbb 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde/net/minecraft/server/Entity.java 2014-12-12 11:04:49.470792233 +1100
-+++ src/main/java/net/minecraft/server/Entity.java 2014-12-12 11:03:57.000000000 +1100
+--- ../work/decompile-8eb82bde//net/minecraft/server/Entity.java Sun Dec 21 17:29:15 2014
++++ src/main/java/net/minecraft/server/Entity.java Sun Dec 21 17:29:15 2014
@@ -6,8 +6,40 @@
import java.util.UUID;
import java.util.concurrent.Callable;
@@ -331,12 +331,12 @@
+ }
+ }
+ // CraftBukkit end
-+
+
+ // CraftBukkit start - Reset world
+ if (this instanceof EntityPlayer) {
+ Server server = Bukkit.getServer();
+ org.bukkit.World bworld = null;
-
++
+ // TODO: Remove World related checks, replaced with WorldUID
+ String worldName = nbttagcompound.getString("world");
+
@@ -500,7 +500,7 @@
}
}
-@@ -1546,32 +1861,78 @@
+@@ -1546,32 +1861,82 @@
if (!this.world.isStatic && !this.dead) {
this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = MinecraftServer.getServer();
@@ -580,11 +580,15 @@
+ // CraftBukkit start - Forward the CraftEntity to the new entity
+ this.getBukkitEntity().setHandle(entity);
+ entity.bukkitEntity = this.getBukkitEntity();
++
++ if (this instanceof EntityInsentient) {
++ ((EntityInsentient)this).unleash(true, false); // Unleash to prevent duping of leads.
++ }
+ // CraftBukkit end
}
this.dead = true;
-@@ -1680,8 +2041,27 @@
+@@ -1680,8 +2045,27 @@
return this.boundingBox;
}