-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Replace RunAroundLikeCrazyGoalMixin::tick overwrite with injects #4151
Conversation
This should be easy to change to just use redirects instead and avoid the overwrite? |
Yea the reason i was even working on this is because I'm rewriting it like that since the overwrite is conflicting with Architechtury API on fabric. I can update this PR with the rewritten version once I finish that after dinner if wanted. |
We would like to get rid of overwrites as much as possible. |
@@ -42,6 +43,8 @@ | |||
@Mixin(Goal.class) | |||
public abstract class GoalMixin implements GoalBridge { | |||
|
|||
@Shadow protected abstract int adjustedTickDelay(int $$0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend explicitly naming the method shadowed shadow$adjustedTickDelay
so it's clearer
There we go now it's replacing the overwrites with injects instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added few nits, other than that LGTM.
Thank you again, these are very much appreciated :)
...va/org/spongepowered/common/mixin/core/world/entity/ai/goal/RunAroundLikeCrazyGoalMixin.java
Outdated
Show resolved
Hide resolved
...va/org/spongepowered/common/mixin/core/world/entity/ai/goal/RunAroundLikeCrazyGoalMixin.java
Outdated
Show resolved
Hide resolved
There you go :) |
Updated another outdated overwrite that I noticed while working on Loofah.