3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/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
}
}
}