@Environment(value=CLIENT) public class ClientCommandSource extends Object implements CommandSource
CommandSource.RelativePosition
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private int |
completionId |
private ClientPlayNetworkHandler |
networkHandler |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
pendingCompletion |
Constructor and Description |
---|
ClientCommandSource(ClientPlayNetworkHandler networkHandler,
MinecraftClient client) |
Modifier and Type | Method and Description |
---|---|
private static String |
format(double d) |
private static String |
format(int i) |
Collection<CommandSource.RelativePosition> |
getBlockPositionSuggestions() |
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context,
com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
Collection<String> |
getEntitySuggestions() |
Collection<String> |
getPlayerNames() |
Collection<CommandSource.RelativePosition> |
getPositionSuggestions() |
Stream<Identifier> |
getRecipeIds() |
DynamicRegistryManager |
getRegistryManager() |
Collection<Identifier> |
getSoundIds() |
Collection<String> |
getTeamNames() |
Set<RegistryKey<World>> |
getWorldKeys() |
boolean |
hasPermissionLevel(int level) |
void |
onCommandSuggestions(int completionId,
com.mojang.brigadier.suggestion.Suggestions suggestions) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachMatching, forEachMatching, method_27136, suggestColumnPositions, suggestFromIdentifier, suggestFromIdentifier, suggestIdentifiers, suggestIdentifiers, suggestIdentifiers, suggestMatching, suggestMatching, suggestMatching, suggestPositions
private final ClientPlayNetworkHandler networkHandler
private final MinecraftClient client
private int completionId
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingCompletion
public ClientCommandSource(ClientPlayNetworkHandler networkHandler, MinecraftClient client)
public Collection<String> getPlayerNames()
getPlayerNames
in interface CommandSource
public Collection<String> getEntitySuggestions()
getEntitySuggestions
in interface CommandSource
public Collection<String> getTeamNames()
getTeamNames
in interface CommandSource
public Collection<Identifier> getSoundIds()
getSoundIds
in interface CommandSource
public Stream<Identifier> getRecipeIds()
getRecipeIds
in interface CommandSource
public boolean hasPermissionLevel(int level)
hasPermissionLevel
in interface CommandSource
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getCompletions(com.mojang.brigadier.context.CommandContext<CommandSource> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
getCompletions
in interface CommandSource
private static String format(double d)
private static String format(int i)
public Collection<CommandSource.RelativePosition> getBlockPositionSuggestions()
getBlockPositionSuggestions
in interface CommandSource
public Collection<CommandSource.RelativePosition> getPositionSuggestions()
getPositionSuggestions
in interface CommandSource
public Set<RegistryKey<World>> getWorldKeys()
getWorldKeys
in interface CommandSource
public DynamicRegistryManager getRegistryManager()
getRegistryManager
in interface CommandSource
public void onCommandSuggestions(int completionId, com.mojang.brigadier.suggestion.Suggestions suggestions)