Added option to not drop experience for instant kills.

This commit is contained in:
Brianna 2019-06-29 21:04:48 -04:00
parent 1afaa03ca0
commit 04b0e21e53
2 changed files with 4 additions and 1 deletions

View File

@ -168,7 +168,7 @@ public class EntityStack {
EntityDamageEvent.DamageCause cause = lastDamageCause.getCause();
for (String s : reasons) {
if (!cause.name().equalsIgnoreCase(s)) continue;
handleWholeStackDeath(killed, items, droppedExp);
handleWholeStackDeath(killed, items, Setting.NO_EXP_INSTANT_KILL.getBoolean() ? 0 : droppedExp);
return;
}
}

View File

@ -60,6 +60,9 @@ public enum Setting {
"FALLING_BLOCK, THORNS, DRAGON_BREATH, CUSTOM",
"FLY_INTO_WALL, HOT_FLOOR, CRAMMING, DRYOUT"),
NO_EXP_INSTANT_KILL("Entities.No Exp For Instant Kills", false,
"Should no experience be dropped when an instant kill is performed?"),
STACK_CHECKS("Entities.Stack Checks", Arrays.asList(Check.values()).stream()
.filter(Check::isEnabledByDefault).map(Check::name).collect(Collectors.toList()),
"These are checks that are processed before an entity is stacked.",