Skip to content

Commit

Permalink
feat: port 2.2.1 to 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Jun 11, 2024
1 parent 2c38d61 commit 1566c6f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
- Update to 1.20.6
- Add more options for where the button is placed (#4)
- Fix an issue with 2.2.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.jamalam360.quickerconnectbutton.mixin;

import dev.architectury.platform.Platform;
import io.github.jamalam360.quickerconnectbutton.Config.ButtonLocation;
import io.github.jamalam360.quickerconnectbutton.QuickerConnectButton;
import java.util.Objects;
Expand Down Expand Up @@ -28,6 +29,18 @@ protected TitleScreenMixin(Component component) {
super(component);
}

@Inject(
method = "init",
at = @At("HEAD")
)
private void quickerconnectbutton$init(CallbackInfo ci) {
if (Platform.isModLoaded("modmenu") && QuickerConnectButton.CONFIG.get().getButtonLocation() == ButtonLocation.REPLACE_REALMS_BUTTON) {
QuickerConnectButton.LOGGER.warn("ModMenu is installed, but the button location is set to REPLACE_REALMS_BUTTON. This will not work. Defaulting to RIGHT.");
QuickerConnectButton.CONFIG.get().buttonLocation = ButtonLocation.RIGHT;
QuickerConnectButton.CONFIG.save();
}
}

@Inject(
method = "createNormalMenuOptions",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/TitleScreen;addRenderableWidget(Lnet/minecraft/client/gui/components/events/GuiEventListener;)Lnet/minecraft/client/gui/components/events/GuiEventListener;", ordinal = 1, shift = At.Shift.BEFORE),
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
org.gradle.parallel=true
version=2.2.0+1.20.6
version=2.2.1+1.20.6
minecraft_version=1.20.6
branch=main
group=io.github.jamalam360
Expand Down

0 comments on commit 1566c6f

Please sign in to comment.