craftbukkit/nms-patches/EnchantmentFrostWalker.patch

17 lines
1.2 KiB
Diff
Raw Normal View History

--- a/net/minecraft/server/EnchantmentFrostWalker.java
+++ b/net/minecraft/server/EnchantmentFrostWalker.java
2021-03-09 08:47:33 +11:00
@@ -46,8 +46,11 @@
2019-04-23 12:00:00 +10:00
IBlockData iblockdata2 = world.getType(blockposition1);
2019-04-23 12:00:00 +10:00
if (iblockdata2.getMaterial() == Material.WATER && (Integer) iblockdata2.get(BlockFluids.LEVEL) == 0 && iblockdata.canPlace(world, blockposition1) && world.a(iblockdata, blockposition1, VoxelShapeCollision.a())) {
- world.setTypeUpdate(blockposition1, iblockdata);
2019-05-14 10:00:00 +10:00
- world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
2019-04-23 12:00:00 +10:00
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition1, iblockdata, entityliving)) {
2019-05-14 10:00:00 +10:00
+ world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ }
+ // CraftBukkit End
}
}
}