summaryrefslogtreecommitdiffstats
path: root/nms-patches/EnchantmentThorns.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/EnchantmentThorns.patch')
-rw-r--r--nms-patches/EnchantmentThorns.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/nms-patches/EnchantmentThorns.patch b/nms-patches/EnchantmentThorns.patch
index 1329a104..82ffbcd9 100644
--- a/nms-patches/EnchantmentThorns.patch
+++ b/nms-patches/EnchantmentThorns.patch
@@ -1,11 +1,11 @@
--- a/net/minecraft/server/EnchantmentThorns.java
+++ b/net/minecraft/server/EnchantmentThorns.java
@@ -29,7 +29,7 @@
- Random random = entityliving.bc();
- ItemStack itemstack = EnchantmentManager.a(Enchantment.THORNS, entityliving);
+ Random random = entityliving.getRandom();
+ ItemStack itemstack = EnchantmentManager.b(Enchantments.THORNS, entityliving);
- if (a(i, random)) {
+ if (entity != null && a(i, random)) { // CraftBukkit
if (entity != null) {
entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
- entity.makeSound("damage.thorns", 0.5F, 1.0F);
+ }