Skip to content

Commit 3a24768

Browse files
committed
fix server crash when respawning dragon
1 parent e0e228c commit 3a24768

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

patches/server/0005-Add-origin-location-to-EntityDamageByBlockEvent.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ index 8e18a66c45af55ef37794cb6c00f565a347c95aa..b5ad5d810dbad4609bde5f0e12249be1
1313
EntityDamageEvent event;
1414
if (damager == null) {
1515
- event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState); // Paper - add exploded state
16-
+ event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState, source.getEntity().getBukkitEntity().getLocation()); // Paper - handle block state in damage
16+
+ 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
1717
} else if (entity instanceof EnderDragon && /*PAIL FIXME ((EntityEnderDragon) entity).target == damager*/ false) {
1818
event = new EntityDamageEvent(entity.getBukkitEntity(), DamageCause.ENTITY_EXPLOSION, modifiers, modifierFunctions);
1919
} else {

0 commit comments

Comments
 (0)