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

1.20.3/4 support #7

Merged
merged 4 commits into from
Dec 10, 2023
Merged

1.20.3/4 support #7

merged 4 commits into from
Dec 10, 2023

Conversation

xGab0
Copy link
Contributor

@xGab0 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
Copy link
Collaborator

@ishland ishland left a 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.

Comment on lines -19 to +25
@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));
Copy link
Collaborator

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.

Copy link
Contributor Author

@xGab0 xGab0 Dec 8, 2023

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.

build.gradle Outdated Show resolved Hide resolved
gradle.properties Outdated Show resolved Hide resolved
@ishland ishland merged commit 95af694 into RelativityMC:master Dec 10, 2023
4 checks passed
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.

2 participants