mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-25 02:17:35 +01:00
[Bleeding] Fire damage is no longer a valid reason for hanging entity removal
This commit is contained in:
parent
54cce5bf92
commit
02ca9be079
@ -210,21 +210,10 @@ public abstract class EntityHanging extends Entity {
|
||||
PaintingBreakEvent paintingEvent = null;
|
||||
if (damagesource.getEntity() != null) {
|
||||
event = new HangingBreakByEntityEvent((Hanging) this.getBukkitEntity(), damagesource.getEntity() == null ? null : damagesource.getEntity().getBukkitEntity());
|
||||
} else {
|
||||
if (damagesource == DamageSource.FIRE) {
|
||||
event = new HangingBreakEvent((Hanging) this.getBukkitEntity(), HangingBreakEvent.RemoveCause.FIRE);
|
||||
}
|
||||
// TODO: Could put other stuff here?
|
||||
}
|
||||
|
||||
if (this instanceof EntityPainting) {
|
||||
// Fire old painting event until it can be removed
|
||||
if (damagesource.getEntity() != null) {
|
||||
paintingEvent = new org.bukkit.event.painting.PaintingBreakByEntityEvent((Painting) this.getBukkitEntity(), damagesource.getEntity() == null ? null : damagesource.getEntity().getBukkitEntity());
|
||||
} else {
|
||||
if (damagesource == DamageSource.FIRE) {
|
||||
paintingEvent = new PaintingBreakEvent((Painting) this.getBukkitEntity(), PaintingBreakEvent.RemoveCause.valueOf(HangingBreakEvent.RemoveCause.FIRE.name()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user