3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 14:50:08 +01:00
Paper/nms-patches/EnchantmentThorns.patch
2019-06-21 20:00:00 +10:00

12 Zeilen
507 B
Diff

--- a/net/minecraft/server/EnchantmentThorns.java
+++ b/net/minecraft/server/EnchantmentThorns.java
@@ -34,7 +34,7 @@
Random random = entityliving.getRandom();
Entry<EnumItemSlot, ItemStack> entry = 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));
}