[Bleeding] Audit of onPlace methods, Moved to postPlace as appropriate.

Closes BUKKIT-89
This commit is contained in:
Tahg
2012-01-17 19:37:58 -05:00
committed by EvilSeph
parent e92bdab57a
commit c7716e1de4
12 changed files with 645 additions and 8 deletions

View File

@@ -33,8 +33,8 @@ public class BlockPumpkin extends Block {
return i == 1 ? this.textureId : (i == 0 ? this.textureId : (i == 3 ? this.textureId + 1 + 16 : this.textureId + 16));
}
public void onPlace(World world, int i, int j, int k) {
super.onPlace(world, i, j, k);
public void postPlace(World world, int i, int j, int k, int m) { // CraftBukkit - onPlace(World, int, int, int) -> postPlace(World, int, int, int, int)
super.postPlace(world, i, j, k, m); // CraftBukkit - onPlace(World, int, int, int) -> postPlace(World, int, int, int, int)
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);