Fixed KillAura ignoring the passive mob age filter - #6638
Merged
Wide-Cat merged 1 commit intoSep 4, 2026
Merged
Conversation
The 26.2 update moved the age filters onto EntityAgeTest.test(), but the passive branch of entityCheck() lost its return in the process, so the result is computed and discarded and the method always falls through to return true. passive-mob-age-filter has had no effect on any ageable mob since then; the hostile branch right above it still returns correctly.
crosby-moe
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of change
Description
KillAura.entityCheck()never appliespassive-mob-age-filter. The passive branch calls the predicate and throws the result away:Execution always falls through to the trailing
return true;, so every ageable mob is accepted regardless of the setting. The hostile branch immediately above it returns its result correctly, which is whyhostile-mob-age-filterstill works.This is a regression from the 26.2 update (#6439), which moved the age logic onto
EntityAgeTest.test(). Before that commit the branch read:The
returnwas dropped in the refactor.EntityAgeTest.test()is semantically identical to the old switch, so adding thereturnback restores the original behaviour exactly.I also checked the other consumer of the enum,
AutoBreed, which uses the result correctly -KillAurais the only affected call site.Related issues
Closes #6608
How Has This Been Tested?
./gradlew compileJavapasses.The failure is deterministic and readable from the control flow: with
passive-mob-age-filterset toAdult, a baby cow reaches the discardedtest()call and thenreturn true, so it is targeted. With the fix the method returns!livingEntity.isBaby()and the baby is skipped.FrogandParrotare excluded from the branch and are unaffected either way.Checklist: