mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
Fix crash with null thorns damager
This commit is contained in:
parent
b73cfb0f6a
commit
262c7779fe
11
nms-patches/EnchantmentThorns.patch
Normal file
11
nms-patches/EnchantmentThorns.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/EnchantmentThorns.java 2014-12-10 15:53:01.980344940 +1100
|
||||
+++ src/main/java/net/minecraft/server/EnchantmentThorns.java 2014-12-10 15:52:50.688364236 +1100
|
||||
@@ -29,7 +29,7 @@
|
||||
Random random = entityliving.bb();
|
||||
ItemStack itemstack = EnchantmentManager.a(Enchantment.THORNS, entityliving);
|
||||
|
||||
- if (a(i, random)) {
|
||||
+ if (entity != null && a(i, random)) { // CraftBukkit
|
||||
entity.damageEntity(DamageSource.a(entityliving), (float) b(i, random));
|
||||
entity.makeSound("damage.thorns", 0.5F, 1.0F);
|
||||
if (itemstack != null) {
|
Loading…
Reference in New Issue
Block a user