mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
31 lines
2.4 KiB
Diff
31 lines
2.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentFrostWalker.java
|
|
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentFrostWalker.java
|
|
@@ -15,7 +15,7 @@
|
|
|
|
public class EnchantmentFrostWalker extends Enchantment
|
|
{
|
|
- public EnchantmentFrostWalker(Enchantment.Rarity rarityIn, EntityEquipmentSlot... slots)
|
|
+ public EnchantmentFrostWalker(Rarity rarityIn, EntityEquipmentSlot... slots)
|
|
{
|
|
super(rarityIn, EnumEnchantmentType.ARMOR_FEET, slots);
|
|
this.setName("frostWalker");
|
|
@@ -59,10 +59,15 @@
|
|
{
|
|
IBlockState iblockstate1 = worldIn.getBlockState(blockpos$mutableblockpos1);
|
|
|
|
- if (iblockstate1.getMaterial() == Material.WATER && ((Integer)iblockstate1.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.mayPlace(Blocks.FROSTED_ICE, blockpos$mutableblockpos1, false, EnumFacing.DOWN, (Entity)null))
|
|
+ if (iblockstate1.getMaterial() == Material.WATER && (iblockstate1.getBlock() == Blocks.WATER || iblockstate1.getBlock() == Blocks.FLOWING_WATER) && ((Integer)iblockstate1.getValue(BlockLiquid.LEVEL)).intValue() == 0 && worldIn.mayPlace(Blocks.FROSTED_ICE, blockpos$mutableblockpos1, false, EnumFacing.DOWN, (Entity)null))
|
|
{
|
|
- worldIn.setBlockState(blockpos$mutableblockpos1, Blocks.FROSTED_ICE.getDefaultState());
|
|
- worldIn.scheduleUpdate(blockpos$mutableblockpos1.toImmutable(), Blocks.FROSTED_ICE, MathHelper.getInt(living.getRNG(), 60, 120));
|
|
+ // CraftBukkit Start - Call EntityBlockFormEvent for Frost Walker
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldIn, blockpos$mutableblockpos1, Blocks.FROSTED_ICE.getDefaultState(), living)) {
|
|
+ worldIn.scheduleUpdate(blockpos$mutableblockpos1.toImmutable(), Blocks.FROSTED_ICE, MathHelper.getInt(living.getRNG(), 60, 120));
|
|
+ }
|
|
+ // CraftBukkit End
|
|
+ // worldIn.setBlockState(blockpos$mutableblockpos1, Blocks.FROSTED_ICE.getDefaultState());
|
|
+ // worldIn.scheduleUpdate(blockpos$mutableblockpos1.toImmutable(), Blocks.FROSTED_ICE, MathHelper.getInt(living.getRNG(), 60, 120));
|
|
}
|
|
}
|
|
}
|