SPIGOT-3407: Set damager for evoker fangs

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2017-07-08 22:40:54 +10:00
parent 0353512d03
commit e626522be7
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
--- a/net/minecraft/server/EntityEvokerFangs.java
+++ b/net/minecraft/server/EntityEvokerFangs.java
@@ -108,7 +108,9 @@
if (entityliving.isAlive() && !entityliving.be() && entityliving != entityliving1) {
if (entityliving1 == null) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = this; // CraftBukkit
entityliving.damageEntity(DamageSource.MAGIC, 6.0F);
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
} else {
if (entityliving1.r(entityliving)) {
return;