File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
java/dev/xpple/seedmapper
resources/assets/seedmapper/lang Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 3737import net .fabricmc .loader .api .ModContainer ;
3838import net .minecraft .client .KeyMapping ;
3939import net .minecraft .commands .CommandBuildContext ;
40+ import net .minecraft .resources .Identifier ;
4041
4142import java .io .IOException ;
4243import java .nio .file .Files ;
@@ -82,8 +83,9 @@ public void onInitializeClient() {
8283
8384 SeedDatabaseHelper .fetchSeeds ();
8485
85- KeyMapping seedMapKeyMapping = KeyBindingHelper .registerKeyBinding (new KeyMapping ("key.seedMap" , InputConstants .KEY_M , KeyMapping .Category .GAMEPLAY ));
86- KeyMapping minimapKeyMapping = KeyBindingHelper .registerKeyBinding (new KeyMapping ("key.minimap" , InputConstants .KEY_COMMA , KeyMapping .Category .GAMEPLAY ));
86+ KeyMapping .Category category = KeyMapping .Category .register (Identifier .fromNamespaceAndPath (MOD_ID , MOD_ID ));
87+ KeyMapping seedMapKeyMapping = KeyBindingHelper .registerKeyBinding (new KeyMapping ("key.seedMap" , InputConstants .KEY_M , category ));
88+ KeyMapping minimapKeyMapping = KeyBindingHelper .registerKeyBinding (new KeyMapping ("key.minimap" , InputConstants .KEY_COMMA , category ));
8789 ClientTickEvents .END_CLIENT_TICK .register (minecraft -> {
8890 while (seedMapKeyMapping .consumeClick ()) {
8991 minecraft .player .connection .sendCommand ("sm:seedmap" );
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ private static void setMinimapHeight(int height) {
120120 return toggledFeatures ;
121121 });
122122
123- public static Component listToggledFeatures () {
123+ private static Component listToggledFeatures () {
124124 return join (Component .literal (", " ), ToggledFeatures .stream ()
125125 .map (MapFeature ::getName )
126126 .map (Component ::literal ));
@@ -129,7 +129,7 @@ public static Component listToggledFeatures() {
129129 @ Config (comment = "getDevModeComment" )
130130 public static boolean DevMode = false ;
131131
132- public static Component getDevModeComment () {
132+ private static Component getDevModeComment () {
133133 return Component .translatable ("config.devMode.comment" );
134134 }
135135}
Original file line number Diff line number Diff line change 9898 "config.oreAirCheck.comment" : " Whether or not SeedMapper should use in-game air checks to invalidate ore positions." ,
9999 "config.devMode.comment" : " Enables certain debug commands." ,
100100
101+ "key.category.seedmapper.seedmapper" : " SeedMapper" ,
101102 "key.seedMap" : " Seed map" ,
102103 "key.minimap" : " Seed minimap" ,
103104
You can’t perform that action at this time.
0 commit comments