mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 09:58:00 +01:00
28 lines
1.6 KiB
Diff
28 lines
1.6 KiB
Diff
--- a/net/minecraft/server/EnchantmentFrostWalker.java
|
|
+++ b/net/minecraft/server/EnchantmentFrostWalker.java
|
|
@@ -1,6 +1,10 @@
|
|
package net.minecraft.server;
|
|
|
|
import java.util.Iterator;
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
|
+import org.bukkit.event.block.EntityBlockFormEvent;
|
|
+// CraftBukkit end
|
|
|
|
public class EnchantmentFrostWalker extends Enchantment {
|
|
|
|
@@ -42,8 +46,11 @@
|
|
IBlockData iblockdata2 = world.getType(blockposition_mutableblockposition1);
|
|
|
|
if (iblockdata2.getMaterial() == Material.WATER && (Integer) iblockdata2.get(BlockFluids.LEVEL) == 0 && iblockdata.canPlace(world, blockposition_mutableblockposition1) && world.a(iblockdata, (BlockPosition) blockposition_mutableblockposition1)) {
|
|
- world.setTypeUpdate(blockposition_mutableblockposition1, iblockdata);
|
|
- world.getBlockTickList().a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
|
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition_mutableblockposition1, iblockdata, entityliving)) {
|
|
+ world.getBlockTickList().a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
|
+ }
|
|
+ // CraftBukkit End
|
|
}
|
|
}
|
|
}
|