aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch')
-rw-r--r--patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch b/patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch
new file mode 100644
index 0000000000..4c1e7b2549
--- /dev/null
+++ b/patches/server/0546-Added-world-settings-for-mobs-picking-up-loot.patch
@@ -0,0 +1,32 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Sat, 28 Nov 2020 18:43:52 -0800
+Subject: [PATCH] Added 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 60064770f08cbee19eeb43bf7c144b6eefbc4888..c2a26b91d9065fdb52a1ded6c3295093c244d7eb 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
++++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+@@ -150,7 +150,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
+ 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 67fe3b79b6fe4064b26f87734174a394b9e2b3e3..c84bae4aac13698893420e669ca323194e28ca48 100644
+--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
++++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+@@ -509,7 +509,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
+ if (object == null) {
+ object = new Zombie.ZombieGroupData(Zombie.getSpawnAsBabyOdds(randomsource), true);
+ }