@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/server/EnchantmentFrostWalker.java
|
||||
+++ b/net/minecraft/server/EnchantmentFrostWalker.java
|
||||
@@ -46,8 +46,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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/EnchantmentWeaponDamage.java
|
||||
+++ b/net/minecraft/server/EnchantmentWeaponDamage.java
|
||||
@@ -51,7 +51,7 @@
|
||||
if (this.a == 2 && entityliving1.getMonsterType() == EnumMonsterType.ARTHROPOD) {
|
||||
int j = 20 + entityliving.getRandom().nextInt(10 * i);
|
||||
|
||||
- entityliving1.addEffect(new MobEffect(MobEffects.SLOWER_MOVEMENT, j, 3));
|
||||
+ entityliving1.addEffect(new MobEffect(MobEffects.SLOWER_MOVEMENT, j, 3), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- a/net/minecraft/server/Enchantments.java
|
||||
+++ b/net/minecraft/server/Enchantments.java
|
||||
@@ -42,7 +42,15 @@
|
||||
public static final Enchantment MENDING = a("mending", new EnchantmentMending(Enchantment.Rarity.RARE, EnumItemSlot.values()));
|
||||
public static final Enchantment VANISHING_CURSE = a("vanishing_curse", new EnchantmentVanishing(Enchantment.Rarity.VERY_RARE, EnumItemSlot.values()));
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ static {
|
||||
+ for (Object enchantment : IRegistry.ENCHANTMENT) {
|
||||
+ org.bukkit.enchantments.Enchantment.registerEnchantment(new org.bukkit.craftbukkit.enchantments.CraftEnchantment((Enchantment) enchantment));
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
private static Enchantment a(String s, Enchantment enchantment) {
|
||||
- return (Enchantment) IRegistry.a(IRegistry.ENCHANTMENT, s, (Object) enchantment);
|
||||
+ return (Enchantment) IRegistry.a(IRegistry.ENCHANTMENT, s, enchantment); // CraftBukkit - decompile error
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user