From a43d621c0138110d2ec362b2eaa8f938f241bb49 Mon Sep 17 00:00:00 2001 From: feildmaster Date: Sun, 29 Jul 2012 02:33:13 -0500 Subject: Update CraftBukkit to Minecraft 1.3.1 --- .../net/minecraft/server/BlockRedstoneOre.java | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'src/main/java/net/minecraft/server/BlockRedstoneOre.java') diff --git a/src/main/java/net/minecraft/server/BlockRedstoneOre.java b/src/main/java/net/minecraft/server/BlockRedstoneOre.java index 7811b87a..123d8fd2 100644 --- a/src/main/java/net/minecraft/server/BlockRedstoneOre.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneOre.java @@ -11,18 +11,18 @@ public class BlockRedstoneOre extends Block { public BlockRedstoneOre(int i, int j, boolean flag) { super(i, j, Material.STONE); if (flag) { - this.a(true); + this.b(true); } this.a = flag; } - public int d() { + public int p_() { return 30; } public void attack(World world, int i, int j, int k, EntityHuman entityhuman) { - this.g(world, i, j, k); + this.l(world, i, j, k); super.attack(world, i, j, k, entityhuman); } @@ -31,33 +31,33 @@ public class BlockRedstoneOre extends Block { if (entity instanceof EntityHuman) { org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, i, j, k, -1, null); if (!event.isCancelled()) { - this.g(world, i, j, k); + this.l(world, i, j, k); super.b(world, i, j, k, entity); } } else { EntityInteractEvent event = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(i, j, k)); world.getServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { - this.g(world, i, j, k); + this.l(world, i, j, k); super.b(world, i, j, k, entity); } } // CraftBukkit end } - public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman) { - this.g(world, i, j, k); - return super.interact(world, i, j, k, entityhuman); + public boolean interact(World world, int i, int j, int k, EntityHuman entityhuman, int l, float f, float f1, float f2) { + this.l(world, i, j, k); + return super.interact(world, i, j, k, entityhuman, l, f, f1, f2); } - private void g(World world, int i, int j, int k) { - this.h(world, i, j, k); + private void l(World world, int i, int j, int k) { + this.n(world, i, j, k); if (this.id == Block.REDSTONE_ORE.id) { world.setTypeId(i, j, k, Block.GLOWING_REDSTONE_ORE.id); } } - public void a(World world, int i, int j, int k, Random random) { + public void b(World world, int i, int j, int k, Random random) { if (this.id == Block.GLOWING_REDSTONE_ORE.id) { world.setTypeId(i, j, k, Block.REDSTONE_ORE.id); } @@ -75,7 +75,16 @@ public class BlockRedstoneOre extends Block { return 4 + random.nextInt(2); } - private void h(World world, int i, int j, int k) { + public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { + super.dropNaturally(world, i, j, k, l, f, i1); + if (this.getDropType(l, world.random, i1) != this.id) { + int j1 = 1 + world.random.nextInt(5); + + this.g(world, i, j, k, j1); + } + } + + private void n(World world, int i, int j, int k) { Random random = world.random; double d0 = 0.0625D; @@ -114,7 +123,7 @@ public class BlockRedstoneOre extends Block { } } - protected ItemStack a_(int i) { + protected ItemStack c_(int i) { return new ItemStack(Block.REDSTONE_ORE); } } -- cgit v1.2.3