Package net.minecraft.server.commands
Class RandomCommand
java.lang.Object
net.minecraft.server.commands.RandomCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static com.mojang.brigadier.builder.LiteralArgumentBuilder
<CommandSourceStack> drawRandomValueTree
(String subcommand, boolean displayResult) private static int
randomSample
(CommandSourceStack source, MinMaxBounds.Ints range, ResourceLocation sequence, boolean displayResult) static void
register
(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher) private static int
resetAllSequences
(CommandSourceStack source) private static int
resetAllSequencesAndSetNewDefaults
(CommandSourceStack source, int seed, boolean includeWorldSeed, boolean includeSequenceId) private static int
resetSequence
(CommandSourceStack source, ResourceLocation sequence) private static int
resetSequence
(CommandSourceStack source, ResourceLocation sequence, int seed, boolean includeWorldSeed, boolean includeSequenceId) private static CompletableFuture
<com.mojang.brigadier.suggestion.Suggestions> suggestRandomSequence
(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder)
-
Field Details
-
ERROR_RANGE_TOO_LARGE
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_RANGE_TOO_LARGE -
ERROR_RANGE_TOO_SMALL
private static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_RANGE_TOO_SMALL
-
-
Constructor Details
-
RandomCommand
public RandomCommand()
-
-
Method Details
-
register
-
drawRandomValueTree
private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> drawRandomValueTree(String subcommand, boolean displayResult) -
suggestRandomSequence
private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestRandomSequence(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionsBuilder) -
randomSample
private static int randomSample(CommandSourceStack source, MinMaxBounds.Ints range, @Nullable ResourceLocation sequence, boolean displayResult) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetSequence
private static int resetSequence(CommandSourceStack source, ResourceLocation sequence) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetSequence
private static int resetSequence(CommandSourceStack source, ResourceLocation sequence, int seed, boolean includeWorldSeed, boolean includeSequenceId) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
resetAllSequences
-
resetAllSequencesAndSetNewDefaults
private static int resetAllSequencesAndSetNewDefaults(CommandSourceStack source, int seed, boolean includeWorldSeed, boolean includeSequenceId)
-