Skip to content

Commit

Permalink
Update 0005-Add-origin-location-to-EntityDamageByBlockEvent.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Blast-MC authored Jan 8, 2024
1 parent 127dae4 commit 358a8af
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 7f0c6e9d8ffb1126ac8dbf8c8c8c8888b5f2506c..fdbff121810d46cd6896558863cc6317
EntityDamageEvent event;
if (damager == null) {
- event = new EntityDamageByBlockEvent(null, entity.getBukkitEntity(), DamageCause.BLOCK_EXPLOSION, modifiers, modifierFunctions, source.explodedBlockState); // Paper - handle block state in damage
+ 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 358a8af

Please sign in to comment.