3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-22 14:28:09 +01:00
Paper/nms-patches/EnchantmentThorns.patch

12 Zeilen
640 B
Diff

2015-02-26 23:41:06 +01:00
--- /home/matt/mc-dev-private//net/minecraft/server/EnchantmentThorns.java 2015-02-26 22:40:22.463608141 +0000
+++ src/main/java/net/minecraft/server/EnchantmentThorns.java 2015-02-26 22:40:22.463608141 +0000
2014-12-10 05:57:27 +01:00
@@ -29,7 +29,7 @@
2015-02-26 23:41:06 +01:00
Random random = entityliving.bc();
2014-12-10 05:57:27 +01:00
ItemStack itemstack = EnchantmentManager.a(Enchantment.THORNS, entityliving);
- if (a(i, random)) {
+ if (entity != null && a(i, random)) { // CraftBukkit
2015-02-26 23:41:06 +01:00
if (entity != null) {
entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
entity.makeSound("damage.thorns", 0.5F, 1.0F);