Fix activation range config and water animal status (#12047)

This commit is contained in:
Lulu13022002
2025-01-31 13:13:14 +01:00
committed by GitHub
parent d4a957849c
commit 5bcfb12a99
2 changed files with 7 additions and 6 deletions

View File

@ -15,7 +15,7 @@ Adds villagers as separate config
diff --git a/io/papermc/paper/entity/activation/ActivationRange.java b/io/papermc/paper/entity/activation/ActivationRange.java
new file mode 100644
index 0000000000000000000000000000000000000000..bd888ef719b9bfc93bace0b1d0fb771ac659f515
index 0000000000000000000000000000000000000000..ade6110cc6adb1263c0359ff7e96e96b959e61f3
--- /dev/null
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
@@ -0,0 +1,318 @@
@ -105,10 +105,10 @@ index 0000000000000000000000000000000000000000..bd888ef719b9bfc93bace0b1d0fb771a
+ * @return boolean If it should always tick.
+ */
+ public static boolean initializeEntityActivationState(final Entity entity, final SpigotWorldConfig config) {
+ return (entity.activationType == ActivationType.MISC && config.miscActivationRange == 0)
+ || (entity.activationType == ActivationType.RAIDER && config.raiderActivationRange == 0)
+ || (entity.activationType == ActivationType.ANIMAL && config.animalActivationRange == 0)
+ || (entity.activationType == ActivationType.MONSTER && config.monsterActivationRange == 0)
+ return (entity.activationType == ActivationType.MISC && config.miscActivationRange <= 0)
+ || (entity.activationType == ActivationType.RAIDER && config.raiderActivationRange <= 0)
+ || (entity.activationType == ActivationType.ANIMAL && config.animalActivationRange <= 0)
+ || (entity.activationType == ActivationType.MONSTER && config.monsterActivationRange <= 0)
+ || (entity.activationType == ActivationType.VILLAGER && config.villagerActivationRange <= 0)
+ || (entity.activationType == ActivationType.WATER && config.waterActivationRange <= 0)
+ || (entity.activationType == ActivationType.FLYING_MONSTER && config.flyingMonsterActivationRange <= 0)