Class RandomCommand
java.lang.Object
net.minecraft.server.commands.RandomCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SimpleCommandExceptionTypeprivate static final SimpleCommandExceptionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static LiteralArgumentBuilder<CommandSourceStack> drawRandomValueTree(String name, boolean announce) private static intrandomSample(CommandSourceStack source, MinMaxBounds.Ints range, @Nullable Identifier sequence, boolean announce) static voidregister(CommandDispatcher<CommandSourceStack> dispatcher) private static intresetAllSequences(CommandSourceStack source) private static intresetAllSequencesAndSetNewDefaults(CommandSourceStack source, int salt, boolean includeWorldSeed, boolean includeSequenceId) private static intresetSequence(CommandSourceStack source, Identifier sequence) private static intresetSequence(CommandSourceStack source, Identifier sequence, int salt, boolean includeWorldSeed, boolean includeSequenceId) private static CompletableFuture<Suggestions> suggestRandomSequence(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder)
-
Field Details
-
ERROR_RANGE_TOO_LARGE
-
ERROR_RANGE_TOO_SMALL
-
-
Constructor Details
-
RandomCommand
public RandomCommand()
-
-
Method Details
-
register
-
drawRandomValueTree
private static LiteralArgumentBuilder<CommandSourceStack> drawRandomValueTree(String name, boolean announce) -
suggestRandomSequence
private static CompletableFuture<Suggestions> suggestRandomSequence(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) -
randomSample
private static int randomSample(CommandSourceStack source, MinMaxBounds.Ints range, @Nullable Identifier sequence, boolean announce) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
resetSequence
private static int resetSequence(CommandSourceStack source, Identifier sequence) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
resetSequence
private static int resetSequence(CommandSourceStack source, Identifier sequence, int salt, boolean includeWorldSeed, boolean includeSequenceId) throws CommandSyntaxException - Throws:
CommandSyntaxException
-
resetAllSequences
-
resetAllSequencesAndSetNewDefaults
private static int resetAllSequencesAndSetNewDefaults(CommandSourceStack source, int salt, boolean includeWorldSeed, boolean includeSequenceId)
-