i am not sure
This commit is contained in:
parent
43939452fc
commit
c04380b420
1 changed files with 40 additions and 37 deletions
|
@ -6,7 +6,6 @@ import com.mojang.brigadier.suggestion.Suggestions;
|
||||||
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
import com.mojang.brigadier.suggestion.SuggestionsBuilder;
|
||||||
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
import land.chipmunk.chipmunkmod.ChipmunkMod;
|
||||||
import land.chipmunk.chipmunkmod.command.CommandManager;
|
import land.chipmunk.chipmunkmod.command.CommandManager;
|
||||||
import land.chipmunk.chipmunkmod.data.ChomeNSBotCommand;
|
|
||||||
import land.chipmunk.chipmunkmod.modules.ChomeNSBotCommandSuggestions;
|
import land.chipmunk.chipmunkmod.modules.ChomeNSBotCommandSuggestions;
|
||||||
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
@ -52,6 +51,7 @@ public class ChatInputSuggestorMixin {
|
||||||
|
|
||||||
@Inject(at = @At("TAIL"), method = "refresh()V")
|
@Inject(at = @At("TAIL"), method = "refresh()V")
|
||||||
public void refresh (CallbackInfo ci) {
|
public void refresh (CallbackInfo ci) {
|
||||||
|
try {
|
||||||
if (slashOptional) return;
|
if (slashOptional) return;
|
||||||
|
|
||||||
final CommandManager commandManager = CommandManager.INSTANCE;
|
final CommandManager commandManager = CommandManager.INSTANCE;
|
||||||
|
@ -99,5 +99,8 @@ public class ChatInputSuggestorMixin {
|
||||||
|
|
||||||
pendingSuggestions = dispatcher.getCompletionSuggestions(dispatcher.parse(reader, commandSource), cursor);
|
pendingSuggestions = dispatcher.getCompletionSuggestions(dispatcher.parse(reader, commandSource), cursor);
|
||||||
show(true);
|
show(true);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue