-
Notifications
You must be signed in to change notification settings - Fork 2
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
1.20.3/4 support #7
Conversation
xGab0
commented
Dec 7, 2023
- updated Minecraft to 1.20.3/4
- updated Fabric loader to 0.15.0
- updated Gradle to 8.5
- imports cleanup
- fixed a mixin
- updated Minecraft to 1.20.3/4 - updated Fabric loader to 0.15.0 - updated Gradle to 8.5 - imports cleanup - fixed a mixin
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.
Overall looks good aside from some small issues.
@Shadow public abstract void onSoundPlayed(SoundInstance sound, WeightedSoundSet soundSet); | ||
@Shadow public abstract void onSoundPlayed(SoundInstance sound, WeightedSoundSet soundSet, float range); | ||
|
||
@Inject(method = "onSoundPlayed", at = @At("HEAD"), cancellable = true) | ||
private void onSoundPlayedHandler(SoundInstance sound, WeightedSoundSet soundSet, CallbackInfo ci) { | ||
private void onSoundPlayedHandler(SoundInstance sound, WeightedSoundSet soundSet, float range, CallbackInfo ci) { | ||
if (!this.client.isOnThread()) { | ||
ci.cancel(); | ||
this.client.execute(() -> this.onSoundPlayed(sound, soundSet)); | ||
this.client.execute(() -> this.onSoundPlayed(sound, soundSet, range)); |
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.
This breaks backward-compatibility for versions earlier than 1.20.3.
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'm not sure what to do here, from my understanding this Mixin is required for mc1.20.3+ since Mojang changed the method to pass a range field, otherwise the game will crash.