Skip to content

Commit b15cc0e

Browse files
committed
RegistrySuggestionProvider uses IDs not ints
1 parent 8c3f15b commit b15cc0e

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

autodocs/autodoc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
--#region Information
44
-- GENERATED AUTODOC
5-
-- Generated: 2026-02-04T09:55:52.319589400
5+
-- Generated: 2026-02-04T12:26:49.916698700
66
-- Luafy Version: 2.0.0
77
-- Format: Lua LS library file
88
--#endregion

src/main/java/dev/diamond/luafy/command/HotCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public static void register(CommandDispatcher<CommandSourceStack> dispatcher,
140140
}
141141

142142
var branch = literal(bean.root).then(last);
143-
143+
144144
// register
145145
dispatcher.register(branch);
146146
Luafy.LOGGER.info("Registered hot-command branch '{}'.", bean.root);

src/main/java/dev/diamond/luafy/command/RegistrySuggestionProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public record RegistrySuggestionProvider<T>(Registry<T> registry) implements Sug
1717
public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> ctx, SuggestionsBuilder builder) throws CommandSyntaxException {
1818

1919
for (var thing : registry) {
20-
builder.suggest(registry.getId(thing));
20+
builder.suggest(registry.getKey(thing).toString());
2121
}
2222

2323
// Lock the suggestions after we've modified them.

0 commit comments

Comments
 (0)