Add world settings for mobs picking up loot

This commit is contained in:
Jake Potrebic 2020-11-28 18:43:52 -08:00
parent 1245e2a0de
commit 84d13a09ca
2 changed files with 18 additions and 0 deletions

View file

@ -1,5 +1,14 @@
--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java
@@ -152,7 +152,7 @@
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);
@@ -209,7 +209,17 @@
Level world = this.level();

View file

@ -264,6 +264,15 @@
if (this.convertVillagerToZombieVillager(world, entityvillager)) {
flag = false;
@@ -468,7 +518,7 @@
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) {
@@ -496,7 +546,7 @@
entitychicken1.finalizeSpawn(world, difficulty, EntitySpawnReason.JOCKEY, (SpawnGroupData) null);
entitychicken1.setChickenJockey(true);