Package net.minecraft.server.command
Class SpreadPlayersCommand
java.lang.Object
net.minecraft.server.command.SpreadPlayersCommand
public class SpreadPlayersCommand extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classSpreadPlayersCommand.Pile -
Field Summary
Fields Modifier and Type Field Description private static com.mojang.brigadier.exceptions.Dynamic4CommandExceptionTypeFAILED_ENTITIES_EXCEPTIONprivate static com.mojang.brigadier.exceptions.Dynamic4CommandExceptionTypeFAILED_TEAMS_EXCEPTION -
Constructor Summary
Constructors Constructor Description SpreadPlayersCommand() -
Method Summary
Modifier and Type Method Description private static intexecute(ServerCommandSource source, Vec2f center, float spreadDistance, float maxRange, int int2, boolean bool, Collection<? extends Entity> collection)private static doublegetMinDistance(Collection<? extends Entity> entities, ServerWorld world, SpreadPlayersCommand.Pile[] piles, int int2, boolean bool)private static intgetPileCountRespectingTeams(Collection<? extends Entity> entities)private static SpreadPlayersCommand.Pile[]makePiles(Random random, int count, double minX, double minZ, double maxX, double maxZ)static voidregister(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher)private static voidspread(Vec2f center, double spreadDistance, ServerWorld world, Random random, double minX, double minZ, double maxX, double maxZ, int int2, SpreadPlayersCommand.Pile[] pile, boolean bool)
-
Field Details
-
FAILED_TEAMS_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType FAILED_TEAMS_EXCEPTION -
FAILED_ENTITIES_EXCEPTION
private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType FAILED_ENTITIES_EXCEPTION
-
-
Constructor Details
-
SpreadPlayersCommand
public SpreadPlayersCommand()
-
-
Method Details
-
register
public static void register(com.mojang.brigadier.CommandDispatcher<ServerCommandSource> dispatcher) -
execute
private static int execute(ServerCommandSource source, Vec2f center, float spreadDistance, float maxRange, int int2, boolean bool, Collection<? extends Entity> collection) -
getPileCountRespectingTeams
-
spread
private static void spread(Vec2f center, double spreadDistance, ServerWorld world, Random random, double minX, double minZ, double maxX, double maxZ, int int2, SpreadPlayersCommand.Pile[] pile, boolean bool) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getMinDistance
private static double getMinDistance(Collection<? extends Entity> entities, ServerWorld world, SpreadPlayersCommand.Pile[] piles, int int2, boolean bool) -
makePiles
private static SpreadPlayersCommand.Pile[] makePiles(Random random, int count, double minX, double minZ, double maxX, double maxZ)
-