Skip to content

Commit

Permalink
fix server crash when respawning dragon
Browse files Browse the repository at this point in the history
  • Loading branch information
Blast-MC committed Feb 9, 2024
1 parent e0e228c commit 3a24768
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ index 8e18a66c45af55ef37794cb6c00f565a347c95aa..b5ad5d810dbad4609bde5f0e12249be1
EntityDamageEvent event;
if (damager == null) {
- event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState); // Paper - add exploded state
+ event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState, source.getEntity().getBukkitEntity().getLocation()); // Paper - handle block state in damage
+ event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState, source.getEntity() == null ? null : source.getEntity().getBukkitEntity().getLocation()); // Paper - handle block state in damage
} else if (entity instanceof EnderDragon && /*PAIL FIXME ((EntityEnderDragon) entity).target == damager*/ false) {
event = new EntityDamageEvent(entity.getBukkitEntity(), DamageCause.ENTITY_EXPLOSION, modifiers, modifierFunctions);
} else {
Expand Down

0 comments on commit 3a24768

Please sign in to comment.