Skip to content

Commit

Permalink
Merge pull request #133 from GittuMC/1.20.1
Browse files Browse the repository at this point in the history
Fix ender dragon scale drop from player explosion
  • Loading branch information
AlphaMode authored Jun 9, 2024
2 parents 0c35d0f + 876eabc commit dbb6525
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ static float enderDragonDamage(DamageSource source, LivingEntity entity, float a
if (entity.getType() == EntityType.ENDER_DRAGON && amount > 0 && !entity.level().isClientSide) {
// player caused explosion, end crystals and TNT are examples
// DamageSource source = event.getSource();
if (source.is(DamageTypes.EXPLOSION) && source.getEntity() != null && source.getEntity().getType() == EntityType.PLAYER) {
if (source.is(DamageTypes.PLAYER_EXPLOSION) && source.getEntity() != null && source.getEntity().getType() == EntityType.PLAYER) {
// drops 1 - 8 scales
ModifierUtil.dropItem(entity, new ItemStack(TinkerModifiers.dragonScale, 1 + entity.level().random.nextInt(8)));
}
Expand Down

0 comments on commit dbb6525

Please sign in to comment.