public class EntitySelector
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private AxisAlignedBB |
aabb |
private boolean |
checkPermission |
private boolean |
currentWorldOnly |
private MinMaxBounds.FloatBound |
distance |
private java.util.function.Predicate<Entity> |
filter |
private boolean |
includeNonPlayers |
private int |
limit |
private java.util.function.Function<Vec3d,Vec3d> |
positionGetter |
private boolean |
self |
private java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
sorter |
private EntityType<?> |
type |
private java.lang.String |
username |
private java.util.UUID |
uuid |
Constructor and Description |
---|
EntitySelector(int p_i50800_1_,
boolean p_i50800_2_,
boolean p_i50800_3_,
java.util.function.Predicate<Entity> p_i50800_4_,
MinMaxBounds.FloatBound p_i50800_5_,
java.util.function.Function<Vec3d,Vec3d> p_i50800_6_,
AxisAlignedBB p_i50800_7_,
java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> p_i50800_8_,
boolean p_i50800_9_,
java.lang.String p_i50800_10_,
java.util.UUID p_i50800_11_,
EntityType<?> p_i50800_12_,
boolean p_i50800_13_) |
Modifier and Type | Method and Description |
---|---|
private void |
checkPermission(CommandSource source) |
private void |
getEntities(java.util.List<Entity> result,
ServerWorld worldIn,
Vec3d pos,
java.util.function.Predicate<Entity> predicate) |
int |
getLimit() |
boolean |
includesEntities() |
boolean |
isSelfSelector() |
boolean |
isWorldLimited() |
static ITextComponent |
joinNames(java.util.List<? extends Entity> entities) |
java.util.List<? extends Entity> |
select(CommandSource source) |
Entity |
selectOne(CommandSource source) |
ServerPlayerEntity |
selectOnePlayer(CommandSource source) |
java.util.List<ServerPlayerEntity> |
selectPlayers(CommandSource source) |
private <T extends Entity> |
sortAndLimit(Vec3d pos,
java.util.List<T> entities) |
private java.util.function.Predicate<Entity> |
updateFilter(Vec3d pos) |
private final int limit
private final boolean includeNonPlayers
private final boolean currentWorldOnly
private final java.util.function.Predicate<Entity> filter
private final MinMaxBounds.FloatBound distance
@Nullable private final AxisAlignedBB aabb
private final boolean self
@Nullable private final java.lang.String username
@Nullable private final java.util.UUID uuid
@Nullable private final EntityType<?> type
private final boolean checkPermission
public EntitySelector(int p_i50800_1_, boolean p_i50800_2_, boolean p_i50800_3_, java.util.function.Predicate<Entity> p_i50800_4_, MinMaxBounds.FloatBound p_i50800_5_, java.util.function.Function<Vec3d,Vec3d> p_i50800_6_, @Nullable AxisAlignedBB p_i50800_7_, java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> p_i50800_8_, boolean p_i50800_9_, @Nullable java.lang.String p_i50800_10_, @Nullable java.util.UUID p_i50800_11_, @Nullable EntityType<?> p_i50800_12_, boolean p_i50800_13_)
public int getLimit()
public boolean includesEntities()
public boolean isSelfSelector()
public boolean isWorldLimited()
private void checkPermission(CommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public Entity selectOne(CommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public java.util.List<? extends Entity> select(CommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private void getEntities(java.util.List<Entity> result, ServerWorld worldIn, Vec3d pos, java.util.function.Predicate<Entity> predicate)
public ServerPlayerEntity selectOnePlayer(CommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public java.util.List<ServerPlayerEntity> selectPlayers(CommandSource source) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private <T extends Entity> java.util.List<T> sortAndLimit(Vec3d pos, java.util.List<T> entities)
public static ITextComponent joinNames(java.util.List<? extends Entity> entities)