summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityPainting.java
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-09-17 16:47:07 -0400
committerTahg <tahgtahv@gmail.com>2011-09-17 16:47:33 -0400
commit5534efd66f1a0ffb4344bf3681d1922930e43d23 (patch)
treef1a00fe44f01f2622e264d2b8e6559a756bf1b47 /src/main/java/net/minecraft/server/EntityPainting.java
parentf5957c1831f61726c988c5c4717cd2c51df509cc (diff)
downloadcraftbukkit-5534efd66f1a0ffb4344bf3681d1922930e43d23.tar
craftbukkit-5534efd66f1a0ffb4344bf3681d1922930e43d23.tar.gz
craftbukkit-5534efd66f1a0ffb4344bf3681d1922930e43d23.tar.lz
craftbukkit-5534efd66f1a0ffb4344bf3681d1922930e43d23.tar.xz
craftbukkit-5534efd66f1a0ffb4344bf3681d1922930e43d23.zip
painting fix
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityPainting.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityPainting.java36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPainting.java b/src/main/java/net/minecraft/server/EntityPainting.java
index 03eb9b3e..a98c4d0b 100644
--- a/src/main/java/net/minecraft/server/EntityPainting.java
+++ b/src/main/java/net/minecraft/server/EntityPainting.java
@@ -128,10 +128,12 @@ public class EntityPainting extends Entity {
if (event.isCancelled()) {
return;
}
- // CraftBukkit end
- this.die();
- this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ if(!dead) {
+ this.die();
+ this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ }
+ // CraftBukkit end
}
}
}
@@ -207,11 +209,13 @@ public class EntityPainting extends Entity {
if (event.isCancelled()) {
return true;
}
- // CraftBukkit end
- this.die();
- this.aq();
- this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ if(!dead) {
+ this.die();
+ this.aq();
+ this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ }
+ // CraftBukkit end
}
return true;
@@ -251,15 +255,25 @@ public class EntityPainting extends Entity {
public void move(double d0, double d1, double d2) {
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
- this.die();
- this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+
+ // CraftBukkit start
+ if(!dead) {
+ this.die();
+ this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ }
+ // CraftBukkit end
}
}
public void b(double d0, double d1, double d2) {
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
- this.die();
- this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+
+ // CraftBukkit start
+ if(!dead) {
+ this.die();
+ this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
+ }
+ // CraftBukkit end
}
}
}