From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Fri, 24 Apr 2020 09:33:11 -0500 Subject: [PATCH] Entities pick up loot bypass mob-griefing gamerule diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java index 3936741bb8c1b3ad766d651e4bb8c9f5ddbe4f08..ac6460d261014bb4b9878c96e4b447f7a471752d 100644 --- a/src/main/java/net/minecraft/server/EntityInsentient.java +++ b/src/main/java/net/minecraft/server/EntityInsentient.java @@ -546,7 +546,7 @@ public abstract class EntityInsentient extends EntityLiving { public void movementTick() { super.movementTick(); this.world.getMethodProfiler().enter("looting"); - if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { + if (!this.world.isClientSide && this.canPickupLoot() && this.isAlive() && !this.killed && (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) || world.purpurConfig.entitiesPickUpLootBypassMobGriefing)) { // Purpur List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D)); Iterator iterator = list.iterator(); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java index 236b4f51ea805c671b905c1b081538b67cee7f57..2fae60a6fd767cc6d0aed7a6241ba5a6bf05eaca 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -113,10 +113,12 @@ public class PurpurWorldConfig { } public boolean disableDropsOnCrammingDeath = false; + public boolean entitiesPickUpLootBypassMobGriefing = false; public boolean milkCuresBadOmen = true; public double tridentLoyaltyVoidReturnHeight = 0.0D; private void miscGameplayMechanicsSettings() { disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath); + entitiesPickUpLootBypassMobGriefing = getBoolean("gameplay-mechanics.entities-pick-up-loot-bypass-mob-griefing", entitiesPickUpLootBypassMobGriefing); milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen); tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight); }