Class SpreadPlayersCommand


  • public class SpreadPlayersCommand
    extends java.lang.Object
    • Field Detail

      • 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
    • Constructor Detail

      • SpreadPlayersCommand

        public SpreadPlayersCommand()
    • Method Detail

      • register

        public static void register​(com.mojang.brigadier.CommandDispatcher<CommandSource> p_198716_0_)
      • spreadPlayers

        private static int spreadPlayers​(CommandSource p_241070_0_,
                                         Vector2f p_241070_1_,
                                         float p_241070_2_,
                                         float p_241070_3_,
                                         int p_241070_4_,
                                         boolean p_241070_5_,
                                         java.util.Collection<? extends Entity> p_241070_6_)
                                  throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • getNumberOfTeams

        private static int getNumberOfTeams​(java.util.Collection<? extends Entity> p_198715_0_)
      • spreadPositions

        private static void spreadPositions​(Vector2f p_241071_0_,
                                            double p_241071_1_,
                                            ServerWorld p_241071_3_,
                                            java.util.Random p_241071_4_,
                                            double p_241071_5_,
                                            double p_241071_7_,
                                            double p_241071_9_,
                                            double p_241071_11_,
                                            int p_241071_13_,
                                            SpreadPlayersCommand.Position[] p_241071_14_,
                                            boolean p_241071_15_)
                                     throws com.mojang.brigadier.exceptions.CommandSyntaxException
        Throws:
        com.mojang.brigadier.exceptions.CommandSyntaxException
      • setPlayerPositions

        private static double setPlayerPositions​(java.util.Collection<? extends Entity> p_241072_0_,
                                                 ServerWorld p_241072_1_,
                                                 SpreadPlayersCommand.Position[] p_241072_2_,
                                                 int p_241072_3_,
                                                 boolean p_241072_4_)
      • createInitialPositions

        private static SpreadPlayersCommand.Position[] createInitialPositions​(java.util.Random p_198720_0_,
                                                                              int p_198720_1_,
                                                                              double p_198720_2_,
                                                                              double p_198720_4_,
                                                                              double p_198720_6_,
                                                                              double p_198720_8_)