summaryrefslogtreecommitdiffstats
path: root/nms-patches/EnchantmentFrostWalker.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EnchantmentFrostWalker.patch')
-rw-r--r--nms-patches/EnchantmentFrostWalker.patch10
1 files changed, 5 insertions, 5 deletions
diff --git a/nms-patches/EnchantmentFrostWalker.patch b/nms-patches/EnchantmentFrostWalker.patch
index dafe3811..2078780d 100644
--- a/nms-patches/EnchantmentFrostWalker.patch
+++ b/nms-patches/EnchantmentFrostWalker.patch
@@ -12,19 +12,19 @@
@@ -42,8 +45,18 @@
IBlockData iblockdata1 = world.getType(blockposition_mutableblockposition1);
- if (iblockdata1.getMaterial() == Material.WATER && ((Integer) iblockdata1.get(BlockFluids.LEVEL)).intValue() == 0 && world.a(Blocks.de, blockposition_mutableblockposition1, false, EnumDirection.DOWN, (Entity) null, (ItemStack) null)) {
-- world.setTypeUpdate(blockposition_mutableblockposition1, Blocks.de.getBlockData());
-- world.a(blockposition_mutableblockposition1.h(), Blocks.de, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ if (iblockdata1.getMaterial() == Material.WATER && ((Integer) iblockdata1.get(BlockFluids.LEVEL)).intValue() == 0 && world.a(Blocks.FROSTED_ICE, blockposition_mutableblockposition1, false, EnumDirection.DOWN, (Entity) null, (ItemStack) null)) {
+- world.setTypeUpdate(blockposition_mutableblockposition1, Blocks.FROSTED_ICE.getBlockData());
+- world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
+ org.bukkit.block.BlockState blockState = world.getWorld().getBlockAt(blockposition_mutableblockposition1.getX(), blockposition_mutableblockposition1.getY(), blockposition_mutableblockposition1.getZ()).getState();
-+ blockState.setType(CraftMagicNumbers.getMaterial(Blocks.de)); // PAIL - Rename de->FROSTED_ICE
++ blockState.setType(CraftMagicNumbers.getMaterial(Blocks.FROSTED_ICE));
+
+ EntityBlockFormEvent event = new EntityBlockFormEvent(entityliving.bukkitEntity, blockState.getBlock(), blockState);
+ world.getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ blockState.update(true);
-+ world.a(blockposition_mutableblockposition1.h(), Blocks.de, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
++ world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ }
+ // CraftBukkit End
}