Class SpreadPlayersCommand

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

public class SpreadPlayersCommand extends Object
  • Field Details

    • MAX_ITERATION_COUNT

      private static final int MAX_ITERATION_COUNT
      See Also:
    • ERROR_FAILED_TO_SPREAD_TEAMS

      private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType ERROR_FAILED_TO_SPREAD_TEAMS
    • ERROR_FAILED_TO_SPREAD_ENTITIES

      private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType ERROR_FAILED_TO_SPREAD_ENTITIES
    • ERROR_INVALID_MAX_HEIGHT

      private static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_INVALID_MAX_HEIGHT
  • Constructor Details

    • SpreadPlayersCommand

      public SpreadPlayersCommand()
  • Method Details

    • register

      public static void register(com.mojang.brigadier.CommandDispatcher<CommandSourceStack> p_138697_)
    • spreadPlayers

      private static int spreadPlayers(CommandSourceStack p_138703_, Vec2 p_138704_, float p_138705_, float p_138706_, int p_138707_, boolean p_138708_, Collection<? extends Entity> p_138709_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getNumberOfTeams

      private static int getNumberOfTeams(Collection<? extends Entity> p_138728_)
    • spreadPositions

      private static void spreadPositions(Vec2 p_214741_, double p_214742_, ServerLevel p_214743_, RandomSource p_214744_, double p_214745_, double p_214746_, double p_214747_, double p_214748_, int p_214749_, SpreadPlayersCommand.Position[] p_214750_, boolean p_214751_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • setPlayerPositions

      private static double setPlayerPositions(Collection<? extends Entity> p_138730_, ServerLevel p_138731_, SpreadPlayersCommand.Position[] p_138732_, int p_138733_, boolean p_138734_)
    • createInitialPositions

      private static SpreadPlayersCommand.Position[] createInitialPositions(RandomSource p_214734_, int p_214735_, double p_214736_, double p_214737_, double p_214738_, double p_214739_)