Interface QuiltClientCommandSource
- All Superinterfaces:
net.minecraft.command.CommandSource
@ClientOnly
@InjectedInterface(net.minecraft.client.network.ClientCommandSource.class)
public interface QuiltClientCommandSource
extends net.minecraft.command.CommandSource
Extensions to
CommandSource, implemented on ClientCommandSource for
client commands - most of these methods are equivalents to methods on
ServerCommandSource, to provide a more familiar API.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.command.CommandSource
net.minecraft.command.CommandSource.ElementSuggestionType, net.minecraft.command.CommandSource.RelativePosition -
Field Summary
Fields inherited from interface net.minecraft.command.CommandSource
field_55224 -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.MinecraftClientGets the client instance used to run the command.default net.minecraft.entity.EntityGets the entity that used the command.Gets the meta property underkeythat was assigned to this source.net.minecraft.client.network.ClientPlayerEntityGets the player that used the command.default net.minecraft.util.math.Vec3dGets the position from where the command has been executed.default net.minecraft.util.math.Vec2fGets the rotation of the entity that used the command.net.minecraft.client.world.ClientWorldgetWorld()Gets the world where the player used the command.voidsendError(net.minecraft.text.Text message) Sends an error message to the player.voidsendFeedback(net.minecraft.text.Text message) Sends a feedback message to the player.voidSets the meta property under keykeywith the valuevalue.Methods inherited from interface net.minecraft.command.CommandSource
getBlockPositionSuggestions, getCompletions, getEnabledFlags, getEntitySuggestions, getNames, getPlayerNames, getPositionSuggestions, getRegistryManager, getSoundIds, getTeamNames, getWorldKeys, hasPermission, suggestRegistryElements, suggestRegistryElements
-
Method Details
-
sendFeedback
void sendFeedback(net.minecraft.text.Text message) Sends a feedback message to the player.- Parameters:
message- the feedback message
-
sendError
void sendError(net.minecraft.text.Text message) Sends an error message to the player.- Parameters:
message- the error message
-
getClient
net.minecraft.client.MinecraftClient getClient()Gets the client instance used to run the command.- Returns:
- the client
-
getPlayer
net.minecraft.client.network.ClientPlayerEntity getPlayer()Gets the player that used the command.- Returns:
- the player
-
getEntity
default net.minecraft.entity.Entity getEntity()Gets the entity that used the command.- Returns:
- the entity
-
getPosition
default net.minecraft.util.math.Vec3d getPosition()Gets the position from where the command has been executed.- Returns:
- the position
-
getRotation
default net.minecraft.util.math.Vec2f getRotation()Gets the rotation of the entity that used the command.- Returns:
- the rotation
-
getWorld
net.minecraft.client.world.ClientWorld getWorld()Gets the world where the player used the command.- Returns:
- the world
-
getMeta
Gets the meta property underkeythat was assigned to this source.This method should return the same result for every call with the same
key.- Parameters:
key- the meta key- Returns:
- the meta
-
setMeta
Sets the meta property under keykeywith the valuevalue.- Parameters:
key- the meta keyvalue- the meta value
-