From 9b10970f6b42fdc38409c31a9010653c18838678 Mon Sep 17 00:00:00 2001 From: Aidan Matzko Date: Sat, 4 Feb 2012 12:51:40 -0500 Subject: [PATCH] [Bleeding] Fixed EntityChangeBlock event reporting incorrect information for Enderman block placing. --- src/main/java/net/minecraft/server/EntityEnderman.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java index 66d8de4460..6416d88936 100644 --- a/src/main/java/net/minecraft/server/EntityEnderman.java +++ b/src/main/java/net/minecraft/server/EntityEnderman.java @@ -137,7 +137,9 @@ public class EntityEnderman extends EntityMonster { EndermanPlaceEvent place = new EndermanPlaceEvent(this.getBukkitEntity(), new Location(this.world.getWorld(), i, j, k)); this.world.getServer().getPluginManager().callEvent(place); - EntityChangeBlockEvent event = new EntityChangeBlockEvent(this.getBukkitEntity(), this.world.getWorld().getBlockAt(i, j, k), org.bukkit.Material.AIR); + org.bukkit.block.Block bblock = this.world.getWorld().getBlockAt(i, j, k); + + EntityChangeBlockEvent event = new EntityChangeBlockEvent(this.getBukkitEntity(), bblock, bblock.getType()); this.world.getServer().getPluginManager().callEvent(event); if (!place.isCancelled() && !event.isCancelled()) {