From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 28 Nov 2020 18:43:52 -0800 Subject: [PATCH] Add world settings for mobs picking up loot diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java index dadb419a04b343d6ba59353c6caa1a50aa07b67f..117d466e1b4f545f6fd5006c3822c5586db96032 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java @@ -153,7 +153,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo this.populateDefaultEquipmentSlots(randomsource, difficulty); this.populateDefaultEquipmentEnchantments(randomsource, difficulty); this.reassessWeaponGoal(); - this.setCanPickUpLoot(randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); + this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot if (this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) { LocalDate localdate = LocalDate.now(); int i = localdate.get(ChronoField.DAY_OF_MONTH); diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java index 67aaa688b4db0c4304699fdd983730cdb4a68058..a0cd226d4f5c700c84604527ddde35466c7654bb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -507,7 +507,7 @@ public class Zombie extends Monster { Object object = super.finalizeSpawn(world, difficulty, spawnReason, entityData, entityNbt); float f = difficulty.getSpecialMultiplier(); - this.setCanPickUpLoot(randomsource.nextFloat() < 0.55F * f); + this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.zombies || randomsource.nextFloat() < 0.55F * f); // Paper - Add world settings for mobs picking up loot if (object == null) { object = new Zombie.ZombieGroupData(Zombie.getSpawnAsBabyOdds(randomsource), true); }