Skip to content

Commit

Permalink
Merge branch '1.20.1' into 1.19.4
Browse files Browse the repository at this point in the history
# Conflicts:
#	fabric/src/main/java/xaeroplus/fabric/mixin/client/MixinSodium6OptionsGUI.java
#	forge/src/main/java/xaeroplus/forge/XaeroPlusEmbeddiumOptionsInit.java
#	forge/src/main/java/xaeroplus/forge/mixin/client/MixinSodium6OptionsGUI.java
  • Loading branch information
rfresh2 committed Sep 27, 2024
2 parents e3f3ab9 + 0626c4c commit 687203e
Show file tree
Hide file tree
Showing 24 changed files with 2,529 additions and 2,495 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class GuiXaeroPlusChunkHighlightSettings extends GuiSettings {
public GuiXaeroPlusChunkHighlightSettings(Screen parent, Screen escapeScreen) {
super(Component.translatable("gui.xaeroplus.chunk_highlight_settings"), parent, escapeScreen);
super(Component.translatable("xaeroplus.gui.chunk_highlight_settings"), parent, escapeScreen);
this.entries = Settings.REGISTRY.getWorldmapConfigSettingEntries(SettingLocation.CHUNK_HIGHLIGHTS);
}

Expand All @@ -22,7 +22,7 @@ public void render(PoseStack guiGraphics, int par1, int par2, float par3) {

public static ScreenSwitchSettingEntry getScreenSwitchSettingEntry(Screen parent) {
return new ScreenSwitchSettingEntry(
"gui.xaeroplus.chunk_highlight_settings",
"xaeroplus.gui.chunk_highlight_settings",
GuiXaeroPlusChunkHighlightSettings::new,
null,
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class GuiXaeroPlusWorldMapSettings extends GuiSettings {

public GuiXaeroPlusWorldMapSettings(Screen parent, Screen escapeScreen) {
super(Component.translatable("gui.xaeroplus.world_map_settings"), parent, escapeScreen);
super(Component.translatable("xaeroplus.gui.world_map_settings"), parent, escapeScreen);
var mainSettingsEntries = Settings.REGISTRY.getWorldmapConfigSettingEntries(SettingLocation.WORLD_MAP_MAIN);
var chunkHighlightSettingSwitchEntry = GuiXaeroPlusChunkHighlightSettings.getScreenSwitchSettingEntry(parent);
this.entries = new ISettingEntry[mainSettingsEntries.length + 1];
Expand All @@ -30,7 +30,7 @@ public void render(PoseStack guiGraphics, int par1, int par2, float par3) {

public static ScreenSwitchSettingEntry getScreenSwitchSettingEntry(Screen parent) {
return new ScreenSwitchSettingEntry(
"gui.xaeroplus.world_map_settings",
"xaeroplus.gui.world_map_settings",
GuiXaeroPlusWorldMapSettings::new,
null,
true
Expand Down
20 changes: 10 additions & 10 deletions common/src/main/java/xaeroplus/mixin/client/MixinGuiMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ public void customInitGui(CallbackInfo ci) {
followButton = new GuiTexturedButton(0, this.dimensionToggleButton.getY() - 20, 20, 20, this.follow ? 133 : 149, 16, 16, 16,
WorldMap.guiTextures,
this::onFollowButton,
() -> new CursorBox(Component.translatable("gui.world_map.toggle_follow_mode")
.append(" " + I18n.get(this.follow ? "gui.xaeroplus.off" : "gui.xaeroplus.on"))));
() -> new CursorBox(Component.translatable("xaeroplus.gui.world_map.toggle_follow_mode")
.append(" " + I18n.get(this.follow ? "xaeroplus.gui.off" : "xaeroplus.gui.on"))));
addButton(followButton);
coordinateGotoButton = new GuiTexturedButton(0, followButton.getY() - 20 , 20, 20, 229, 16, 16, 16,
WorldMap.guiTextures,
this::onGotoCoordinatesButton,
() -> new CursorBox(Component.translatable("gui.world_map.go_to_coordinates")));
() -> new CursorBox(Component.translatable("xaeroplus.gui.world_map.go_to_coordinates")));
addButton(coordinateGotoButton);
xTextEntryField = new EditBox(Minecraft.getInstance().font, 20, coordinateGotoButton.getY() - 10, 50, 20, Component.nullToEmpty("X:"));
xTextEntryField.setVisible(false);
Expand All @@ -151,15 +151,15 @@ public void customInitGui(CallbackInfo ci) {
switchToEndButton = new GuiTexturedButton(this.width - 20, zoomInButton.getY() - 20, 20, 20, 31, 0, 16, 16,
this.xpGuiTextures,
(button -> onSwitchDimensionButton(END)),
() -> new CursorBox(Component.translatable("setting.keybinds.switch_to_end")));
() -> new CursorBox(Component.translatable("xaeroplus.keybind.switch_to_end")));
switchToOverworldButton = new GuiTexturedButton(this.width - 20, this.switchToEndButton.getY() - 20, 20, 20, 16, 0, 16, 16,
this.xpGuiTextures,
(button -> onSwitchDimensionButton(OVERWORLD)),
() -> new CursorBox(Component.translatable("setting.keybinds.switch_to_overworld")));
() -> new CursorBox(Component.translatable("xaeroplus.keybind.switch_to_overworld")));
switchToNetherButton = new GuiTexturedButton(this.width - 20, this.switchToOverworldButton.getY() - 20, 20, 20, 0, 0, 16, 16,
this.xpGuiTextures,
(button -> onSwitchDimensionButton(NETHER)),
() -> new CursorBox(Component.translatable("setting.keybinds.switch_to_nether")));
() -> new CursorBox(Component.translatable("xaeroplus.keybind.switch_to_nether")));
addButton(switchToEndButton);
addButton(switchToOverworldButton);
addButton(switchToNetherButton);
Expand Down Expand Up @@ -542,13 +542,13 @@ public void getRightClickOptionsInject(final CallbackInfoReturnable<ArrayList<Ri
int goalX = rightClickX;
int goalZ = rightClickZ;
options.addAll(3, asList(
new RightClickOption("gui.world_map.baritone_goal_here", options.size(), this) {
new RightClickOption("xaeroplus.gui.world_map.baritone_goal_here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.goal(goalX, goalZ);
}
}.setNameFormatArgs(Misc.getKeyName(Settings.REGISTRY.worldMapBaritoneGoalHereKeybindSetting.getKeyBinding())),
new RightClickOption("gui.world_map.baritone_path_here", options.size(), this) {
new RightClickOption("xaeroplus.gui.world_map.baritone_path_here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.path(goalX, goalZ);
Expand All @@ -557,7 +557,7 @@ public void onAction(Screen screen) {
));
if (BaritoneHelper.isBaritoneElytraPresent()) {
options.addAll(5, asList(
new RightClickOption("gui.world_map.baritone_elytra_here", options.size(), this) {
new RightClickOption("xaeroplus.gui.world_map.baritone_elytra_here", options.size(), this) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.elytra(goalX, goalZ);
Expand All @@ -568,7 +568,7 @@ public void onAction(Screen screen) {
}

if (Settings.REGISTRY.disableWaypointSharing.get()) {
cir.getReturnValue().removeIf(option -> ((AccessorRightClickOption) option).getName().equals("gui.xaero_right_click_map_share_location"));
cir.getReturnValue().removeIf(option -> ((AccessorRightClickOption) option).getName().equals("xaeroplus.gui.xaero_right_click_map_share_location"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public MixinGuiUpdateAll(final BooleanConsumer callback, final Component title,

@Inject(method = "init", at = @At("RETURN"), remap = true)
public void initGui(CallbackInfo ci) {
this.addRenderableWidget(Button.builder(Component.translatable("gui.xaeroplus.check_github_button"), (button -> {
this.addRenderableWidget(Button.builder(Component.translatable("xaeroplus.gui.check_github_button"), (button -> {
try {
Util.getPlatform().openUri(new URI("https://github.com/rfresh2/XaeroPlus"));
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void initGui(CallbackInfo ci) {
TOGGLE_ALL_ID,
this.width / 2 + 213,
this.height - 53,
Component.translatable("gui.waypoints.toggle_enable_all"),
Component.translatable("xaeroplus.gui.waypoints.toggle_enable_all"),
b -> {
waypointsSorted.stream().findFirst().ifPresent(firstWaypoint -> {
boolean firstIsEnabled = firstWaypoint.isDisabled();
Expand Down Expand Up @@ -113,7 +113,7 @@ public boolean charTyped(char c, int i) {
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lxaero/common/gui/ScreenBase;render(Lcom/mojang/blaze3d/vertex/PoseStack;IIF)V", shift = At.Shift.AFTER), remap = true)
public void drawScreenInject(final PoseStack guiGraphics, final int mouseX, final int mouseY, final float partial, final CallbackInfo ci) {
if (!this.searchField.isFocused() && this.searchField.getValue().isEmpty()) {
xaero.map.misc.Misc.setFieldText(this.searchField, I18n.get("gui.xaero_settings_search_placeholder", new Object[0]), -11184811);
xaero.map.misc.Misc.setFieldText(this.searchField, I18n.get("xaeroplus.gui.xaero_settings_search_placeholder", new Object[0]), -11184811);
this.searchField.moveCursorToStart();
}
this.searchField.render(guiGraphics, mouseX, mouseY, partial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void init(final Screen parent, final Screen escapeScreen, final CallbackI
var entry = entries[i];
if (entry instanceof ScreenSwitchSettingEntry screenSwitchEntry) {
var name = ((AccessorWorldMapScreenSwitchSettingEntry) screenSwitchEntry).getName();
if (name.equals("gui.xaero_wm_minimap_settings")) {
if (name.equals("xaeroplus.gui.xaero_wm_minimap_settings")) {
minimapSettingEntryIndex = i;
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ public void getRightClickOptionsReturn(final Waypoint element, final IRightClick
int goalX = element.getX();
int goalZ = element.getZ();
options.addAll(3, asList(
new RightClickOption("gui.world_map.baritone_goal_here", options.size(), target) {
new RightClickOption("xaeroplus.gui.world_map.baritone_goal_here", options.size(), target) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.goal(goalX, goalZ);
}
}.setNameFormatArgs(Misc.getKeyName(Settings.REGISTRY.worldMapBaritoneGoalHereKeybindSetting.getKeyBinding())),
new RightClickOption("gui.world_map.baritone_path_here", options.size(), target) {
new RightClickOption("xaeroplus.gui.world_map.baritone_path_here", options.size(), target) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.path(goalX, goalZ);
Expand All @@ -44,7 +44,7 @@ public void onAction(Screen screen) {
));
if (BaritoneHelper.isBaritoneElytraPresent()) {
options.addAll(5, asList(
new RightClickOption("gui.world_map.baritone_elytra_here", options.size(), target) {
new RightClickOption("xaeroplus.gui.world_map.baritone_elytra_here", options.size(), target) {
@Override
public void onAction(Screen screen) {
BaritoneExecutor.elytra(goalX, goalZ);
Expand All @@ -55,7 +55,7 @@ public void onAction(Screen screen) {
}

if (Settings.REGISTRY.disableWaypointSharing.get()) {
cir.getReturnValue().removeIf(option -> ((AccessorRightClickOption) option).getName().equals("gui.xaero_right_click_waypoint_share"));
cir.getReturnValue().removeIf(option -> ((AccessorRightClickOption) option).getName().equals("xaeroplus.gui.xaero_right_click_waypoint_share"));
}
}
}
Loading

0 comments on commit 687203e

Please sign in to comment.