diff options
author | feildmaster <admin@feildmaster.com> | 2012-06-09 03:59:49 -0500 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-06-09 04:35:32 -0500 |
commit | d5ba6c66448faa4839283228651665dd9b1f8811 (patch) | |
tree | 8535fa49184650800aca7eb5a333a4e6d58aaa2f /src/main/java/net/minecraft/server | |
parent | 3df6608a725a796ed03cbf09b50a914299c9a400 (diff) | |
download | craftbukkit-d5ba6c66448faa4839283228651665dd9b1f8811.tar craftbukkit-d5ba6c66448faa4839283228651665dd9b1f8811.tar.gz craftbukkit-d5ba6c66448faa4839283228651665dd9b1f8811.tar.lz craftbukkit-d5ba6c66448faa4839283228651665dd9b1f8811.tar.xz craftbukkit-d5ba6c66448faa4839283228651665dd9b1f8811.zip |
Fix fireballs freezing when the chunk unloads. Addresses BUKKIT-1228
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityFireball.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java index ec4911ea..f107b92e 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -216,6 +216,8 @@ public class EntityFireball extends Entity { nbttagcompound.setShort("zTile", (short) this.g); nbttagcompound.setByte("inTile", (byte) this.h); nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0)); + // CraftBukkit + nbttagcompound.set("Direction", this.a(new double[] { this.dirX, this.dirY, this.dirZ})); } public void a(NBTTagCompound nbttagcompound) { @@ -224,6 +226,14 @@ public class EntityFireball extends Entity { this.g = nbttagcompound.getShort("zTile"); this.h = nbttagcompound.getByte("inTile") & 255; this.i = nbttagcompound.getByte("inGround") == 1; + // CraftBukkit start + if (nbttagcompound.hasKey("Direction")) { + NBTTagList nbttaglist1 = nbttagcompound.getList("Direction"); + this.dirX = ((NBTTagDouble) nbttaglist1.get(0)).data; + this.dirY = ((NBTTagDouble) nbttaglist1.get(1)).data; + this.dirZ = ((NBTTagDouble) nbttaglist1.get(2)).data; + } + // CraftBukkit end } public boolean o_() { |