Package net.minecraftforge.client
Class ClientCommandSourceStack
java.lang.Object
net.minecraft.commands.CommandSourceStack
net.minecraftforge.client.ClientCommandSourceStack
- All Implemented Interfaces:
SharedSuggestionProvider
,IForgeCommandSourceStack
overrides for
CommandSourceStack
so that the methods will run successfully client side-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.commands.SharedSuggestionProvider
SharedSuggestionProvider.ElementSuggestionType, SharedSuggestionProvider.TextCoordinates
-
Field Summary
Fields inherited from class net.minecraft.commands.CommandSourceStack
ERROR_NOT_ENTITY, ERROR_NOT_PLAYER, source
-
Constructor Summary
ConstructorDescriptionClientCommandSourceStack
(CommandSource source, Vec3 position, Vec2 rotation, int permission, String plainTextName, Component displayName, Entity executing) -
Method Summary
Modifier and TypeMethodDescriptionReturns the advancement from the id from the client side where the advancement needs to be visible to the player.Returns the list of teams from the client side.getLevel()
Returns the list of online player names from the client side.Returns theRecipeManager
from the client side.Returns aStream
of recipe ids that are available on the client.Returns the scoreboard from the client side.Returns the level from the client side.levels()
Returns a set ofResourceKey
for levels from the client side.Returns theRegistryAccess
from the client side.void
sendSuccess
(Component message, boolean sendToAdmins) Sends a success message without attempting to get the server side list of adminsMethods inherited from class net.minecraft.commands.CommandSourceStack
asChatSender, customSuggestion, facing, facing, getAnchor, getAvailableSoundEvents, getChatMessageChainer, getDisplayName, getEntity, getEntityOrException, getPlayer, getPlayerOrException, getPosition, getRotation, getSigningContext, getTextName, hasPermission, isPlayer, onCommandComplete, sendChatMessage, sendFailure, sendSystemMessage, shouldFilterMessageTo, suggestRegistryElements, withAnchor, withCallback, withCallback, withChatMessageChainer, withEntity, withLevel, withMaximumPermission, withPermission, withPosition, withRotation, withSigningContext, withSource, withSuppressedOutput
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.commands.SharedSuggestionProvider
getAbsoluteCoordinates, getCustomTabSugggestions, getRelevantCoordinates, getSelectedEntities, suggestRegistryElements
-
Constructor Details
-
ClientCommandSourceStack
-
-
Method Details
-
sendSuccess
Sends a success message without attempting to get the server side list of admins- Overrides:
sendSuccess
in classCommandSourceStack
-
getAllTeams
Returns the list of teams from the client side.- Specified by:
getAllTeams
in interfaceSharedSuggestionProvider
- Overrides:
getAllTeams
in classCommandSourceStack
- Returns:
- the list of teams from the client side
-
getOnlinePlayerNames
Returns the list of online player names from the client side.- Specified by:
getOnlinePlayerNames
in interfaceSharedSuggestionProvider
- Overrides:
getOnlinePlayerNames
in classCommandSourceStack
- Returns:
- the list of online player names from the client side
-
getRecipeNames
Returns aStream
of recipe ids that are available on the client.- Specified by:
getRecipeNames
in interfaceSharedSuggestionProvider
- Overrides:
getRecipeNames
in classCommandSourceStack
- Returns:
- a
Stream
of recipe ids that are available on the client
-
levels
Returns a set ofResourceKey
for levels from the client side.- Specified by:
levels
in interfaceSharedSuggestionProvider
- Overrides:
levels
in classCommandSourceStack
- Returns:
- a set of
ResourceKey
for levels from the client side
-
registryAccess
Returns theRegistryAccess
from the client side.- Specified by:
registryAccess
in interfaceSharedSuggestionProvider
- Overrides:
registryAccess
in classCommandSourceStack
- Returns:
- the
RegistryAccess
from the client side
-
getScoreboard
Returns the scoreboard from the client side.- Returns:
- the scoreboard from the client side
-
getAdvancement
Returns the advancement from the id from the client side where the advancement needs to be visible to the player.- Returns:
- the advancement from the id from the client side where the advancement needs to be visible to the player
-
getRecipeManager
Returns theRecipeManager
from the client side.- Returns:
- the
RecipeManager
from the client side
-
getUnsidedLevel
Returns the level from the client side.- Returns:
- the level from the client side
-
getServer
- Overrides:
getServer
in classCommandSourceStack
- Throws:
UnsupportedOperationException
- because the server isn't available on the client
-
getLevel
- Overrides:
getLevel
in classCommandSourceStack
- Throws:
UnsupportedOperationException
- because the server side level isn't available on the client side
-