Add missing DamageCause for EntityDamageByBlockEvent (#6352)

This commit is contained in:
Jake Potrebic 2021-08-06 23:03:50 -07:00
parent 6b7f31b6ea
commit 77aea984df

View file

@ -18,3 +18,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -0,0 +0,0 @@ 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));
}