mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Per mob mob_griefing loot pickup override (#1740)
This commit is contained in:
@@ -0,0 +1,342 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peashooter101 <Peashooter101@yahoo.com>
|
||||||
|
Date: Sat, 13 Dec 2025 13:59:23 -0600
|
||||||
|
Subject: [PATCH] Per mob mob_griefing loot pickup override
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java
|
||||||
|
index 327982be3748e82a36c7a24ede989dacebfb04db..1b173556470d0f66b1c4a06384f268a910da50ad 100644
|
||||||
|
--- a/net/minecraft/world/entity/Mob.java
|
||||||
|
+++ b/net/minecraft/world/entity/Mob.java
|
||||||
|
@@ -554,7 +554,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
|
&& this.canPickUpLoot()
|
||||||
|
&& this.isAlive()
|
||||||
|
&& !this.dead
|
||||||
|
- && serverLevel.getGameRules().get(GameRules.MOB_GRIEFING, serverLevel.purpurConfig.entitiesPickUpLootMobGriefingOverride)) { // Purpur - Add mobGriefing override to everything affected
|
||||||
|
+ && serverLevel.getGameRules().get(GameRules.MOB_GRIEFING, checkEntityPickUpLootOverride())) { // Purpur - Check mobGriefing Overrides
|
||||||
|
Vec3i pickupReach = this.getPickupReach();
|
||||||
|
|
||||||
|
for (ItemEntity itemEntity : this.level()
|
||||||
|
@@ -576,6 +576,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
|
||||||
|
profilerFiller.pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ protected @Nullable Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return null;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
protected EquipmentSlot sunProtectionSlot() {
|
||||||
|
return EquipmentSlot.HEAD;
|
||||||
|
}
|
||||||
|
diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
|
index ea7666cc10aee49e13dbdd6e3367fabaa0dcbc17..8635ecfa49e2504c981dd48acbfbca5303a37611 100644
|
||||||
|
--- a/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
|
+++ b/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
|
@@ -175,6 +175,13 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS
|
||||||
|
}
|
||||||
|
// Purpur end - Configurable entity base attributes
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.allayCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected Brain.Provider<Allay> brainProvider() {
|
||||||
|
return Brain.provider(MEMORY_TYPES, SENSOR_TYPES);
|
||||||
|
diff --git a/net/minecraft/world/entity/animal/fox/Fox.java b/net/minecraft/world/entity/animal/fox/Fox.java
|
||||||
|
index f35f845e3e18c0bb0e4a076298c30be2ae479792..98937a998f55ee462421a7477cc3e2fbf4e75ba3 100644
|
||||||
|
--- a/net/minecraft/world/entity/animal/fox/Fox.java
|
||||||
|
+++ b/net/minecraft/world/entity/animal/fox/Fox.java
|
||||||
|
@@ -808,6 +808,13 @@ public class Fox extends Animal {
|
||||||
|
}
|
||||||
|
// Purpur end - Tulips change fox type
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.foxCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
// Paper start - Cancellable death event
|
||||||
|
protected org.bukkit.event.entity.EntityDeathEvent dropAllDeathLoot(ServerLevel level, DamageSource damageSource) {
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/illager/Pillager.java b/net/minecraft/world/entity/monster/illager/Pillager.java
|
||||||
|
index 68fe150d0da04084690670f29a0a4ea035e8c921..1a283185ac03ba44bae531f9b234703fa213df1a 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/illager/Pillager.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/illager/Pillager.java
|
||||||
|
@@ -104,6 +104,13 @@ public class Pillager extends AbstractIllager implements CrossbowAttackMob, Inve
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.pillagerCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void registerGoals() {
|
||||||
|
super.registerGoals();
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/illager/Vindicator.java b/net/minecraft/world/entity/monster/illager/Vindicator.java
|
||||||
|
index 367c74123ee9d07795527eec6ba2f83a9e953081..97bf22925df40a2f757b50f3fc7cbefc951443bb 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/illager/Vindicator.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/illager/Vindicator.java
|
||||||
|
@@ -96,6 +96,13 @@ public class Vindicator extends AbstractIllager {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.vindicatorCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void registerGoals() {
|
||||||
|
super.registerGoals();
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
|
index 49ed463ae7ef65b2630a5b914689e04fa729a40c..6f1c3d423b7a37aa261c78a0c8f5e1cb02eee320 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||||
|
@@ -180,6 +180,13 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.piglinCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void addAdditionalSaveData(ValueOutput output) {
|
||||||
|
super.addAdditionalSaveData(output);
|
||||||
|
@@ -462,7 +469,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean wantsToPickUp(ServerLevel level, ItemStack stack) {
|
||||||
|
- return level.getGameRules().get(GameRules.MOB_GRIEFING, level.purpurConfig.piglinMobGriefingOverride) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, stack); // Purpur - Add mobGriefing override to everything affected
|
||||||
|
+ return level.getGameRules().get(GameRules.MOB_GRIEFING, level.purpurConfig.piglinCanPickUpLoot) && this.canPickUpLoot() && PiglinAi.wantsToPickup(this, stack); // Purpur - Check mobGriefing Overrides
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean canReplaceCurrentItem(ItemStack candidate) {
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||||
|
index 7baccc23f868ac9b8720bfd77b2af6b7dd368820..91f1e6b1c916b06914c32b268b8b8c2eb3c49ce2 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/piglin/PiglinBrute.java
|
||||||
|
@@ -104,6 +104,13 @@ public class PiglinBrute extends AbstractPiglin {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.piglinBruteCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
public static AttributeSupplier.Builder createAttributes() {
|
||||||
|
return Monster.createMonsterAttributes()
|
||||||
|
.add(Attributes.MAX_HEALTH, 50.0)
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/skeleton/Bogged.java b/net/minecraft/world/entity/monster/skeleton/Bogged.java
|
||||||
|
index f1e9cec85ce911a50bb83eff9228d6b98aa00d44..59c986a28a5546a9070ec9bcf3f1994317b47fff 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/skeleton/Bogged.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/skeleton/Bogged.java
|
||||||
|
@@ -66,6 +66,13 @@ public class Bogged extends AbstractSkeleton implements Shearable {
|
||||||
|
}
|
||||||
|
// Purpur end - Configurable entity base attributes
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.boggedCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||||
|
super.defineSynchedData(builder);
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/skeleton/Skeleton.java b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
|
||||||
|
index 03e441e7e9033961dbcf60e574fae48621513c87..304e6e23a616ddc3312ef27ae5d94c927a52fb80 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/skeleton/Skeleton.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/skeleton/Skeleton.java
|
||||||
|
@@ -64,6 +64,13 @@ public class Skeleton extends AbstractSkeleton {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.skeletonCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||||
|
super.defineSynchedData(builder);
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/skeleton/Stray.java b/net/minecraft/world/entity/monster/skeleton/Stray.java
|
||||||
|
index 5cea4ff662c7136d2778b84c21f368cb5ac1c81a..262bea9ca0daba064d2e74223b47eb1fbb761479 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/skeleton/Stray.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/skeleton/Stray.java
|
||||||
|
@@ -61,6 +61,13 @@ public class Stray extends AbstractSkeleton {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.strayCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
public static boolean checkStraySpawnRules(
|
||||||
|
EntityType<Stray> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random
|
||||||
|
) {
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/skeleton/WitherSkeleton.java b/net/minecraft/world/entity/monster/skeleton/WitherSkeleton.java
|
||||||
|
index 40134013e3254c6c6ed370150adb4bda7c0f2d9a..c01f182e65b7891dfdd7b92ff2c6e2cf3a8a0374 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/skeleton/WitherSkeleton.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/skeleton/WitherSkeleton.java
|
||||||
|
@@ -73,6 +73,13 @@ public class WitherSkeleton extends AbstractSkeleton {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.witherSkeletonCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void registerGoals() {
|
||||||
|
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractPiglin.class, true));
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/zombie/Drowned.java b/net/minecraft/world/entity/monster/zombie/Drowned.java
|
||||||
|
index abafb96df26b3d987ce3ec3e1e96e8fc20cb5b6b..51e9c23436b620c32c4e5a5448fac8ae67c1dcc0 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/zombie/Drowned.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/zombie/Drowned.java
|
||||||
|
@@ -140,6 +140,13 @@ public class Drowned extends Zombie implements RangedAttackMob {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.drownedCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void addBehaviourGoals() {
|
||||||
|
this.goalSelector.addGoal(1, new Drowned.DrownedGoToWaterGoal(this, 1.0));
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/zombie/Husk.java b/net/minecraft/world/entity/monster/zombie/Husk.java
|
||||||
|
index ef289dd3fe0be980c200affb0b84a1066fe52232..d1390e0a88de89b3dc381449ef98a89b327eb4c9 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/zombie/Husk.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/zombie/Husk.java
|
||||||
|
@@ -90,6 +90,13 @@ public class Husk extends Zombie {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.huskCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public boolean isSunSensitive() {
|
||||||
|
return this.shouldBurnInDay; // Purpur - moved to LivingEntity; keep methods for ABI compatibility - API for any mob to burn daylight
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/zombie/Zombie.java b/net/minecraft/world/entity/monster/zombie/Zombie.java
|
||||||
|
index f14fc03577a94dc6bd6e536e819a32c2d6144f02..5223f68d2e20909e4df716fa86f7ad92c987a062 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/zombie/Zombie.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/zombie/Zombie.java
|
||||||
|
@@ -157,6 +157,13 @@ public class Zombie extends Monster {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.zombieCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void registerGoals() {
|
||||||
|
this.goalSelector.addGoal(0, new org.purpurmc.purpur.entity.ai.HasRider(this)); // Purpur - Ridables
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/zombie/ZombieVillager.java b/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
|
||||||
|
index a9a04a4c9cedf33b68c99b2aec12289e63fa156b..9797e206a3038c3af23495b8bfd70424e4bbd4a5 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/zombie/ZombieVillager.java
|
||||||
|
@@ -145,6 +145,13 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.zombieVillagerCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void defineSynchedData(SynchedEntityData.Builder builder) {
|
||||||
|
super.defineSynchedData(builder);
|
||||||
|
diff --git a/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java
|
||||||
|
index 528baf4ca71725d4af6876d195b6d75fdab5ca58..2d6b6bbd06d0a0443e4c32e3c9aecfe8716e1a55 100644
|
||||||
|
--- a/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java
|
||||||
|
+++ b/net/minecraft/world/entity/monster/zombie/ZombifiedPiglin.java
|
||||||
|
@@ -120,6 +120,13 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob {
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.zombifiedPiglinCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
protected void addBehaviourGoals() {
|
||||||
|
this.goalSelector.addGoal(1, new SpearUseGoal<>(this, 1.0, 1.0, 10.0F, 2.0F));
|
||||||
|
diff --git a/net/minecraft/world/entity/npc/villager/Villager.java b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||||
|
index 996468c21a79d698a8d842189ffd4f2dc86a4302..0c110421074d57e7283168c1133cd4ee314b57f6 100644
|
||||||
|
--- a/net/minecraft/world/entity/npc/villager/Villager.java
|
||||||
|
+++ b/net/minecraft/world/entity/npc/villager/Villager.java
|
||||||
|
@@ -296,6 +296,13 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
|
}
|
||||||
|
// Purpur end - Mobs always drop experience
|
||||||
|
|
||||||
|
+ // Purpur start - Check mobGriefing Overrides
|
||||||
|
+ @Override
|
||||||
|
+ protected Boolean checkEntityPickUpLootOverride() {
|
||||||
|
+ return this.level().purpurConfig.villagerCanPickUpLoot;
|
||||||
|
+ }
|
||||||
|
+ // Purpur end - Check mobGriefing Overrides
|
||||||
|
+
|
||||||
|
@Override
|
||||||
|
public Brain<Villager> getBrain() {
|
||||||
|
return (Brain<Villager>)super.getBrain();
|
||||||
|
diff --git a/net/minecraft/world/entity/raid/Raider.java b/net/minecraft/world/entity/raid/Raider.java
|
||||||
|
index b03faa7600f182a12c3a739deefc38028cf45615..60e9511bd17b6fe08009163814500ec682847fc5 100644
|
||||||
|
--- a/net/minecraft/world/entity/raid/Raider.java
|
||||||
|
+++ b/net/minecraft/world/entity/raid/Raider.java
|
||||||
|
@@ -396,7 +396,7 @@ public abstract class Raider extends PatrollingMonster {
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean cannotPickUpBanner() {
|
||||||
|
- if (!getServerLevel(this.mob).getGameRules().get(net.minecraft.world.level.gamerules.GameRules.MOB_GRIEFING, this.mob.level().purpurConfig.pillagerMobGriefingOverride)) return true; // Paper - respect game and entity rules for picking up items // Purpur - Add mobGriefing override to everything affected
|
||||||
|
+ if (!getServerLevel(this.mob).getGameRules().get(net.minecraft.world.level.gamerules.GameRules.MOB_GRIEFING, this.mob.level().purpurConfig.pillagerCanPickUpLoot)) return true; // Paper - respect game and entity rules for picking up items // Purpur - Check mobGriefing Overrides
|
||||||
|
if (!this.mob.hasActiveRaid()) {
|
||||||
|
return true;
|
||||||
|
} else if (this.mob.getCurrentRaid().isOver()) {
|
||||||
@@ -74,8 +74,8 @@ public class PurpurConfig {
|
|||||||
commands = new HashMap<>();
|
commands = new HashMap<>();
|
||||||
commands.put("purpur", new PurpurCommand("purpur"));
|
commands.put("purpur", new PurpurCommand("purpur"));
|
||||||
|
|
||||||
version = getInt("config-version", 46);
|
version = getInt("config-version", 47);
|
||||||
set("config-version", 46);
|
set("config-version", 47);
|
||||||
|
|
||||||
readConfig(PurpurConfig.class, null);
|
readConfig(PurpurConfig.class, null);
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,26 @@ public class PurpurWorldConfig {
|
|||||||
set("gameplay-mechanics.projectiles-bypass-mob-griefing", null);
|
set("gameplay-mechanics.projectiles-bypass-mob-griefing", null);
|
||||||
set("gameplay-mechanics.projectiles-mob-griefing-override", oldVal3 ? true : "default");
|
set("gameplay-mechanics.projectiles-mob-griefing-override", oldVal3 ? true : "default");
|
||||||
}
|
}
|
||||||
entitiesPickUpLootMobGriefingOverride = getBooleanOrDefault("gameplay-mechanics.entities-pick-up-loot-mob-griefing-override", entitiesPickUpLootMobGriefingOverride);
|
if (PurpurConfig.version < 47) {
|
||||||
|
boolean oldVal = getBoolean("gameplay-mechanics.entities-pick-up-loot-mob-griefing-override", false);
|
||||||
|
set("gameplay-mechanics.entities-pick-up-loot-mob-griefing-override", null);
|
||||||
|
set("mobs.allay.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.bogged.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.drowned.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.fox.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.husk.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
// mobs.piglin.can-pick-up-loot replaces mobs.piglin.mob-griefing-override
|
||||||
|
set("mobs.piglin_brute.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
// mobs.pillager.can-pick-up-loot replaces mobs.pillager.mob-griefing-override
|
||||||
|
set("mobs.skeleton.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.stray.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.villager.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.vindicator.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.wither_skeleton.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.zombie.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.zombie_villager.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
set("mobs.zombified_piglin.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
}
|
||||||
fireballsMobGriefingOverride = getBooleanOrDefault("gameplay-mechanics.fireballs-mob-griefing-override", fireballsMobGriefingOverride);
|
fireballsMobGriefingOverride = getBooleanOrDefault("gameplay-mechanics.fireballs-mob-griefing-override", fireballsMobGriefingOverride);
|
||||||
projectilesMobGriefingOverride = getBooleanOrDefault("gameplay-mechanics.projectiles-mob-griefing-override", projectilesMobGriefingOverride);
|
projectilesMobGriefingOverride = getBooleanOrDefault("gameplay-mechanics.projectiles-mob-griefing-override", projectilesMobGriefingOverride);
|
||||||
noteBlockIgnoreAbove = getBoolean("gameplay-mechanics.note-block-ignore-above", noteBlockIgnoreAbove);
|
noteBlockIgnoreAbove = getBoolean("gameplay-mechanics.note-block-ignore-above", noteBlockIgnoreAbove);
|
||||||
@@ -1269,12 +1288,14 @@ public class PurpurWorldConfig {
|
|||||||
public boolean allayControllable = true;
|
public boolean allayControllable = true;
|
||||||
public double allayMaxHealth = 20.0D;
|
public double allayMaxHealth = 20.0D;
|
||||||
public double allayScale = 1.0D;
|
public double allayScale = 1.0D;
|
||||||
|
public Boolean allayCanPickUpLoot = null;
|
||||||
private void allaySettings() {
|
private void allaySettings() {
|
||||||
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
allayRidable = getBoolean("mobs.allay.ridable", allayRidable);
|
||||||
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
allayRidableInWater = getBoolean("mobs.allay.ridable-in-water", allayRidableInWater);
|
||||||
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
allayControllable = getBoolean("mobs.allay.controllable", allayControllable);
|
||||||
allayMaxHealth = getDouble("mobs.allay.attributes.max_health", allayMaxHealth);
|
allayMaxHealth = getDouble("mobs.allay.attributes.max_health", allayMaxHealth);
|
||||||
allayScale = Mth.clamp(getDouble("mobs.allay.attributes.scale", allayScale), 0.0625D, 16.0D);
|
allayScale = Mth.clamp(getDouble("mobs.allay.attributes.scale", allayScale), 0.0625D, 16.0D);
|
||||||
|
allayCanPickUpLoot = getBooleanOrDefault("mobs.allay.can-pick-up-loot", allayCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean armadilloRidable = false;
|
public boolean armadilloRidable = false;
|
||||||
@@ -1413,12 +1434,14 @@ public class PurpurWorldConfig {
|
|||||||
public boolean boggedControllable = true;
|
public boolean boggedControllable = true;
|
||||||
public double boggedMaxHealth = 16.0D;
|
public double boggedMaxHealth = 16.0D;
|
||||||
public double boggedScale = 1.0D;
|
public double boggedScale = 1.0D;
|
||||||
|
public Boolean boggedCanPickUpLoot = null;
|
||||||
private void boggedSettings() {
|
private void boggedSettings() {
|
||||||
boggedRidable = getBoolean("mobs.bogged.ridable", boggedRidable);
|
boggedRidable = getBoolean("mobs.bogged.ridable", boggedRidable);
|
||||||
boggedRidableInWater = getBoolean("mobs.bogged.ridable-in-water", boggedRidableInWater);
|
boggedRidableInWater = getBoolean("mobs.bogged.ridable-in-water", boggedRidableInWater);
|
||||||
boggedControllable = getBoolean("mobs.bogged.controllable", boggedControllable);
|
boggedControllable = getBoolean("mobs.bogged.controllable", boggedControllable);
|
||||||
boggedMaxHealth = getDouble("mobs.bogged.attributes.max_health", boggedMaxHealth);
|
boggedMaxHealth = getDouble("mobs.bogged.attributes.max_health", boggedMaxHealth);
|
||||||
boggedScale = Mth.clamp(getDouble("mobs.bogged.attributes.scale", boggedScale), 0.0625D, 16.0D);
|
boggedScale = Mth.clamp(getDouble("mobs.bogged.attributes.scale", boggedScale), 0.0625D, 16.0D);
|
||||||
|
boggedCanPickUpLoot = getBooleanOrDefault("mobs.bogged.can-pick-up-loot", boggedCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean camelRidableInWater = false;
|
public boolean camelRidableInWater = false;
|
||||||
@@ -1732,6 +1755,7 @@ public class PurpurWorldConfig {
|
|||||||
public boolean drownedTakeDamageFromWater = false;
|
public boolean drownedTakeDamageFromWater = false;
|
||||||
public boolean drownedBreakDoors = false;
|
public boolean drownedBreakDoors = false;
|
||||||
public boolean drownedAlwaysDropExp = false;
|
public boolean drownedAlwaysDropExp = false;
|
||||||
|
public Boolean drownedCanPickUpLoot = null;
|
||||||
private void drownedSettings() {
|
private void drownedSettings() {
|
||||||
drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable);
|
drownedRidable = getBoolean("mobs.drowned.ridable", drownedRidable);
|
||||||
drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater);
|
drownedRidableInWater = getBoolean("mobs.drowned.ridable-in-water", drownedRidableInWater);
|
||||||
@@ -1750,6 +1774,7 @@ public class PurpurWorldConfig {
|
|||||||
drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater);
|
drownedTakeDamageFromWater = getBoolean("mobs.drowned.takes-damage-from-water", drownedTakeDamageFromWater);
|
||||||
drownedBreakDoors = getBoolean("mobs.drowned.can-break-doors", drownedBreakDoors);
|
drownedBreakDoors = getBoolean("mobs.drowned.can-break-doors", drownedBreakDoors);
|
||||||
drownedAlwaysDropExp = getBoolean("mobs.drowned.always-drop-exp", drownedAlwaysDropExp);
|
drownedAlwaysDropExp = getBoolean("mobs.drowned.always-drop-exp", drownedAlwaysDropExp);
|
||||||
|
drownedCanPickUpLoot = getBooleanOrDefault("mobs.drowned.can-pick-up-loot", drownedCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean elderGuardianRidable = false;
|
public boolean elderGuardianRidable = false;
|
||||||
@@ -1918,6 +1943,7 @@ public class PurpurWorldConfig {
|
|||||||
public Boolean foxMobGriefingOverride = null;
|
public Boolean foxMobGriefingOverride = null;
|
||||||
public boolean foxTakeDamageFromWater = false;
|
public boolean foxTakeDamageFromWater = false;
|
||||||
public boolean foxAlwaysDropExp = false;
|
public boolean foxAlwaysDropExp = false;
|
||||||
|
public Boolean foxCanPickUpLoot = null;
|
||||||
private void foxSettings() {
|
private void foxSettings() {
|
||||||
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
|
foxRidable = getBoolean("mobs.fox.ridable", foxRidable);
|
||||||
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
|
foxRidableInWater = getBoolean("mobs.fox.ridable-in-water", foxRidableInWater);
|
||||||
@@ -1939,6 +1965,7 @@ public class PurpurWorldConfig {
|
|||||||
foxMobGriefingOverride = getBooleanOrDefault("mobs.fox.mob-griefing-override", foxMobGriefingOverride);
|
foxMobGriefingOverride = getBooleanOrDefault("mobs.fox.mob-griefing-override", foxMobGriefingOverride);
|
||||||
foxTakeDamageFromWater = getBoolean("mobs.fox.takes-damage-from-water", foxTakeDamageFromWater);
|
foxTakeDamageFromWater = getBoolean("mobs.fox.takes-damage-from-water", foxTakeDamageFromWater);
|
||||||
foxAlwaysDropExp = getBoolean("mobs.fox.always-drop-exp", foxAlwaysDropExp);
|
foxAlwaysDropExp = getBoolean("mobs.fox.always-drop-exp", foxAlwaysDropExp);
|
||||||
|
foxCanPickUpLoot = getBooleanOrDefault("mobs.fox.can-pick-up-loot", foxCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean frogRidable = false;
|
public boolean frogRidable = false;
|
||||||
@@ -2167,6 +2194,7 @@ public class PurpurWorldConfig {
|
|||||||
public boolean huskJockeyTryExistingChickens = true;
|
public boolean huskJockeyTryExistingChickens = true;
|
||||||
public boolean huskTakeDamageFromWater = false;
|
public boolean huskTakeDamageFromWater = false;
|
||||||
public boolean huskAlwaysDropExp = false;
|
public boolean huskAlwaysDropExp = false;
|
||||||
|
public Boolean huskCanPickUpLoot = null;
|
||||||
private void huskSettings() {
|
private void huskSettings() {
|
||||||
huskRidable = getBoolean("mobs.husk.ridable", huskRidable);
|
huskRidable = getBoolean("mobs.husk.ridable", huskRidable);
|
||||||
huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater);
|
huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater);
|
||||||
@@ -2184,6 +2212,7 @@ public class PurpurWorldConfig {
|
|||||||
huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens);
|
huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens);
|
||||||
huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater);
|
huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater);
|
||||||
huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp);
|
huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp);
|
||||||
|
huskCanPickUpLoot = getBooleanOrDefault("mobs.husk.can-pick-up-loot", huskCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean illusionerRidable = false;
|
public boolean illusionerRidable = false;
|
||||||
@@ -2557,12 +2586,12 @@ public class PurpurWorldConfig {
|
|||||||
public boolean piglinControllable = true;
|
public boolean piglinControllable = true;
|
||||||
public double piglinMaxHealth = 16.0D;
|
public double piglinMaxHealth = 16.0D;
|
||||||
public double piglinScale = 1.0D;
|
public double piglinScale = 1.0D;
|
||||||
public Boolean piglinMobGriefingOverride = null;
|
|
||||||
public boolean piglinTakeDamageFromWater = false;
|
public boolean piglinTakeDamageFromWater = false;
|
||||||
public int piglinPortalSpawnModifier = 2000;
|
public int piglinPortalSpawnModifier = 2000;
|
||||||
public boolean piglinAlwaysDropExp = false;
|
public boolean piglinAlwaysDropExp = false;
|
||||||
public double piglinHeadVisibilityPercent = 0.5D;
|
public double piglinHeadVisibilityPercent = 0.5D;
|
||||||
public boolean piglinIgnoresArmorWithGoldTrim = false;
|
public boolean piglinIgnoresArmorWithGoldTrim = false;
|
||||||
|
public Boolean piglinCanPickUpLoot = null;
|
||||||
private void piglinSettings() {
|
private void piglinSettings() {
|
||||||
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
||||||
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
||||||
@@ -2579,12 +2608,17 @@ public class PurpurWorldConfig {
|
|||||||
set("mobs.piglin.bypass-mob-griefing", null);
|
set("mobs.piglin.bypass-mob-griefing", null);
|
||||||
set("mobs.piglin.mob-griefing-override", oldVal ? true : "default");
|
set("mobs.piglin.mob-griefing-override", oldVal ? true : "default");
|
||||||
}
|
}
|
||||||
piglinMobGriefingOverride = getBooleanOrDefault("mobs.piglin.mob-griefing-override", piglinMobGriefingOverride);
|
|
||||||
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
|
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
|
||||||
piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
|
piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
|
||||||
piglinAlwaysDropExp = getBoolean("mobs.piglin.always-drop-exp", piglinAlwaysDropExp);
|
piglinAlwaysDropExp = getBoolean("mobs.piglin.always-drop-exp", piglinAlwaysDropExp);
|
||||||
piglinHeadVisibilityPercent = getDouble("mobs.piglin.head-visibility-percent", piglinHeadVisibilityPercent);
|
piglinHeadVisibilityPercent = getDouble("mobs.piglin.head-visibility-percent", piglinHeadVisibilityPercent);
|
||||||
piglinIgnoresArmorWithGoldTrim = getBoolean("mobs.piglin.ignores-armor-with-gold-trim", piglinIgnoresArmorWithGoldTrim);
|
piglinIgnoresArmorWithGoldTrim = getBoolean("mobs.piglin.ignores-armor-with-gold-trim", piglinIgnoresArmorWithGoldTrim);
|
||||||
|
if (PurpurConfig.version < 47) {
|
||||||
|
boolean oldVal = getBoolean("mobs.piglin.mob-griefing-override", false);
|
||||||
|
set("mobs.piglin.mob-griefing-override", null);
|
||||||
|
set("mobs.piglin.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
}
|
||||||
|
piglinCanPickUpLoot = getBooleanOrDefault("mobs.piglin.can-pick-up-loot", piglinCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean piglinBruteRidable = false;
|
public boolean piglinBruteRidable = false;
|
||||||
@@ -2594,6 +2628,7 @@ public class PurpurWorldConfig {
|
|||||||
public double piglinBruteScale = 1.0D;
|
public double piglinBruteScale = 1.0D;
|
||||||
public boolean piglinBruteTakeDamageFromWater = false;
|
public boolean piglinBruteTakeDamageFromWater = false;
|
||||||
public boolean piglinBruteAlwaysDropExp = false;
|
public boolean piglinBruteAlwaysDropExp = false;
|
||||||
|
public Boolean piglinBruteCanPickUpLoot = null;
|
||||||
private void piglinBruteSettings() {
|
private void piglinBruteSettings() {
|
||||||
piglinBruteRidable = getBoolean("mobs.piglin_brute.ridable", piglinBruteRidable);
|
piglinBruteRidable = getBoolean("mobs.piglin_brute.ridable", piglinBruteRidable);
|
||||||
piglinBruteRidableInWater = getBoolean("mobs.piglin_brute.ridable-in-water", piglinBruteRidableInWater);
|
piglinBruteRidableInWater = getBoolean("mobs.piglin_brute.ridable-in-water", piglinBruteRidableInWater);
|
||||||
@@ -2607,6 +2642,7 @@ public class PurpurWorldConfig {
|
|||||||
piglinBruteScale = Mth.clamp(getDouble("mobs.piglin_brute.attributes.scale", piglinBruteScale), 0.0625D, 16.0D);
|
piglinBruteScale = Mth.clamp(getDouble("mobs.piglin_brute.attributes.scale", piglinBruteScale), 0.0625D, 16.0D);
|
||||||
piglinBruteTakeDamageFromWater = getBoolean("mobs.piglin_brute.takes-damage-from-water", piglinBruteTakeDamageFromWater);
|
piglinBruteTakeDamageFromWater = getBoolean("mobs.piglin_brute.takes-damage-from-water", piglinBruteTakeDamageFromWater);
|
||||||
piglinBruteAlwaysDropExp = getBoolean("mobs.piglin_brute.always-drop-exp", piglinBruteAlwaysDropExp);
|
piglinBruteAlwaysDropExp = getBoolean("mobs.piglin_brute.always-drop-exp", piglinBruteAlwaysDropExp);
|
||||||
|
piglinBruteCanPickUpLoot = getBooleanOrDefault("mobs.piglin_brute.can-pick-up-loot", piglinBruteCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean pillagerRidable = false;
|
public boolean pillagerRidable = false;
|
||||||
@@ -2614,9 +2650,9 @@ public class PurpurWorldConfig {
|
|||||||
public boolean pillagerControllable = true;
|
public boolean pillagerControllable = true;
|
||||||
public double pillagerMaxHealth = 24.0D;
|
public double pillagerMaxHealth = 24.0D;
|
||||||
public double pillagerScale = 1.0D;
|
public double pillagerScale = 1.0D;
|
||||||
public Boolean pillagerMobGriefingOverride = null;
|
|
||||||
public boolean pillagerTakeDamageFromWater = false;
|
public boolean pillagerTakeDamageFromWater = false;
|
||||||
public boolean pillagerAlwaysDropExp = false;
|
public boolean pillagerAlwaysDropExp = false;
|
||||||
|
public Boolean pillagerCanPickUpLoot = null;
|
||||||
private void pillagerSettings() {
|
private void pillagerSettings() {
|
||||||
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
|
pillagerRidable = getBoolean("mobs.pillager.ridable", pillagerRidable);
|
||||||
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
|
pillagerRidableInWater = getBoolean("mobs.pillager.ridable-in-water", pillagerRidableInWater);
|
||||||
@@ -2633,9 +2669,14 @@ public class PurpurWorldConfig {
|
|||||||
set("mobs.pillager.bypass-mob-griefing", null);
|
set("mobs.pillager.bypass-mob-griefing", null);
|
||||||
set("mobs.pillager.mob-griefing-override", oldVal ? true : "default");
|
set("mobs.pillager.mob-griefing-override", oldVal ? true : "default");
|
||||||
}
|
}
|
||||||
pillagerMobGriefingOverride = getBooleanOrDefault("mobs.pillager.mob-griefing-override", pillagerMobGriefingOverride);
|
|
||||||
pillagerTakeDamageFromWater = getBoolean("mobs.pillager.takes-damage-from-water", pillagerTakeDamageFromWater);
|
pillagerTakeDamageFromWater = getBoolean("mobs.pillager.takes-damage-from-water", pillagerTakeDamageFromWater);
|
||||||
pillagerAlwaysDropExp = getBoolean("mobs.pillager.always-drop-exp", pillagerAlwaysDropExp);
|
pillagerAlwaysDropExp = getBoolean("mobs.pillager.always-drop-exp", pillagerAlwaysDropExp);
|
||||||
|
if (PurpurConfig.version < 47) {
|
||||||
|
boolean oldVal = getBoolean("mobs.pillager.mob-griefing-override", false);
|
||||||
|
set("mobs.pillager.mob-griefing-override", null);
|
||||||
|
set("mobs.pillager.can-pick-up-loot", oldVal ? true : "default");
|
||||||
|
}
|
||||||
|
pillagerCanPickUpLoot = getBooleanOrDefault("mobs.pillager.can-pick-up-loot", pillagerCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean polarBearRidable = false;
|
public boolean polarBearRidable = false;
|
||||||
@@ -2921,6 +2962,7 @@ public class PurpurWorldConfig {
|
|||||||
public int skeletonFeedWitherRoses = 0;
|
public int skeletonFeedWitherRoses = 0;
|
||||||
public String skeletonBowAccuracy = "14 - difficulty * 4";
|
public String skeletonBowAccuracy = "14 - difficulty * 4";
|
||||||
public Map<Integer, Float> skeletonBowAccuracyMap = new HashMap<>();
|
public Map<Integer, Float> skeletonBowAccuracyMap = new HashMap<>();
|
||||||
|
public Boolean skeletonCanPickUpLoot = null;
|
||||||
private void skeletonSettings() {
|
private void skeletonSettings() {
|
||||||
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
|
skeletonRidable = getBoolean("mobs.skeleton.ridable", skeletonRidable);
|
||||||
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
|
skeletonRidableInWater = getBoolean("mobs.skeleton.ridable-in-water", skeletonRidableInWater);
|
||||||
@@ -2948,6 +2990,7 @@ public class PurpurWorldConfig {
|
|||||||
}
|
}
|
||||||
skeletonBowAccuracyMap.put(i, divergence);
|
skeletonBowAccuracyMap.put(i, divergence);
|
||||||
}
|
}
|
||||||
|
skeletonCanPickUpLoot = getBooleanOrDefault("mobs.skeleton.can-pick-up-loot", skeletonCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean skeletonHorseRidable = false;
|
public boolean skeletonHorseRidable = false;
|
||||||
@@ -3118,6 +3161,7 @@ public class PurpurWorldConfig {
|
|||||||
public double strayScale = 1.0D;
|
public double strayScale = 1.0D;
|
||||||
public boolean strayTakeDamageFromWater = false;
|
public boolean strayTakeDamageFromWater = false;
|
||||||
public boolean strayAlwaysDropExp = false;
|
public boolean strayAlwaysDropExp = false;
|
||||||
|
public Boolean strayCanPickUpLoot = null;
|
||||||
private void straySettings() {
|
private void straySettings() {
|
||||||
strayRidable = getBoolean("mobs.stray.ridable", strayRidable);
|
strayRidable = getBoolean("mobs.stray.ridable", strayRidable);
|
||||||
strayRidableInWater = getBoolean("mobs.stray.ridable-in-water", strayRidableInWater);
|
strayRidableInWater = getBoolean("mobs.stray.ridable-in-water", strayRidableInWater);
|
||||||
@@ -3131,6 +3175,7 @@ public class PurpurWorldConfig {
|
|||||||
strayScale = Mth.clamp(getDouble("mobs.stray.attributes.scale", strayScale), 0.0625D, 16.0D);
|
strayScale = Mth.clamp(getDouble("mobs.stray.attributes.scale", strayScale), 0.0625D, 16.0D);
|
||||||
strayTakeDamageFromWater = getBoolean("mobs.stray.takes-damage-from-water", strayTakeDamageFromWater);
|
strayTakeDamageFromWater = getBoolean("mobs.stray.takes-damage-from-water", strayTakeDamageFromWater);
|
||||||
strayAlwaysDropExp = getBoolean("mobs.stray.always-drop-exp", strayAlwaysDropExp);
|
strayAlwaysDropExp = getBoolean("mobs.stray.always-drop-exp", strayAlwaysDropExp);
|
||||||
|
strayCanPickUpLoot = getBooleanOrDefault("mobs.stray.can-pick-up-loot", strayCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean striderRidable = false;
|
public boolean striderRidable = false;
|
||||||
@@ -3295,6 +3340,7 @@ public class PurpurWorldConfig {
|
|||||||
public int villagerSpawnIronGolemLimit = 0;
|
public int villagerSpawnIronGolemLimit = 0;
|
||||||
public int villagerAcquirePoiSearchRadius = 48;
|
public int villagerAcquirePoiSearchRadius = 48;
|
||||||
public int villagerNearestBedSensorSearchRadius = 48;
|
public int villagerNearestBedSensorSearchRadius = 48;
|
||||||
|
public Boolean villagerCanPickUpLoot = null;
|
||||||
private void villagerSettings() {
|
private void villagerSettings() {
|
||||||
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
|
villagerRidable = getBoolean("mobs.villager.ridable", villagerRidable);
|
||||||
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
|
villagerRidableInWater = getBoolean("mobs.villager.ridable-in-water", villagerRidableInWater);
|
||||||
@@ -3340,6 +3386,7 @@ public class PurpurWorldConfig {
|
|||||||
villagerSpawnIronGolemLimit = getInt("mobs.villager.spawn-iron-golem.limit", villagerSpawnIronGolemLimit);
|
villagerSpawnIronGolemLimit = getInt("mobs.villager.spawn-iron-golem.limit", villagerSpawnIronGolemLimit);
|
||||||
villagerAcquirePoiSearchRadius = getInt("mobs.villager.search-radius.acquire-poi", villagerAcquirePoiSearchRadius);
|
villagerAcquirePoiSearchRadius = getInt("mobs.villager.search-radius.acquire-poi", villagerAcquirePoiSearchRadius);
|
||||||
villagerNearestBedSensorSearchRadius = getInt("mobs.villager.search-radius.nearest-bed-sensor", villagerNearestBedSensorSearchRadius);
|
villagerNearestBedSensorSearchRadius = getInt("mobs.villager.search-radius.nearest-bed-sensor", villagerNearestBedSensorSearchRadius);
|
||||||
|
villagerCanPickUpLoot = getBooleanOrDefault("mobs.villager.can-pick-up-loot", villagerCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean vindicatorRidable = false;
|
public boolean vindicatorRidable = false;
|
||||||
@@ -3350,6 +3397,7 @@ public class PurpurWorldConfig {
|
|||||||
public double vindicatorJohnnySpawnChance = 0D;
|
public double vindicatorJohnnySpawnChance = 0D;
|
||||||
public boolean vindicatorTakeDamageFromWater = false;
|
public boolean vindicatorTakeDamageFromWater = false;
|
||||||
public boolean vindicatorAlwaysDropExp = false;
|
public boolean vindicatorAlwaysDropExp = false;
|
||||||
|
public Boolean vindicatorCanPickUpLoot = null;
|
||||||
private void vindicatorSettings() {
|
private void vindicatorSettings() {
|
||||||
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
vindicatorRidable = getBoolean("mobs.vindicator.ridable", vindicatorRidable);
|
||||||
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
vindicatorRidableInWater = getBoolean("mobs.vindicator.ridable-in-water", vindicatorRidableInWater);
|
||||||
@@ -3364,6 +3412,7 @@ public class PurpurWorldConfig {
|
|||||||
vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
vindicatorJohnnySpawnChance = getDouble("mobs.vindicator.johnny.spawn-chance", vindicatorJohnnySpawnChance);
|
||||||
vindicatorTakeDamageFromWater = getBoolean("mobs.vindicator.takes-damage-from-water", vindicatorTakeDamageFromWater);
|
vindicatorTakeDamageFromWater = getBoolean("mobs.vindicator.takes-damage-from-water", vindicatorTakeDamageFromWater);
|
||||||
vindicatorAlwaysDropExp = getBoolean("mobs.vindicator.always-drop-exp", vindicatorAlwaysDropExp);
|
vindicatorAlwaysDropExp = getBoolean("mobs.vindicator.always-drop-exp", vindicatorAlwaysDropExp);
|
||||||
|
vindicatorCanPickUpLoot = getBooleanOrDefault("mobs.vindicator.can-pick-up-loot", vindicatorCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean wanderingTraderRidable = false;
|
public boolean wanderingTraderRidable = false;
|
||||||
@@ -3481,6 +3530,7 @@ public class PurpurWorldConfig {
|
|||||||
public double witherSkeletonScale = 1.0D;
|
public double witherSkeletonScale = 1.0D;
|
||||||
public boolean witherSkeletonTakeDamageFromWater = false;
|
public boolean witherSkeletonTakeDamageFromWater = false;
|
||||||
public boolean witherSkeletonAlwaysDropExp = false;
|
public boolean witherSkeletonAlwaysDropExp = false;
|
||||||
|
public Boolean witherSkeletonCanPickUpLoot = null;
|
||||||
private void witherSkeletonSettings() {
|
private void witherSkeletonSettings() {
|
||||||
witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable);
|
witherSkeletonRidable = getBoolean("mobs.wither_skeleton.ridable", witherSkeletonRidable);
|
||||||
witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater);
|
witherSkeletonRidableInWater = getBoolean("mobs.wither_skeleton.ridable-in-water", witherSkeletonRidableInWater);
|
||||||
@@ -3494,6 +3544,7 @@ public class PurpurWorldConfig {
|
|||||||
witherSkeletonScale = Mth.clamp(getDouble("mobs.wither_skeleton.attributes.scale", witherSkeletonScale), 0.0625D, 16.0D);
|
witherSkeletonScale = Mth.clamp(getDouble("mobs.wither_skeleton.attributes.scale", witherSkeletonScale), 0.0625D, 16.0D);
|
||||||
witherSkeletonTakeDamageFromWater = getBoolean("mobs.wither_skeleton.takes-damage-from-water", witherSkeletonTakeDamageFromWater);
|
witherSkeletonTakeDamageFromWater = getBoolean("mobs.wither_skeleton.takes-damage-from-water", witherSkeletonTakeDamageFromWater);
|
||||||
witherSkeletonAlwaysDropExp = getBoolean("mobs.wither_skeleton.always-drop-exp", witherSkeletonAlwaysDropExp);
|
witherSkeletonAlwaysDropExp = getBoolean("mobs.wither_skeleton.always-drop-exp", witherSkeletonAlwaysDropExp);
|
||||||
|
witherSkeletonCanPickUpLoot = getBooleanOrDefault("mobs.wither_skeleton.can-pick-up-loot", witherSkeletonCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean wolfRidable = false;
|
public boolean wolfRidable = false;
|
||||||
@@ -3566,6 +3617,7 @@ public class PurpurWorldConfig {
|
|||||||
public boolean zombieTakeDamageFromWater = false;
|
public boolean zombieTakeDamageFromWater = false;
|
||||||
public boolean zombieAlwaysDropExp = false;
|
public boolean zombieAlwaysDropExp = false;
|
||||||
public double zombieHeadVisibilityPercent = 0.5D;
|
public double zombieHeadVisibilityPercent = 0.5D;
|
||||||
|
public Boolean zombieCanPickUpLoot = null;
|
||||||
private void zombieSettings() {
|
private void zombieSettings() {
|
||||||
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
|
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
|
||||||
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
|
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
|
||||||
@@ -3591,6 +3643,7 @@ public class PurpurWorldConfig {
|
|||||||
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
|
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
|
||||||
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);
|
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);
|
||||||
zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent);
|
zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent);
|
||||||
|
zombieCanPickUpLoot = getBooleanOrDefault("mobs.zombie.can-pick-up-loot", zombieCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean zombieHorseRidable = false;
|
public boolean zombieHorseRidable = false;
|
||||||
@@ -3655,6 +3708,7 @@ public class PurpurWorldConfig {
|
|||||||
public int zombieVillagerCuringTimeMax = 6000;
|
public int zombieVillagerCuringTimeMax = 6000;
|
||||||
public boolean zombieVillagerCureEnabled = true;
|
public boolean zombieVillagerCureEnabled = true;
|
||||||
public boolean zombieVillagerAlwaysDropExp = false;
|
public boolean zombieVillagerAlwaysDropExp = false;
|
||||||
|
public Boolean zombieVillagerCanPickUpLoot = null;
|
||||||
private void zombieVillagerSettings() {
|
private void zombieVillagerSettings() {
|
||||||
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
|
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
|
||||||
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
|
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
|
||||||
@@ -3675,6 +3729,7 @@ public class PurpurWorldConfig {
|
|||||||
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);
|
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);
|
||||||
zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled);
|
zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled);
|
||||||
zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp);
|
zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp);
|
||||||
|
zombieVillagerCanPickUpLoot = getBooleanOrDefault("mobs.zombie_villager.can-pick-up-loot", zombieVillagerCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean zombifiedPiglinRidable = false;
|
public boolean zombifiedPiglinRidable = false;
|
||||||
@@ -3689,6 +3744,7 @@ public class PurpurWorldConfig {
|
|||||||
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = false;
|
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = false;
|
||||||
public boolean zombifiedPiglinTakeDamageFromWater = false;
|
public boolean zombifiedPiglinTakeDamageFromWater = false;
|
||||||
public boolean zombifiedPiglinAlwaysDropExp = false;
|
public boolean zombifiedPiglinAlwaysDropExp = false;
|
||||||
|
public Boolean zombifiedPiglinCanPickUpLoot = null;
|
||||||
private void zombifiedPiglinSettings() {
|
private void zombifiedPiglinSettings() {
|
||||||
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
|
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
|
||||||
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
|
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
|
||||||
@@ -3710,6 +3766,7 @@ public class PurpurWorldConfig {
|
|||||||
zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry);
|
zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry);
|
||||||
zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater);
|
zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater);
|
||||||
zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp);
|
zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp);
|
||||||
|
zombifiedPiglinCanPickUpLoot = getBooleanOrDefault("mobs.zombified_piglin.can-pick-up-loot", zombifiedPiglinCanPickUpLoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float hungerStarvationDamage = 1.0F;
|
public float hungerStarvationDamage = 1.0F;
|
||||||
|
|||||||
Reference in New Issue
Block a user