From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 3 Jul 2019 23:58:31 -0500 Subject: [PATCH] Disable loot drops on death by cramming diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java index 71eb28891941f28bc3bcf065bf734d3fb6e8e88a..95e1fa6fa3327e1ea3553128806befccd02828a0 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1700,8 +1700,10 @@ public abstract class LivingEntity extends Entity { this.dropEquipment(); // CraftBukkit - from below if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { + if (!(source == DamageSource.CRAMMING && level.purpurConfig.disableDropsOnCrammingDeath)) { // Purpur this.dropFromLootTable(source, flag); this.dropCustomDeathLoot(source, i, flag); + } // Purpur } // CraftBukkit start - Call death event org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java index 8b8bf5e62dd702a8e92c95eba8b7603bc48f80dc..9037c9d52bacc4ecf4cf40908120299f36d6d008 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -73,6 +73,11 @@ public class PurpurWorldConfig { armorstandStepHeight = (float) getDouble("gameplay-mechanics.armorstand.step-height", armorstandStepHeight); } + public boolean disableDropsOnCrammingDeath = false; + private void miscGameplayMechanicsSettings() { + disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath); + } + public double minecartMaxSpeed = 0.4D; public boolean minecartPlaceAnywhere = false; public boolean minecartControllable = false;