Class RandomCommand

java.lang.Object
net.minecraft.server.commands.RandomCommand

public class RandomCommand extends Object
  • 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

      public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_295018_)
    • drawRandomValueTree

      private static com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> drawRandomValueTree(String p_295419_, boolean p_295785_)
    • suggestRandomSequence

      private static CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestRandomSequence(com.mojang.brigadier.context.CommandContext<CommandSourceStack> p_296223_, com.mojang.brigadier.suggestion.SuggestionsBuilder p_295797_)
    • randomSample

      private static int randomSample(CommandSourceStack pSource, MinMaxBounds.Ints pRange, @Nullable ResourceLocation pSequence, boolean pDisplayResult) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • resetSequence

      private static int resetSequence(CommandSourceStack pSource, ResourceLocation pSequence) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • resetSequence

      private static int resetSequence(CommandSourceStack pSource, ResourceLocation pSequence, int pSeed, boolean pIncludeWorldSeed, boolean pIncludeSequenceId) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • resetAllSequences

      private static int resetAllSequences(CommandSourceStack pSource)
    • resetAllSequencesAndSetNewDefaults

      private static int resetAllSequencesAndSetNewDefaults(CommandSourceStack pSource, int pSeed, boolean pIncludeWorldSeed, boolean pIncludeSequenceId)