summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java10
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_() {