-
Bug
-
Resolution: Unresolved
-
None
-
24w39a, 1.21.4, 25w06a
-
None
-
Confirmed
-
Mob behaviour
Steps to reproduce
Use this setup.
Code analysis
The logic is flipped when checking the game rule.
Minecraft 24w38a, official mappings
net/minecraft/world/entity/animal/goat/GoatAi.java
public class GoatAi { // ... private static final TargetingConditions RAM_TARGET_CONDITIONS = TargetingConditions.forCombat() .selector( $$0 -> !$$0.getType().equals(EntityType.GOAT) && ($$0.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || !$$0.getType().equals(EntityType.ARMOR_STAND)) && $$0.level().getWorldBorder().isWithinBounds($$0.getBoundingBox()) ); // ... }
Minecraft 24w39a, official mappings
net/minecraft/world/entity/animal/goat/GoatAi.java
public class GoatAi { // ... private static final TargetingConditions RAM_TARGET_CONDITIONS = TargetingConditions.forCombat() .selector( ($$0, $$1) -> !$$0.getType().equals(EntityType.GOAT) && (!$$1.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || !$$0.getType().equals(EntityType.ARMOR_STAND)) && $$1.getWorldBorder().isWithinBounds($$0.getBoundingBox()) ); // ... }