-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v1.9.0 - Actually add impl for new config factory providing features,…
… add impl for vanilla options screen
- Loading branch information
1 parent
fd53293
commit ea704ae
Showing
3 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/io/github/prospector/modmenu/VanillaModMenuCompat.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.github.prospector.modmenu; | ||
|
||
import com.google.common.collect.ImmutableMap; | ||
import io.github.prospector.modmenu.api.ConfigScreenFactory; | ||
import io.github.prospector.modmenu.api.ModMenuApi; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.screen.SettingsScreen; | ||
|
||
import java.util.Map; | ||
|
||
public class VanillaModMenuCompat implements ModMenuApi { | ||
@Override | ||
public String getModId() { | ||
return ModMenu.MOD_ID; | ||
} | ||
|
||
@Override | ||
public Map<String, ConfigScreenFactory<?>> getProvidedConfigScreenFactories() { | ||
return ImmutableMap.of("minecraft", parent -> new SettingsScreen(parent, MinecraftClient.getInstance().options)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters