diff options
author | mbax <matt@phozop.net> | 2013-11-04 07:07:38 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:26:12 -0600 |
commit | 2726696652179a5ead7dc07dd39edf7dfda687f7 (patch) | |
tree | ff78e22fdd4fc01889a5f6cc482b599f965cd93a /src/main/java/net/minecraft/server/BlockDragonEgg.java | |
parent | ff8b70fbb7a96b9d2ff078afcf3b3ff90f200981 (diff) | |
download | craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.gz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.lz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.xz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.zip |
Update CraftBukkit to Minecraft 1.7.2
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockDragonEgg.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockDragonEgg.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDragonEgg.java b/src/main/java/net/minecraft/server/BlockDragonEgg.java index a27a6c07..b1c3f10e 100644 --- a/src/main/java/net/minecraft/server/BlockDragonEgg.java +++ b/src/main/java/net/minecraft/server/BlockDragonEgg.java @@ -6,41 +6,41 @@ import org.bukkit.event.block.BlockFromToEvent; // CraftBukkit public class BlockDragonEgg extends Block { - public BlockDragonEgg(int i) { - super(i, Material.DRAGON_EGG); + public BlockDragonEgg() { + super(Material.DRAGON_EGG); this.a(0.0625F, 0.0F, 0.0625F, 0.9375F, 1.0F, 0.9375F); } public void onPlace(World world, int i, int j, int k) { - world.a(i, j, k, this.id, this.a(world)); + world.a(i, j, k, this, this.a(world)); } - public void doPhysics(World world, int i, int j, int k, int l) { - world.a(i, j, k, this.id, this.a(world)); + public void doPhysics(World world, int i, int j, int k, Block block) { + world.a(i, j, k, this, this.a(world)); } public void a(World world, int i, int j, int k, Random random) { - this.k(world, i, j, k); + this.e(world, i, j, k); } - private void k(World world, int i, int j, int k) { - if (BlockSand.canFall(world, i, j - 1, k) && j >= 0) { + private void e(World world, int i, int j, int k) { + if (BlockFalling.canFall(world, i, j - 1, k) && j >= 0) { byte b0 = 32; - if (!BlockSand.instaFall && world.e(i - b0, j - b0, k - b0, i + b0, j + b0, k + b0)) { + if (!BlockFalling.instaFall && world.b(i - b0, j - b0, k - b0, i + b0, j + b0, k + b0)) { // CraftBukkit - added data - EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this.id, world.getData(i, j, k)); + EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this, world.getData(i, j, k)); world.addEntity(entityfallingblock); } else { world.setAir(i, j, k); - while (BlockSand.canFall(world, i, j - 1, k) && j > 0) { + while (BlockFalling.canFall(world, i, j - 1, k) && j > 0) { --j; } if (j > 0) { - world.setTypeIdAndData(i, j, k, this.id, 0, 2); + world.setTypeAndData(i, j, k, this, 0, 2); } } } @@ -56,13 +56,13 @@ public class BlockDragonEgg extends Block { } private void m(World world, int i, int j, int k) { - if (world.getTypeId(i, j, k) == this.id) { + if (world.getType(i, j, k) == this) { for (int l = 0; l < 1000; ++l) { int i1 = i + world.random.nextInt(16) - world.random.nextInt(16); int j1 = j + world.random.nextInt(8) - world.random.nextInt(8); int k1 = k + world.random.nextInt(16) - world.random.nextInt(16); - if (world.getTypeId(i1, j1, k1) == 0) { + if (world.getType(i1, j1, k1).material == Material.AIR) { // CraftBukkit start org.bukkit.block.Block from = world.getWorld().getBlockAt(i, j, k); org.bukkit.block.Block to = world.getWorld().getBlockAt(i1, j1, k1); @@ -79,7 +79,7 @@ public class BlockDragonEgg extends Block { // CraftBukkit end if (!world.isStatic) { - world.setTypeIdAndData(i1, j1, k1, this.id, world.getData(i, j, k), 2); + world.setTypeAndData(i1, j1, k1, this, world.getData(i, j, k), 2); world.setAir(i, j, k); } else { short short1 = 128; @@ -111,11 +111,11 @@ public class BlockDragonEgg extends Block { return false; } - public boolean b() { + public boolean d() { return false; } - public int d() { + public int b() { return 27; } } |