3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

Add missing DamageCause for EntityDamageByBlockEvent (#6352)

Dieser Commit ist enthalten in:
Jake Potrebic 2021-08-06 23:03:50 -07:00 committet von GitHub
Ursprung a178fb895e
Commit 4a2f53c6e8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -18,3 +18,18 @@ index 2519a0f511f0a6065459cd2fe2d9a3e68e55d222..2c334ce3fc3cf86704dee9397166119a
}
super.entityInside(state, world, pos, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index d01d4ca873f8225d3503ecb102ce2eb7bfced421..622a0f23db838b839f76722df0e5480ec927b4a2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1009,6 +1009,10 @@ public class CraftEventFactory {
cause = DamageCause.HOT_FLOOR;
} else if (source == DamageSource.MAGIC) {
cause = DamageCause.MAGIC;
+ // Paper start
+ } else if (source == DamageSource.IN_FIRE) {
+ cause = DamageCause.FIRE;
+ // Paper end
} else {
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, damager, source.msgId));
}