diff options
Diffstat (limited to 'src/main/java/net')
-rw-r--r-- | src/main/java/net/minecraft/server/Explosion.java | 10 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/ItemInWorldManager.java | 5 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index fb30dc10..cf2108c6 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -264,8 +264,14 @@ public class Explosion { // CraftBukkit - stop explosions from putting out fire if (l > 0 && l != Block.FIRE.id) { - // CraftBukkit - Block.byId[l].dropNaturally(this.world, i, j, k, this.world.getData(i, j, k), event.getYield(), 0); + // CraftBukkit start - special case skulls, add yield + int data = this.world.getData(i, j, k); + if (l == Block.SKULL.id) { + data = Block.SKULL.getDropData(this.world, i, j, k); + } + + Block.byId[l].dropNaturally(this.world, i, j, k, data, event.getYield(), 0); + // CraftBukkit end if (this.world.setRawTypeIdAndData(i, j, k, 0, 0, this.world.isStatic)) { this.world.applyPhysics(i, j, k, 0); } diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index cb13808f..025c25a7 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -291,6 +291,11 @@ public class ItemInWorldManager { int l = this.world.getTypeId(i, j, k); if (Block.byId[l] == null) return false; // CraftBukkit - a plugin set block to air without cancelling int i1 = this.world.getData(i, j, k); + // CraftBukkit start - special case skulls, their item data comes from a tile entity + if (l == Block.SKULL.id) { + i1 = Block.SKULL.getDropData(world, i, j, k); + } + // CraftBukkit end this.world.a(this.player, 2001, i, j, k, l + (this.world.getData(i, j, k) << 12)); boolean flag = this.d(i, j, k); |