mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Implement DamageCause#CAMPFIRE and minor improvement in exception for Unhandled block damage
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
eed041d629
commit
9c115e8fae
1 changed files with 3 additions and 1 deletions
|
@ -989,8 +989,10 @@ public class CraftEventFactory {
|
|||
cause = DamageCause.MAGIC;
|
||||
} else if (source.is(DamageTypes.IN_FIRE)) {
|
||||
cause = DamageCause.FIRE;
|
||||
} else if (source.is(DamageTypes.CAMPFIRE)) {
|
||||
cause = DamageCause.CAMPFIRE;
|
||||
} else {
|
||||
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId()));
|
||||
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s [%s]", entity, source.getDirectBlock(), source.getMsgId(), source.typeHolder().getRegisteredName()));
|
||||
}
|
||||
return callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue