@@ -1,6 +1,6 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityEnderman.java 2014-11-28 17:43:43.085707435 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityEnderman.java 2014-11-28 17:38:21.000000000 +0000
|
||||
@@ -4,6 +4,12 @@
|
||||
--- /home/matt/mc-dev-private//net/minecraft/server/EntityEnderman.java 2015-02-26 22:40:22.519608140 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityEnderman.java 2015-02-26 22:40:22.519608140 +0000
|
||||
@@ -8,6 +8,12 @@
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
+
|
||||
public class EntityEnderman extends EntityMonster {
|
||||
|
||||
private static final UUID b = UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0");
|
||||
@@ -165,7 +171,17 @@
|
||||
private static final UUID a = UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0");
|
||||
@@ -177,7 +183,17 @@
|
||||
}
|
||||
|
||||
if (flag1) {
|
||||
@@ -32,3 +32,31 @@
|
||||
if (this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox())) {
|
||||
flag = true;
|
||||
}
|
||||
@@ -333,8 +349,12 @@
|
||||
Block block = iblockdata.getBlock();
|
||||
|
||||
if (EntityEnderman.c.contains(block)) {
|
||||
- this.enderman.setCarried(iblockdata);
|
||||
- world.setTypeUpdate(blockposition, Blocks.AIR.getBlockData());
|
||||
+ // CraftBukkit start - Pickup event
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.enderman, this.enderman.world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), org.bukkit.Material.AIR).isCancelled()) {
|
||||
+ this.enderman.setCarried(iblockdata);
|
||||
+ world.setTypeUpdate(blockposition, Blocks.AIR.getBlockData());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
@@ -363,8 +383,12 @@
|
||||
Block block1 = world.getType(blockposition.down()).getBlock();
|
||||
|
||||
if (this.a(world, blockposition, this.a.getCarried().getBlock(), block, block1)) {
|
||||
+ // CraftBukkit start - Place event
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.a, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.a.getCarried().getBlock(), this.a.getCarried().getBlock().toLegacyData(this.a.getCarried())).isCancelled()) {
|
||||
world.setTypeAndData(blockposition, this.a.getCarried(), 3);
|
||||
this.a.setCarried(Blocks.AIR.getBlockData());
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user