Skip to content

Commit cbae8e3

Browse files
committed
Fixed cconfig
1 parent 911b425 commit cbae8e3

3 files changed

Lines changed: 1 addition & 57 deletions

File tree

src/main/java/dev/xpple/seedmapper/command/commands/EspConfigCommand.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.mojang.brigadier.exceptions.DynamicCommandExceptionType;
1212
import com.mojang.brigadier.exceptions.SimpleCommandExceptionType;
1313
import com.mojang.brigadier.suggestion.Suggestions;
14-
import com.mojang.brigadier.tree.CommandNode;
1514
import dev.xpple.seedmapper.SeedMapper;
1615
import dev.xpple.seedmapper.command.CustomClientCommandSource;
1716
import dev.xpple.seedmapper.config.Configs;
@@ -56,37 +55,6 @@ private EspConfigCommand() {
5655
private static final double MAX_ZOOM_BLOCKS = 100_000.0D;
5756

5857
public static void register(CommandDispatcher<FabricClientCommandSource> dispatcher) {
59-
CommandNode<FabricClientCommandSource> cconfigRoot = dispatcher.getRoot().getChild("cconfig");
60-
if (cconfigRoot == null) {
61-
// If the BetterConfig client command isn't present, register a direct sm:config fallback
62-
registerDirectSmConfig(dispatcher);
63-
return;
64-
}
65-
CommandNode<FabricClientCommandSource> modRoot = cconfigRoot.getChild(SeedMapper.MOD_ID);
66-
if (modRoot == null) {
67-
// fallback to direct registration if mod-specific cconfig node missing
68-
registerDirectSmConfig(dispatcher);
69-
return;
70-
}
71-
72-
// Use a single target argument that accepts any case but suggests TitleCase names
73-
com.mojang.brigadier.builder.RequiredArgumentBuilder<FabricClientCommandSource, String> targetArgNode = argument("target", StringArgumentType.word())
74-
.suggests(EspConfigCommand::suggestTargets);
75-
targetArgNode.then(literal("get")
76-
.executes(ctx -> executeGet(ctx, getTargetArgument(ctx, "target"), null))
77-
.then(argument("property", StringArgumentType.word())
78-
.suggests(EspConfigCommand::suggestProperties)
79-
.executes(ctx -> executeGet(ctx, getTargetArgument(ctx, "target"), getPropertyArgument(ctx, "property")))));
80-
targetArgNode.then(literal("set")
81-
.then(argument("pairs", StringArgumentType.greedyString())
82-
.executes(ctx -> executeSet(ctx, getTargetArgument(ctx, "target")))));
83-
targetArgNode.then(literal("reset")
84-
.executes(ctx -> executeReset(ctx, getTargetArgument(ctx, "target"))));
85-
modRoot.addChild(targetArgNode.build());
86-
modRoot.addChild(buildZoomLiteral("Zoom").build());
87-
}
88-
89-
private static void registerDirectSmConfig(CommandDispatcher<FabricClientCommandSource> dispatcher) {
9058
LiteralArgumentBuilder<FabricClientCommandSource> smRoot = literal("sm:config");
9159
// single target argument for sm:config that suggests TitleCase but accepts any case when typed
9260
com.mojang.brigadier.builder.RequiredArgumentBuilder<FabricClientCommandSource, String> targetArgNode = argument("target", StringArgumentType.word())

src/main/java/dev/xpple/seedmapper/mixin/betterconfig/ConfigCommandClientMixin.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/main/resources/mixins.seedmapper.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"ChatScreenMixin",
99
"ClientPacketListenerMixin",
1010
"baritone.CustomGoalProcessMixin",
11-
"baritone.PathingBehaviorMixin",
12-
"betterconfig.ConfigCommandClientMixin"
11+
"baritone.PathingBehaviorMixin"
1312
],
1413
"injectors": {
1514
"defaultRequire": 1

0 commit comments

Comments
 (0)