Skip to content

Commit 6103cc7

Browse files
authored
Expand mobs-can-always-pick-up-loot.zombies for husk (#13624)
1 parent d10c312 commit 6103cc7

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

paper-server/patches/sources/net/minecraft/world/entity/monster/zombie/Husk.java.patch

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,12 @@
99
}
1010

1111
return flag;
12+
@@ -86,7 +_,7 @@
13+
spawnGroupData = super.finalizeSpawn(level, difficulty, spawnReason, spawnGroupData);
14+
float specialMultiplier = difficulty.getSpecialMultiplier();
15+
if (spawnReason != EntitySpawnReason.CONVERSION) {
16+
- this.setCanPickUpLoot(random.nextFloat() < 0.55F * specialMultiplier);
17+
+ this.setCanPickUpLoot(level.getLevel().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.zombies || random.nextFloat() < 0.55F * specialMultiplier); // Paper - Add world settings for mobs picking up loot
18+
}
19+
20+
if (spawnGroupData != null) {

paper-server/patches/sources/net/minecraft/world/entity/monster/zombie/Zombie.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
float specialMultiplier = difficulty.getSpecialMultiplier();
213213
if (spawnReason != EntitySpawnReason.CONVERSION) {
214214
- this.setCanPickUpLoot(random.nextFloat() < 0.55F * specialMultiplier);
215-
+ this.setCanPickUpLoot(this.level().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.zombies || random.nextFloat() < 0.55F * specialMultiplier); // Paper - Add world settings for mobs picking up loot
215+
+ this.setCanPickUpLoot(level.getLevel().paperConfig().entities.behavior.mobsCanAlwaysPickUpLoot.zombies || random.nextFloat() < 0.55F * specialMultiplier); // Paper - Add world settings for mobs picking up loot
216216
}
217217

218218
if (spawnGroupData == null) {

0 commit comments

Comments
 (0)