public class SpreadPlayersCommand
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SpreadPlayersCommand.Position |
Modifier and Type | Field and Description |
---|---|
private static com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType |
SPREAD_ENTITIES_FAILED |
private static com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType |
SPREAD_TEAMS_FAILED |
Constructor and Description |
---|
SpreadPlayersCommand() |
Modifier and Type | Method and Description |
---|---|
private static double |
doSpreading(java.util.Collection<? extends Entity> targets,
ServerWorld worldIn,
SpreadPlayersCommand.Position[] positions,
boolean respectTeams) |
private static void |
ensureSufficientSeparation(Vec2f center,
double spreadDistance,
ServerWorld worldIn,
java.util.Random random,
double minX,
double minZ,
double maxX,
double maxZ,
SpreadPlayersCommand.Position[] positions,
boolean respectTeams) |
private static int |
getNumberOfTeams(java.util.Collection<? extends Entity> entities) |
private static SpreadPlayersCommand.Position[] |
getPositions(java.util.Random random,
int count,
double minX,
double minZ,
double maxX,
double maxZ) |
static void |
register(com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher) |
private static int |
spreadPlayers(CommandSource source,
Vec2f center,
float spreadDistance,
float maxRange,
boolean respectTeams,
java.util.Collection<? extends Entity> targets) |
private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType SPREAD_TEAMS_FAILED
private static final com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType SPREAD_ENTITIES_FAILED
public static void register(com.mojang.brigadier.CommandDispatcher<CommandSource> dispatcher)
private static int spreadPlayers(CommandSource source, Vec2f center, float spreadDistance, float maxRange, boolean respectTeams, java.util.Collection<? extends Entity> targets) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static int getNumberOfTeams(java.util.Collection<? extends Entity> entities)
private static void ensureSufficientSeparation(Vec2f center, double spreadDistance, ServerWorld worldIn, java.util.Random random, double minX, double minZ, double maxX, double maxZ, SpreadPlayersCommand.Position[] positions, boolean respectTeams) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static double doSpreading(java.util.Collection<? extends Entity> targets, ServerWorld worldIn, SpreadPlayersCommand.Position[] positions, boolean respectTeams)
private static SpreadPlayersCommand.Position[] getPositions(java.util.Random random, int count, double minX, double minZ, double maxX, double maxZ)