Skip to content

Commit

Permalink
remove one of two keybinds that does the same thing : "Switch between…
Browse files Browse the repository at this point in the history
… Day/Night/Caves" (#33)
  • Loading branch information
Alexdoru authored Aug 25, 2024
1 parent 4df49f8 commit 6c82a24
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
8 changes: 3 additions & 5 deletions src/main/java/journeymap/client/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ public class Constants
public static KeyBinding KB_MAP;
public static KeyBinding KB_MAP_ZOOMIN;
public static KeyBinding KB_MAP_ZOOMOUT;
public static KeyBinding KB_MAP_DAY;
public static KeyBinding KB_MAP_NIGHT;
public static KeyBinding KB_MAP_SWITCH_TYPE;
public static KeyBinding KB_MINIMAP_PRESET;
public static KeyBinding KB_WAYPOINT;
private static String ICON_DIR = path.join(JOURNEYMAP_DIR, "icon");
Expand All @@ -80,11 +79,10 @@ public static List<KeyBinding> initKeybindings()
KB_MAP = new KeyBinding("key.journeymap.map_toggle", Keyboard.KEY_J, KEYBINDING_CATEGORY);
KB_MAP_ZOOMIN = new KeyBinding("key.journeymap.zoom_in", Keyboard.KEY_EQUALS, KEYBINDING_CATEGORY);
KB_MAP_ZOOMOUT = new KeyBinding("key.journeymap.zoom_out", Keyboard.KEY_MINUS, KEYBINDING_CATEGORY);
KB_MAP_DAY = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_LBRACKET, KEYBINDING_CATEGORY);
KB_MAP_NIGHT = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_RBRACKET, KEYBINDING_CATEGORY);
KB_MAP_SWITCH_TYPE = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_LBRACKET, KEYBINDING_CATEGORY);
KB_MINIMAP_PRESET = new KeyBinding("key.journeymap.minimap_preset", Keyboard.KEY_BACKSLASH, KEYBINDING_CATEGORY);
KB_WAYPOINT = new KeyBinding("key.journeymap.create_waypoint", Keyboard.KEY_B, KEYBINDING_CATEGORY);
return Arrays.asList(KB_MAP, KB_MAP_ZOOMIN, KB_MAP_ZOOMOUT, KB_MAP_DAY, KB_MAP_NIGHT, KB_MINIMAP_PRESET, KB_WAYPOINT);
return Arrays.asList(KB_MAP, KB_MAP_ZOOMIN, KB_MAP_ZOOMOUT, KB_MAP_SWITCH_TYPE, KB_MINIMAP_PRESET, KB_WAYPOINT);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ else if (Constants.isPressed(Constants.KB_MAP_ZOOMOUT))
MiniMap.state().zoomOut();
return true;
}
else if (Constants.isPressed(Constants.KB_MAP_DAY) || Constants.isPressed(Constants.KB_MAP_NIGHT))
else if (Constants.isPressed(Constants.KB_MAP_SWITCH_TYPE))
{
MiniMap.state().toggleMapType();
KeyBinding.unPressAllKeys();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ public void drawScreen(int par1, int par2, float par3)
drawHelpStrings(Constants.getString("key.journeymap.map_toggle_alt"), Constants.getKeyName(Constants.KB_MAP), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.zoom_in"), Constants.getKeyName(Constants.KB_MAP_ZOOMIN), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.zoom_out"), Constants.getKeyName(Constants.KB_MAP_ZOOMOUT), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.day"), Constants.getKeyName(Constants.KB_MAP_DAY), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.night"), Constants.getKeyName(Constants.KB_MAP_NIGHT), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.minimap_type"), Constants.getKeyName(Constants.KB_MAP_SWITCH_TYPE), x, y += 12);
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_north"), Constants.getKeyName(mc.gameSettings.keyBindForward), x, y += 12);
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_west"), Constants.getKeyName(mc.gameSettings.keyBindLeft), x, y += 12);
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_south"), Constants.getKeyName(mc.gameSettings.keyBindBack), x, y += 12);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,19 +786,13 @@ public void keyTyped(char c, int i)
return;
}

if (Constants.isPressed(Constants.KB_MAP_DAY) || Constants.isPressed(Constants.KB_MAP_NIGHT))
if (Constants.isPressed(Constants.KB_MAP_SWITCH_TYPE))
{
state.toggleMapType();
KeyBinding.unPressAllKeys();
return;
}

if (Constants.isPressed(Constants.KB_MAP_NIGHT))
{
state.setMapType(MapType.Name.night);
return;
}

if (Constants.isPressed(Constants.KB_WAYPOINT))
{
Waypoint waypoint = Waypoint.of(mc.thePlayer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public void drawScreen(int par1, int par2, float par3)
drawHelpStrings(Constants.getString("jm.minimap.hotkeys_toggle"), Constants.CONTROL_KEYNAME_COMBO + Constants.getKeyName(Constants.KB_MAP), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.zoom_in"), Constants.getKeyName(Constants.KB_MAP_ZOOMIN), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.zoom_out"), Constants.getKeyName(Constants.KB_MAP_ZOOMOUT), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.day"), Constants.getKeyName(Constants.KB_MAP_DAY), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.night"), Constants.getKeyName(Constants.KB_MAP_NIGHT), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.minimap_type"), Constants.getKeyName(Constants.KB_MAP_SWITCH_TYPE), x, y += 12);
drawHelpStrings(Constants.getString("key.journeymap.minimap_preset"), Constants.getKeyName(Constants.KB_MINIMAP_PRESET), x, y += 12);
buttonClose.setY(y + 16);
}
Expand Down

0 comments on commit 6c82a24

Please sign in to comment.