Skip to content

Commit

Permalink
Fixed Desert Wolfs not dropping their equipment on death
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed May 17, 2019
1 parent 12be692 commit a039447
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,20 @@ protected ResourceLocation getLootTable() {
return AtumLootTables.DESERT_WOLF;
}

@Override
public void onDeath(@Nonnull DamageSource cause) {
super.onDeath(cause);

if (!this.world.isRemote && this.desertWolfInventory != null) {
for (int i = 0; i < this.desertWolfInventory.getSizeInventory(); ++i) {
ItemStack slotStack = this.desertWolfInventory.getStackInSlot(i);
if (!slotStack.isEmpty()) {
this.entityDropItem(slotStack, 0.0F);
}
}
}
}

@Override
public void onLivingUpdate() {
super.onLivingUpdate();
Expand Down

0 comments on commit a039447

Please sign in to comment.