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
-
Constructor Summary
ConstructorDescriptionClientCommandSourceStack
(CommandSource source, Vec3 position, Vec2 rotation, int permission, String plainTextName, Component displayName, Entity executing) -
Method Summary
Modifier and TypeMethodDescriptionGets the advancement from the id from the client side where the advancement needs to be visible to the playerGets the list of teams from the client sidegetLevel()
Gets the list of online player names from the client sideGets theRecipeManager
from the client sideGets aStream
of recipe ids that are available on the clientGets the scoreboard from the client sideGets the level from the client sidelevels()
Gets a set ofResourceKey
for levels from the client sideGets theRegistryAccess
from the client sidevoid
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
customSuggestion, facing, facing, getAnchor, getAvailableSoundEvents, getDisplayName, getEntity, getEntityOrException, getPlayerOrException, getPosition, getRotation, getTextName, hasPermission, onCommandComplete, sendFailure, suggestRegistryElements, withAnchor, withCallback, withCallback, withEntity, withLevel, withMaximumPermission, withPermission, withPosition, withRotation, 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, 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
Gets the list of teams from the client side- Specified by:
getAllTeams
in interfaceSharedSuggestionProvider
- Overrides:
getAllTeams
in classCommandSourceStack
-
getOnlinePlayerNames
Gets the list of online player names from the client side- Specified by:
getOnlinePlayerNames
in interfaceSharedSuggestionProvider
- Overrides:
getOnlinePlayerNames
in classCommandSourceStack
-
getRecipeNames
Gets aStream
of recipe ids that are available on the client- Specified by:
getRecipeNames
in interfaceSharedSuggestionProvider
- Overrides:
getRecipeNames
in classCommandSourceStack
-
levels
Gets a set ofResourceKey
for levels from the client side- Specified by:
levels
in interfaceSharedSuggestionProvider
- Overrides:
levels
in classCommandSourceStack
-
registryAccess
Gets theRegistryAccess
from the client side- Specified by:
registryAccess
in interfaceSharedSuggestionProvider
- Overrides:
registryAccess
in classCommandSourceStack
-
getScoreboard
Gets the scoreboard from the client side- Returns:
- the scoreboard
-
getAdvancement
Gets 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
-
getRecipeManager
Gets theRecipeManager
from the client side- Returns:
- the recipe manager
-
getUnsidedLevel
Gets the level from the client side- Returns:
- the level but without being specifically the server side level
-
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
-