Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/EnchantmentFrostWalker.patch
2019-06-21 20:00:00 +10:00

28 Zeilen
1.5 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 {
@@ -46,8 +50,11 @@
IBlockData iblockdata2 = world.getType(blockposition1);
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);
- world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition1, iblockdata, entityliving)) {
+ world.getBlockTickList().a(blockposition1, Blocks.FROSTED_ICE, MathHelper.nextInt(entityliving.getRandom(), 60, 120));
+ }
+ // CraftBukkit End
}
}
}