From 5f607a9d3be34964eebb79c7b6755cafa956fc3b Mon Sep 17 00:00:00 2001 From: Daniel Saukel Date: Mon, 24 Jan 2022 01:11:30 +0100 Subject: [PATCH] Make sure mobs are alive before setting drop chances; resolves #1080 --- core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java b/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java index f51444af..be78a06e 100644 --- a/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java +++ b/core/src/main/java/de/erethon/dungeonsxl/mob/DMob.java @@ -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);