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

@@ -4,6 +4,7 @@ import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.FlyingMob;
import net.minecraft.world.entity.PathfinderMob;
import net.minecraft.world.entity.ambient.AmbientCreature;
import net.minecraft.world.entity.animal.AgeableWaterCreature;
import net.minecraft.world.entity.animal.WaterAnimal;
import net.minecraft.world.entity.monster.Enemy;
import net.minecraft.world.entity.npc.Villager;
@@ -28,7 +29,7 @@ public enum ActivationType {
* @return activation type
*/
public static ActivationType activationTypeFor(final Entity entity) {
if (entity instanceof WaterAnimal) {
if (entity instanceof WaterAnimal || entity instanceof AgeableWaterCreature) {
return ActivationType.WATER;
} else if (entity instanceof Villager) {
return ActivationType.VILLAGER;