mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Add missing DamageCause for EntityDamageByBlockEvent (#6352)
This commit is contained in:
parent
6b7f31b6ea
commit
77aea984df
1 changed files with 15 additions and 0 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue