-
Notifications
You must be signed in to change notification settings - Fork 18
Feature: FreeLook Module #127
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
Conversation
| } | ||
|
|
||
| init { | ||
| previousPerspective = MinecraftClient.getInstance().options.perspective |
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.
You might as well use the mc property in Lambda
| object FreeLook : Module( | ||
| name = "FreeLook", | ||
| description = "Allows you to look around freely while moving", | ||
| defaultTags = setOf(com.lambda.module.tag.ModuleTag.RENDER, com.lambda.module.tag.ModuleTag.MOVEMENT) |
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.
You can import the enum instead of using the full canonical path
|
|
||
| @ModifyArgs(method = "update", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/Camera;setRotation(FF)V")) | ||
| private void onUpdateSetRotationArgs(Args args) { | ||
| if (FreeLook.INSTANCE.isEnabled()) { | ||
| args.set(0, FreeLook.INSTANCE.getCamera().getYawF()); | ||
| args.set(1, FreeLook.INSTANCE.getCamera().getPitchF()); | ||
| } | ||
| } |
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.
Could you add a snippet of the modified method ? Check other mixins for an example
This is crucial for mixin updates on new versions
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.
Do you mean the original source?
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.
Yes, look at other mixins for an example
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.
Will do
emyfops
left a comment
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.
lgtm @Avanatiker what do you think
|
Btw this merges into 1.21.5. But I think 1.21.4 is main atm? Can probably back port easily. |
1.21.5 is main |
a91d23d to
04802dc
Compare
FreeLook Module
Has some extra settings for more advanced use