Skip to content

Commit 6c82a24

Browse files
authored
remove one of two keybinds that does the same thing : "Switch between Day/Night/Caves" (#33)
1 parent 4df49f8 commit 6c82a24

File tree

5 files changed

+7
-17
lines changed

5 files changed

+7
-17
lines changed

src/main/java/journeymap/client/Constants.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public class Constants
5555
public static KeyBinding KB_MAP;
5656
public static KeyBinding KB_MAP_ZOOMIN;
5757
public static KeyBinding KB_MAP_ZOOMOUT;
58-
public static KeyBinding KB_MAP_DAY;
59-
public static KeyBinding KB_MAP_NIGHT;
58+
public static KeyBinding KB_MAP_SWITCH_TYPE;
6059
public static KeyBinding KB_MINIMAP_PRESET;
6160
public static KeyBinding KB_WAYPOINT;
6261
private static String ICON_DIR = path.join(JOURNEYMAP_DIR, "icon");
@@ -80,11 +79,10 @@ public static List<KeyBinding> initKeybindings()
8079
KB_MAP = new KeyBinding("key.journeymap.map_toggle", Keyboard.KEY_J, KEYBINDING_CATEGORY);
8180
KB_MAP_ZOOMIN = new KeyBinding("key.journeymap.zoom_in", Keyboard.KEY_EQUALS, KEYBINDING_CATEGORY);
8281
KB_MAP_ZOOMOUT = new KeyBinding("key.journeymap.zoom_out", Keyboard.KEY_MINUS, KEYBINDING_CATEGORY);
83-
KB_MAP_DAY = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_LBRACKET, KEYBINDING_CATEGORY);
84-
KB_MAP_NIGHT = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_RBRACKET, KEYBINDING_CATEGORY);
82+
KB_MAP_SWITCH_TYPE = new KeyBinding("key.journeymap.minimap_type", Keyboard.KEY_LBRACKET, KEYBINDING_CATEGORY);
8583
KB_MINIMAP_PRESET = new KeyBinding("key.journeymap.minimap_preset", Keyboard.KEY_BACKSLASH, KEYBINDING_CATEGORY);
8684
KB_WAYPOINT = new KeyBinding("key.journeymap.create_waypoint", Keyboard.KEY_B, KEYBINDING_CATEGORY);
87-
return Arrays.asList(KB_MAP, KB_MAP_ZOOMIN, KB_MAP_ZOOMOUT, KB_MAP_DAY, KB_MAP_NIGHT, KB_MINIMAP_PRESET, KB_WAYPOINT);
85+
return Arrays.asList(KB_MAP, KB_MAP_ZOOMIN, KB_MAP_ZOOMOUT, KB_MAP_SWITCH_TYPE, KB_MINIMAP_PRESET, KB_WAYPOINT);
8886
}
8987

9088
/**

src/main/java/journeymap/client/forge/event/KeyEventHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ else if (Constants.isPressed(Constants.KB_MAP_ZOOMOUT))
116116
MiniMap.state().zoomOut();
117117
return true;
118118
}
119-
else if (Constants.isPressed(Constants.KB_MAP_DAY) || Constants.isPressed(Constants.KB_MAP_NIGHT))
119+
else if (Constants.isPressed(Constants.KB_MAP_SWITCH_TYPE))
120120
{
121121
MiniMap.state().toggleMapType();
122122
KeyBinding.unPressAllKeys();

src/main/java/journeymap/client/ui/dialog/FullscreenHotkeysHelp.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ public void drawScreen(int par1, int par2, float par3)
9797
drawHelpStrings(Constants.getString("key.journeymap.map_toggle_alt"), Constants.getKeyName(Constants.KB_MAP), x, y += 12);
9898
drawHelpStrings(Constants.getString("key.journeymap.zoom_in"), Constants.getKeyName(Constants.KB_MAP_ZOOMIN), x, y += 12);
9999
drawHelpStrings(Constants.getString("key.journeymap.zoom_out"), Constants.getKeyName(Constants.KB_MAP_ZOOMOUT), x, y += 12);
100-
drawHelpStrings(Constants.getString("key.journeymap.day"), Constants.getKeyName(Constants.KB_MAP_DAY), x, y += 12);
101-
drawHelpStrings(Constants.getString("key.journeymap.night"), Constants.getKeyName(Constants.KB_MAP_NIGHT), x, y += 12);
100+
drawHelpStrings(Constants.getString("key.journeymap.minimap_type"), Constants.getKeyName(Constants.KB_MAP_SWITCH_TYPE), x, y += 12);
102101
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_north"), Constants.getKeyName(mc.gameSettings.keyBindForward), x, y += 12);
103102
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_west"), Constants.getKeyName(mc.gameSettings.keyBindLeft), x, y += 12);
104103
drawHelpStrings(Constants.getString("jm.fullscreen.hotkeys_south"), Constants.getKeyName(mc.gameSettings.keyBindBack), x, y += 12);

src/main/java/journeymap/client/ui/fullscreen/Fullscreen.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -786,19 +786,13 @@ public void keyTyped(char c, int i)
786786
return;
787787
}
788788

789-
if (Constants.isPressed(Constants.KB_MAP_DAY) || Constants.isPressed(Constants.KB_MAP_NIGHT))
789+
if (Constants.isPressed(Constants.KB_MAP_SWITCH_TYPE))
790790
{
791791
state.toggleMapType();
792792
KeyBinding.unPressAllKeys();
793793
return;
794794
}
795795

796-
if (Constants.isPressed(Constants.KB_MAP_NIGHT))
797-
{
798-
state.setMapType(MapType.Name.night);
799-
return;
800-
}
801-
802796
if (Constants.isPressed(Constants.KB_WAYPOINT))
803797
{
804798
Waypoint waypoint = Waypoint.of(mc.thePlayer);

src/main/java/journeymap/client/ui/minimap/MiniMapHotkeysHelp.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ public void drawScreen(int par1, int par2, float par3)
9393
drawHelpStrings(Constants.getString("jm.minimap.hotkeys_toggle"), Constants.CONTROL_KEYNAME_COMBO + Constants.getKeyName(Constants.KB_MAP), x, y += 12);
9494
drawHelpStrings(Constants.getString("key.journeymap.zoom_in"), Constants.getKeyName(Constants.KB_MAP_ZOOMIN), x, y += 12);
9595
drawHelpStrings(Constants.getString("key.journeymap.zoom_out"), Constants.getKeyName(Constants.KB_MAP_ZOOMOUT), x, y += 12);
96-
drawHelpStrings(Constants.getString("key.journeymap.day"), Constants.getKeyName(Constants.KB_MAP_DAY), x, y += 12);
97-
drawHelpStrings(Constants.getString("key.journeymap.night"), Constants.getKeyName(Constants.KB_MAP_NIGHT), x, y += 12);
96+
drawHelpStrings(Constants.getString("key.journeymap.minimap_type"), Constants.getKeyName(Constants.KB_MAP_SWITCH_TYPE), x, y += 12);
9897
drawHelpStrings(Constants.getString("key.journeymap.minimap_preset"), Constants.getKeyName(Constants.KB_MINIMAP_PRESET), x, y += 12);
9998
buttonClose.setY(y + 16);
10099
}

0 commit comments

Comments
 (0)