mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
33 lines
2.3 KiB
Diff
33 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] Add 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 8f63e27d904abb33492daf627d48d33d1193deef..723a098eabcc632caeb096f39c90e4e0581edc35 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(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);
|
|
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 c182bdcc5da5652f8b34b4cb8d28651cf79009fe..34e46a64b3638f749a571d080fd8e7ac1f57edba 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
|
@@ -518,7 +518,7 @@ public class Zombie extends Monster {
|
|
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) {
|