public class EntitySelector extends Object
Modifier and Type | Field and Description |
---|---|
private Predicate<Entity> |
basePredicate |
private Box |
box |
private NumberRange.FloatRange |
distance |
private boolean |
includesNonPlayers |
private int |
limit |
private boolean |
localWorldOnly |
private String |
playerName |
private Function<Vec3d,Vec3d> |
positionOffset |
private boolean |
senderOnly |
private BiConsumer<Vec3d,List<? extends Entity>> |
sorter |
private EntityType<?> |
type |
private boolean |
usesAt |
private UUID |
uuid |
Constructor and Description |
---|
EntitySelector(int count,
boolean includesNonPlayers,
boolean localWorldOnly,
Predicate<Entity> basePredicate,
NumberRange.FloatRange distance,
Function<Vec3d,Vec3d> positionOffset,
Box box,
BiConsumer<Vec3d,List<? extends Entity>> sorter,
boolean senderOnly,
String playerName,
UUID uuid,
EntityType<?> type,
boolean usesAt) |
Modifier and Type | Method and Description |
---|---|
private void |
appendEntitiesFromWorld(List<Entity> list,
ServerWorld serverWorld,
Vec3d vec3d,
Predicate<Entity> predicate) |
private void |
checkSourcePermission(ServerCommandSource serverCommandSource) |
List<? extends Entity> |
getEntities(ServerCommandSource serverCommandSource) |
private <T extends Entity> |
getEntities(Vec3d vec3d,
List<T> list) |
Entity |
getEntity(ServerCommandSource serverCommandSource) |
int |
getLimit() |
static MutableText |
getNames(List<? extends Entity> list) |
ServerPlayerEntity |
getPlayer(ServerCommandSource serverCommandSource) |
List<ServerPlayerEntity> |
getPlayers(ServerCommandSource serverCommandSource) |
private Predicate<Entity> |
getPositionPredicate(Vec3d vec3d) |
boolean |
includesNonPlayers() |
boolean |
isLocalWorldOnly() |
boolean |
isSenderOnly() |
private final int limit
private final boolean includesNonPlayers
private final boolean localWorldOnly
private final NumberRange.FloatRange distance
private final BiConsumer<Vec3d,List<? extends Entity>> sorter
private final boolean senderOnly
@Nullable private final EntityType<?> type
private final boolean usesAt
public EntitySelector(int count, boolean includesNonPlayers, boolean localWorldOnly, Predicate<Entity> basePredicate, NumberRange.FloatRange distance, Function<Vec3d,Vec3d> positionOffset, @Nullable Box box, BiConsumer<Vec3d,List<? extends Entity>> sorter, boolean senderOnly, @Nullable String playerName, @Nullable UUID uuid, @Nullable EntityType<?> type, boolean usesAt)
public int getLimit()
public boolean includesNonPlayers()
public boolean isSenderOnly()
public boolean isLocalWorldOnly()
private void checkSourcePermission(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public Entity getEntity(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public List<? extends Entity> getEntities(ServerCommandSource serverCommandSource)
private void appendEntitiesFromWorld(List<Entity> list, ServerWorld serverWorld, Vec3d vec3d, Predicate<Entity> predicate)
public ServerPlayerEntity getPlayer(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public List<ServerPlayerEntity> getPlayers(ServerCommandSource serverCommandSource)
public static MutableText getNames(List<? extends Entity> list)