Skip to content

Commit

Permalink
Fix for issue #87 (Creepers not dropping music discs when killed by s…
Browse files Browse the repository at this point in the history
…keletons)
  • Loading branch information
AleksandarHaralanov committed Aug 22, 2024
1 parent 6387193 commit 17bac66
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 17bac66

Please sign in to comment.