summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntitySnowman.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EntitySnowman.patch')
-rw-r--r--nms-patches/EntitySnowman.patch14
1 files changed, 2 insertions, 12 deletions
diff --git a/nms-patches/EntitySnowman.patch b/nms-patches/EntitySnowman.patch
index 0fc4443b..244f48b1 100644
--- a/nms-patches/EntitySnowman.patch
+++ b/nms-patches/EntitySnowman.patch
@@ -21,22 +21,12 @@
}
if (!this.world.getGameRules().getBoolean("mobGriefing")) {
-@@ -73,7 +78,17 @@
+@@ -73,7 +78,7 @@
BlockPosition blockposition = new BlockPosition(i, j, k);
if (this.world.getType(blockposition).getMaterial() == Material.AIR && this.world.getBiome(blockposition).a(blockposition) < 0.8F && Blocks.SNOW_LAYER.canPlace(this.world, blockposition)) {
- this.world.setTypeUpdate(blockposition, Blocks.SNOW_LAYER.getBlockData());
-+ // CraftBukkit start
-+ org.bukkit.block.BlockState blockState = this.world.getWorld().getBlockAt(i, j, k).getState();
-+ blockState.setType(CraftMagicNumbers.getMaterial(Blocks.SNOW_LAYER));
-+
-+ EntityBlockFormEvent event = new EntityBlockFormEvent(this.getBukkitEntity(), blockState.getBlock(), blockState);
-+ this.world.getServer().getPluginManager().callEvent(event);
-+
-+ if(!event.isCancelled()) {
-+ blockState.update(true);
-+ }
-+ // CraftBukkit end
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.world, blockposition, Blocks.SNOW_LAYER, this); // CraftBukkit
}
}
}