2022-06-09 10:51:45 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sat, 28 Nov 2020 18:43:52 -0800
2024-01-19 22:13:42 +01:00
Subject: [PATCH] Add world settings for mobs picking up loot
2022-06-09 10:51:45 +02:00
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
2024-04-24 15:46:45 +02:00
index a19a51a40d69ad71b85b2e7e8b4cfab6d8343196..7013f1b76311a11fb7e2543ab1e792479ecad610 100644
2022-06-09 10:51:45 +02:00
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
2024-04-24 15:46:45 +02:00
@@ -145,7 +145,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
2022-06-09 10:51:45 +02:00
this.populateDefaultEquipmentSlots(randomsource, difficulty);
this.populateDefaultEquipmentEnchantments(randomsource, difficulty);
this.reassessWeaponGoal();
- this.setCanPickUpLoot(randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier());
2024-01-19 22:13:42 +01:00
+ this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.skeletons || randomsource.nextFloat() < 0.55F * difficulty.getSpecialMultiplier()); // Paper - Add world settings for mobs picking up loot
2022-06-09 10:51:45 +02:00
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
2024-04-25 06:38:28 +02:00
index bb3c46c9faaf300f7c755c3b8316434e51d0c408..18b147c9488e8dffd25da139ff4c9d2197d72616 100644
2022-06-09 10:51:45 +02:00
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
2024-04-24 15:46:45 +02:00
@@ -498,7 +498,7 @@ public class Zombie extends Monster {
Object object = super.finalizeSpawn(world, difficulty, spawnReason, entityData);
2022-06-09 10:51:45 +02:00
float f = difficulty.getSpecialMultiplier();
- this.setCanPickUpLoot(randomsource.nextFloat() < 0.55F * f);
2024-01-19 22:13:42 +01:00
+ this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.zombies || randomsource.nextFloat() < 0.55F * f); // Paper - Add world settings for mobs picking up loot
2022-06-09 10:51:45 +02:00
if (object == null) {
object = new Zombie.ZombieGroupData(Zombie.getSpawnAsBabyOdds(randomsource), true);
}