2016-03-12 20:52:07 +01:00
|
|
|
--- a/net/minecraft/server/EnchantmentFrostWalker.java
|
|
|
|
+++ b/net/minecraft/server/EnchantmentFrostWalker.java
|
2018-12-06 00:00:00 +01:00
|
|
|
@@ -1,6 +1,10 @@
|
2016-03-12 20:52:07 +01:00
|
|
|
package net.minecraft.server;
|
|
|
|
|
2018-12-06 00:00:00 +01:00
|
|
|
import java.util.Iterator;
|
|
|
|
+// CraftBukkit start
|
2016-03-12 20:52:07 +01:00
|
|
|
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
|
|
|
+import org.bukkit.event.block.EntityBlockFormEvent;
|
2018-12-06 00:00:00 +01:00
|
|
|
+// CraftBukkit end
|
2016-03-12 20:52:07 +01:00
|
|
|
|
|
|
|
public class EnchantmentFrostWalker extends Enchantment {
|
2018-12-06 00:00:00 +01:00
|
|
|
|
|
|
|
@@ -42,8 +46,11 @@
|
2018-07-15 02:00:00 +02:00
|
|
|
IBlockData iblockdata2 = world.getType(blockposition_mutableblockposition1);
|
2016-03-12 20:52:07 +01:00
|
|
|
|
2018-12-06 00:00:00 +01:00
|
|
|
if (iblockdata2.getMaterial() == Material.WATER && (Integer) iblockdata2.get(BlockFluids.LEVEL) == 0 && iblockdata.canPlace(world, blockposition_mutableblockposition1) && world.a(iblockdata, (BlockPosition) blockposition_mutableblockposition1)) {
|
2018-07-15 02:00:00 +02:00
|
|
|
- world.setTypeUpdate(blockposition_mutableblockposition1, iblockdata);
|
2018-08-26 04:00:00 +02:00
|
|
|
- world.J().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
|
2018-07-15 02:00:00 +02:00
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition_mutableblockposition1, iblockdata, entityliving)) {
|
2018-08-26 04:00:00 +02:00
|
|
|
+ world.J().a(blockposition_mutableblockposition1.h(), Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
2016-03-12 20:52:07 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit End
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|