2016-03-12 20:52:07 +01:00
|
|
|
--- a/net/minecraft/server/EnchantmentFrostWalker.java
|
|
|
|
+++ b/net/minecraft/server/EnchantmentFrostWalker.java
|
|
|
|
@@ -1,5 +1,8 @@
|
|
|
|
package net.minecraft.server;
|
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
|
|
|
+import org.bukkit.event.block.EntityBlockFormEvent;
|
|
|
|
+
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
|
|
|
public class EnchantmentFrostWalker extends Enchantment {
|
2016-12-09 02:45:21 +01:00
|
|
|
@@ -42,8 +45,11 @@
|
2016-03-12 20:52:07 +01:00
|
|
|
IBlockData iblockdata1 = world.getType(blockposition_mutableblockposition1);
|
|
|
|
|
2016-11-17 02:41:03 +01:00
|
|
|
if (iblockdata1.getMaterial() == Material.WATER && ((Integer) iblockdata1.get(BlockFluids.LEVEL)).intValue() == 0 && world.a(Blocks.FROSTED_ICE, blockposition_mutableblockposition1, false, EnumDirection.DOWN, (Entity) null)) {
|
2016-05-10 13:47:39 +02:00
|
|
|
- world.setTypeUpdate(blockposition_mutableblockposition1, Blocks.FROSTED_ICE.getBlockData());
|
|
|
|
- world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
2016-03-12 20:52:07 +01:00
|
|
|
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
|
2016-12-09 02:45:21 +01:00
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition_mutableblockposition1, Blocks.FROSTED_ICE, entityliving)) {
|
2016-05-10 13:47:39 +02:00
|
|
|
+ world.a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
2016-03-12 20:52:07 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit End
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|