@@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/BlockRedstoneOre.java 2014-11-28 17:43:42.949707438 +0000
|
||||
+++ src/main/java/net/minecraft/server/BlockRedstoneOre.java 2014-11-28 17:38:23.000000000 +0000
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/BlockRedstoneOre.java 2015-02-26 22:40:22.231608143 +0000
|
||||
+++ src/main/java/net/minecraft/server/BlockRedstoneOre.java 2015-02-26 22:40:22.231608143 +0000
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
import java.util.Random;
|
||||
@@ -16,44 +16,43 @@
|
||||
}
|
||||
|
||||
public void attack(World world, BlockPosition blockposition, EntityHuman entityhuman) {
|
||||
- this.d(world, blockposition);
|
||||
+ this.d(world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||
- this.e(world, blockposition);
|
||||
+ this.e(world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||
super.attack(world, blockposition, entityhuman);
|
||||
}
|
||||
|
||||
- public void a(World world, BlockPosition blockposition, Entity entity) {
|
||||
- this.d(world, blockposition);
|
||||
public void a(World world, BlockPosition blockposition, Entity entity) {
|
||||
- this.e(world, blockposition);
|
||||
- super.a(world, blockposition, entity);
|
||||
+ public void a(World world, BlockPosition blockposition, Entity entity) {
|
||||
+ // CraftBukkit start
|
||||
+ // this.d(world, blockposition);
|
||||
+ // super.a(world, blockposition, entity);
|
||||
+ // this.e(world, blockposition);
|
||||
+ // super.a(world, blockposition, entity);
|
||||
+ if (entity instanceof EntityHuman) {
|
||||
+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null);
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.d(world, blockposition, entity); // add entity
|
||||
+ super.a(world, blockposition, entity);
|
||||
+ this.e(world, blockposition, entity); // add entity
|
||||
+ super.a(world, blockposition, entity);
|
||||
+ }
|
||||
+ } else {
|
||||
+ EntityInteractEvent event = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
|
||||
+ world.getServer().getPluginManager().callEvent(event);
|
||||
+ if (!event.isCancelled()) {
|
||||
+ this.d(world, blockposition, entity); // add entity
|
||||
+ super.a(world, blockposition, entity);
|
||||
+ this.e(world, blockposition, entity); // add entity
|
||||
+ super.a(world, blockposition, entity);
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumDirection enumdirection, float f, float f1, float f2) {
|
||||
- this.d(world, blockposition);
|
||||
+ this.d(world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||
- this.e(world, blockposition);
|
||||
+ this.e(world, blockposition, entityhuman); // CraftBukkit - add entityhuman
|
||||
return super.interact(world, blockposition, iblockdata, entityhuman, enumdirection, f, f1, f2);
|
||||
}
|
||||
|
||||
- private void d(World world, BlockPosition blockposition) {
|
||||
+ private void d(World world, BlockPosition blockposition, Entity entity) { // CraftBukkit - add Entity
|
||||
this.e(world, blockposition);
|
||||
- private void e(World world, BlockPosition blockposition) {
|
||||
+ private void e(World world, BlockPosition blockposition, Entity entity) { // CraftBukkit - add Entity
|
||||
this.f(world, blockposition);
|
||||
if (this == Blocks.REDSTONE_ORE) {
|
||||
+ // CraftBukkit start
|
||||
+ if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.LIT_REDSTONE_ORE, 0).isCancelled()) {
|
||||
@@ -99,4 +98,4 @@
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
private void e(World world, BlockPosition blockposition) {
|
||||
private void f(World world, BlockPosition blockposition) {
|
||||
|
||||
Reference in New Issue
Block a user