Fixed Pumpkins being reported as AIR in BlockPlace event when building snowmen. Fixes BUKKIT-697

This commit is contained in:
EvilSeph 2012-02-08 18:30:59 -05:00
parent 6d67456970
commit 879a87b1e0

View File

@ -35,6 +35,7 @@ public class BlockPumpkin extends Block {
public void onPlace(World world, int i, int j, int k) {
super.onPlace(world, i, j, k);
if (world.suppressPhysics) return; // CraftBukkit
if (world.getTypeId(i, j - 1, k) == Block.SNOW_BLOCK.id && world.getTypeId(i, j - 2, k) == Block.SNOW_BLOCK.id) {
if (!world.isStatic && world.getServer().getServer().spawnAnimals) { // CraftBukkit - make snowmen obey spawning rules
world.setTypeId(i, j, k, 0);