mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
Update CraftBukkit to Minecraft 1.3.1
This commit is contained in:
committed by
Travis Watkins
parent
08e2923bd4
commit
a43d621c01
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user