Package net.replaceitem.reconfigure.api
Interface Config
- All Known Implementing Classes:
ConfigImpl
public interface Config
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigBuilder
This is the entrypoint for starting to build a config and all its tabs, properties and widgets.Creates the default tab for the config.createScreen
(@Nullable net.minecraft.client.gui.screen.Screen parent) Deprecated.Creates a new tab for the config.void
load()
Loads the config from a file using theSerializer
defined in the config.void
save()
Saves the config to a file using theSerializer
defined in the config.
-
Method Details
-
builder
This is the entrypoint for starting to build a config and all its tabs, properties and widgets.- Parameters:
namespace
- The namespace to identify the config. This should be your mod id.- Returns:
- The config builder.
-
createTab
Creates a new tab for the config. Use this if you want to split your config into multiple tabs.- Parameters:
name
- The name of the tab- Returns:
- A new config tab builder
-
createDefaultTab
ConfigTabBuilder createDefaultTab()Creates the default tab for the config. Use this if you don't want to use multiple tabs for your config. This will create the single default tab to which you can add all your properties.- Returns:
- The default config tab builder
-
createScreen
@Deprecated ConfigScreen createScreen(@Nullable @Nullable net.minecraft.client.gui.screen.Screen parent) Deprecated.Creates a screen for the config. Use this withMinecraftClient.setScreen(Screen)
to show the config screen.- Parameters:
parent
- The parent screen to return to when closing the config screen- Returns:
- The config screen
-
save
void save()Saves the config to a file using theSerializer
defined in the config. -
load
void load()Loads the config from a file using theSerializer
defined in the config.
-