Paper/nms-patches/EnchantmentThorns.patch

12 lines
531 B
Diff
Raw Normal View History

2015-05-25 18:37:24 +08:00
--- a/net/minecraft/server/EnchantmentThorns.java
+++ b/net/minecraft/server/EnchantmentThorns.java
2014-12-10 12:57:27 +08:00
@@ -29,7 +29,7 @@
2015-02-27 06:41:06 +08:00
Random random = entityliving.bc();
2014-12-10 12:57:27 +08:00
ItemStack itemstack = EnchantmentManager.a(Enchantment.THORNS, entityliving);
- if (a(i, random)) {
+ if (entity != null && a(i, random)) { // CraftBukkit
2015-02-27 06:41:06 +08:00
if (entity != null) {
entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
entity.makeSound("damage.thorns", 0.5F, 1.0F);