From 84d13a09ca5e07d0ff749ead81257dc308a4e71b 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 --- .../world/entity/monster/AbstractSkeleton.java.patch | 9 +++++++++ .../net/minecraft/world/entity/monster/Zombie.java.patch | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch index 8bbdfd179d..284a199f12 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch @@ -1,5 +1,14 @@ --- a/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java +@@ -152,7 +152,7 @@ + this.populateDefaultEquipmentSlots(randomsource, difficulty); + this.populateDefaultEquipmentEnchantments(world, 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); @@ -209,7 +209,17 @@ Level world = this.level(); diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch index 1eab402247..a465244d15 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch @@ -264,6 +264,15 @@ if (this.convertVillagerToZombieVillager(world, entityvillager)) { flag = false; +@@ -468,7 +518,7 @@ + float f = difficulty.getSpecialMultiplier(); + + if (spawnReason != EntitySpawnReason.CONVERSION) { +- 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) { @@ -496,7 +546,7 @@ entitychicken1.finalizeSpawn(world, difficulty, EntitySpawnReason.JOCKEY, (SpawnGroupData) null); entitychicken1.setChickenJockey(true);