mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 17:17:13 +01:00
32 lines
2.3 KiB
Diff
32 lines
2.3 KiB
Diff
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
|
|
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 4ea7a6bd6fdc98bef30546e19e2676a78fb29007..ef525e5f523966c9af7380e8d09ff5092e56e7c5 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
|
|
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 5371ddc75a371a273b5697e620503da9d23e3fbf..065b615a1df475a3285d328a8c5113e8d72c33ed 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
@@ -514,7 +514,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);
|
|
}
|