Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-3407: Set damager for evoker fangs
Dieser Commit ist enthalten in:
Ursprung
14b597f0c8
Commit
50b75cd65d
12
nms-patches/EntityEvokerFangs.patch
Normale Datei
12
nms-patches/EntityEvokerFangs.patch
Normale Datei
@ -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;
|
@ -520,6 +520,8 @@ public class CraftEventFactory {
|
|||||||
cause = DamageCause.FALL;
|
cause = DamageCause.FALL;
|
||||||
} else if (source == DamageSource.DRAGON_BREATH) {
|
} else if (source == DamageSource.DRAGON_BREATH) {
|
||||||
cause = DamageCause.DRAGON_BREATH;
|
cause = DamageCause.DRAGON_BREATH;
|
||||||
|
} else if (source == DamageSource.MAGIC) {
|
||||||
|
cause = DamageCause.MAGIC;
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.translationIndex));
|
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager.getHandle(), source.translationIndex));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren