Skip to content

Ported AI Goals to 26.1.x#2650

Open
albazavr-alba wants to merge 20 commits into
TeamTwilight:latestfrom
albazavr-alba:port-ai-goals
Open

Ported AI Goals to 26.1.x#2650
albazavr-alba wants to merge 20 commits into
TeamTwilight:latestfrom
albazavr-alba:port-ai-goals

Conversation

@albazavr-alba

Copy link
Copy Markdown

No description provided.

Comment thread src/main/java/twilightforest/entity/ai/goal/LichPopMobsGoal.java
Comment thread src/main/java/twilightforest/entity/ai/goal/ThrowRiderGoal.java
@albazavr-alba
albazavr-alba requested a review from a6tumn June 25, 2026 12:00
@LightgraycaAT

Copy link
Copy Markdown

I think snapTo in 26.1 is equal to moveTo in 1.21.1 though, at least in methods like Entity.copyPosition.

@a6tumn

a6tumn commented Jun 25, 2026

Copy link
Copy Markdown

I think snapTo in 26.1 is equal to moveTo in 1.21.1 though, at least in methods like Entity.copyPosition.

I was able to compare the decompiled source code and this is correct. Let's go with snapTo() for those two cases.

Comment thread src/main/java/twilightforest/entity/ai/goal/LichMinionsGoal.java Outdated

@a6tumn a6tumn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See LightgraycaAT's suggestion regarding the projectile movement and other new comments/questions.

@albazavr-alba
albazavr-alba requested a review from a6tumn June 26, 2026 08:32
Comment thread src/main/java/twilightforest/entity/ai/goal/LichMinionsGoal.java Outdated
Comment thread src/main/java/twilightforest/entity/ai/goal/LichMinionsGoal.java Outdated
@albazavr-alba
albazavr-alba requested a review from a6tumn July 5, 2026 01:34
Comment thread src/main/java/twilightforest/entity/ai/goal/PhantomThrowWeaponGoal.java Outdated
@LightgraycaAT

Copy link
Copy Markdown

maybe cast check is unnecessary since Mob.serverAiStep() and Goal.getServerLevel() also do such cast.

@a6tumn

a6tumn commented Jul 20, 2026

Copy link
Copy Markdown

By the way, there is a getServerlLevel(...) method available in the Goal classes that can take a Level or Entity. This is probably a better option than casting everywhere(even if it is safe). It does cast internally, but it is what Mojang would prefer to be used and you never know if they will change the implementation to add any additional guards or logging.

@a6tumn a6tumn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very close to being ready, see my previous comment for requested changes.

@albazavr-alba
albazavr-alba requested a review from a6tumn July 20, 2026 17:48
Comment thread src/main/java/twilightforest/entity/ai/goal/BreathAttackGoal.java Outdated
@albazavr-alba
albazavr-alba requested a review from a6tumn July 20, 2026 18:02
Comment thread src/main/java/twilightforest/entity/ai/goal/LichMinionsGoal.java Outdated
Comment thread src/main/java/twilightforest/entity/ai/goal/NagaMovementPattern.java Outdated
@albazavr-alba
albazavr-alba requested a review from a6tumn July 20, 2026 20:13

@a6tumn a6tumn left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for addressing my comments, that will be all from me.

@albazavr-alba

Copy link
Copy Markdown
Author

Thank you for addressing my comments, that will be all from me.

Thank you for your time and attention!

Comment thread src/main/java/twilightforest/entity/ai/goal/BreathAttackGoal.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants