mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-28 16:06:28 +01:00
Fix "enabled" config command
- Change "enabled" subcommand to "backend" to match Forge version
This commit is contained in:
parent
d144403d70
commit
03c2a51754
1 changed files with 6 additions and 2 deletions
|
@ -18,7 +18,7 @@ public final class ConfigCommands {
|
|||
public static void init(FlwConfig config) {
|
||||
ConfigCommandBuilder commandBuilder = new ConfigCommandBuilder("flywheel");
|
||||
|
||||
commandBuilder.addOption(config.enabled, (builder, option) -> booleanOptionCommand(builder, config, option,
|
||||
commandBuilder.addOption(config.enabled, "backend", (builder, option) -> booleanOptionCommand(builder, config, option,
|
||||
(source, value) -> {
|
||||
Component text = new TextComponent("Flywheel renderer is currently: ").append(boolToText(value));
|
||||
source.sendFeedback(text);
|
||||
|
@ -83,7 +83,11 @@ public final class ConfigCommands {
|
|||
}
|
||||
|
||||
public <T extends Option<?>> void addOption(T option, BiConsumer<LiteralArgumentBuilder<FabricClientCommandSource>, T> consumer) {
|
||||
LiteralArgumentBuilder<FabricClientCommandSource> builder = ClientCommandManager.literal(option.getKey());
|
||||
addOption(option, option.getKey(), consumer);
|
||||
}
|
||||
|
||||
public <T extends Option<?>> void addOption(T option, String subcommand, BiConsumer<LiteralArgumentBuilder<FabricClientCommandSource>, T> consumer) {
|
||||
LiteralArgumentBuilder<FabricClientCommandSource> builder = ClientCommandManager.literal(subcommand);
|
||||
consumer.accept(builder, option);
|
||||
command.then(builder);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue