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
|
|
|
|
2019-06-21 12:00:00 +02:00
|
|
|
@@ -46,8 +50,11 @@
|
2019-04-23 04:00:00 +02:00
|
|
|
IBlockData iblockdata2 = world.getType(blockposition1);
|
2016-03-12 20:52:07 +01:00
|
|
|
|
2019-04-23 04:00:00 +02: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 02:00:00 +02:00
|
|
|
- world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
2016-03-12 20:52:07 +01:00
|
|
|
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
|
2019-04-23 04:00:00 +02:00
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition1, iblockdata, entityliving)) {
|
2019-05-14 02:00:00 +02:00
|
|
|
+ world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
|
2016-03-12 20:52:07 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit End
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|