Skip to content

Commit

Permalink
Merge pull request #104 from AleksandarHaralanov/master
Browse files Browse the repository at this point in the history
Fix for issue #87 (Creepers not dropping music discs when killed by skeletons)
  • Loading branch information
moderatorman authored Aug 22, 2024
2 parents 5703be6 + 17bac66 commit 54aad06
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/net/minecraft/server/EntityCreeper.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ protected String i() {

public void die(Entity entity) {
super.die(entity);
if (entity instanceof EntitySkeleton) {
this.b(Item.GOLD_RECORD.id + this.random.nextInt(2), 1);
if (entity instanceof EntityArrow) {
EntityLiving shooter = ((EntityArrow) entity).shooter;
if (shooter instanceof EntitySkeleton) {
this.b(Item.GOLD_RECORD.id + this.random.nextInt(2), 1);
}
}
}

Expand Down

0 comments on commit 54aad06

Please sign in to comment.