Make sure mobs are alive before setting drop chances; resolves #1080

This commit is contained in:
Daniel Saukel 2022-01-24 01:11:30 +01:00
parent a5ddd04771
commit 5f607a9d3b
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@ public class DMob implements DungeonMob {
this.entity = entity;
this.type = type != null ? type : VanillaMob.get(entity.getType());
if (this.type != VanillaMob.PLAYER && !getDrops(gameWorld.getDungeon().getRules().getState(GameRule.MOB_ITEM_DROPS))) {
if (this.type.getSpecies().isAlive() && this.type != VanillaMob.PLAYER && !getDrops(gameWorld.getDungeon().getRules().getState(GameRule.MOB_ITEM_DROPS))) {
entity.getEquipment().setHelmetDropChance(0);
entity.getEquipment().setChestplateDropChance(0);
entity.getEquipment().setLeggingsDropChance(0);