Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise some Entity Brain Tasks names to better reflect their function #3992

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

falseresync
Copy link
Contributor

@falseresync falseresync commented Sep 20, 2024

Brain tasks related to Walk and Look targets have inconsistent names that sometimes poorly reflect their function as well. For example, LookAroundTask and RandomLookAroundTask are named as if they do the same thing, but one does it randomly. But actually LookAroundTask reads from LOOK_TARGET memory, while RandomLookAroundTask writes to it.

Therefore I suggest to unify task names under the following principle:

  • Tasks that update Look target should start with Look* or LookAt*
  • Tasks that update Walk target should start with Go or GoTo*
  • Tasks that update both Look and Walk targets should start with WalkTowards*
  • The current LookAroundTask that does neither of these should be renamed to UpdateLookControlTask

And the tasks that were previously named GoTo*, etc but don't update Look or Walk targets should be named in a different way, that better reflects their function too.

Additionally:

  • TemptationCooldownTask isn't used just for temptation, but to tick the RandomLookAroundTask cooldown as well, so I suggest to rename it to TickCooldownTask (and to rename it's fields and methods accordingly)
  • LookTargetUtil doesn't relate to just Look targets, but to several kinds of targets and has location utils, so I suggest to rename it to just TargetUtil

@falseresync falseresync marked this pull request as draft September 21, 2024 07:35
@falseresync falseresync marked this pull request as ready for review September 21, 2024 08:26
@Shnupbups Shnupbups added bug Fixes or discusses a bug within the mappings refactor A PR that renames existing names. snapshot A PR that targets a snapshot version of Minecraft impactful A change that is likely to affect some mods. Will require more reviews. labels Sep 21, 2024
@Shnupbups Shnupbups added the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Sep 27, 2024
Copy link
Contributor

🚀 Target branch has been updated to 24w39a

@github-actions github-actions bot changed the base branch from 24w38a to 24w39a September 27, 2024 04:06
@github-actions github-actions bot removed the update-base Add this label to a pull request to automatically change the target branch to the default branch. label Sep 27, 2024
Shnupbups
Shnupbups previously approved these changes Sep 27, 2024
@Shnupbups Shnupbups requested review from apple502j and a team September 27, 2024 04:12
@apple502j apple502j changed the base branch from 24w39a to 24w40a October 6, 2024 15:17
@apple502j apple502j dismissed Shnupbups’s stale review October 6, 2024 15:17

The base branch was changed.

@Shnupbups Shnupbups merged commit dbd154f into FabricMC:24w40a Oct 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes or discusses a bug within the mappings impactful A change that is likely to affect some mods. Will require more reviews. refactor A PR that renames existing names. snapshot A PR that targets a snapshot version of Minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants