Class EntitySelector
java.lang.Object
net.minecraft.commands.arguments.selector.EntitySelector
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AABB
private static final EntityTypeTest
<Entity, ?> private final boolean
private final UUID
private final boolean
static final int
private final int
private final BiConsumer
<Vec3, List<? extends Entity>> static final BiConsumer
<Vec3, List<? extends Entity>> private final String
private final MinMaxBounds.Doubles
private final EntityTypeTest
<Entity, ?> private final boolean
private final boolean
-
Constructor Summary
ConstructorDescriptionEntitySelector
(int p_121125_, boolean p_121126_, boolean p_121127_, List<Predicate<Entity>> p_345250_, MinMaxBounds.Doubles p_121129_, Function<Vec3, Vec3> p_121130_, AABB p_121131_, BiConsumer<Vec3, List<? extends Entity>> p_121132_, boolean p_121133_, String p_121134_, UUID p_121135_, EntityType<?> p_121136_, boolean p_121137_) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addEntities
(List<Entity> p_121155_, ServerLevel p_121156_, AABB p_343022_, Predicate<Entity> p_121158_) private void
checkPermissions
(CommandSourceStack p_121169_) findEntities
(CommandSourceStack p_121161_) findPlayers
(CommandSourceStack p_121167_) findSingleEntity
(CommandSourceStack p_121140_) findSinglePlayer
(CommandSourceStack p_121164_) private AABB
getAbsoluteAabb
(Vec3 p_345041_) int
getPredicate
(Vec3 p_121145_, AABB p_343863_, FeatureFlagSet p_343062_) private int
boolean
boolean
boolean
static Component
sortAndLimit
(Vec3 p_121150_, List<T> p_121151_) boolean
-
Field Details
-
INFINITE
public static final int INFINITE- See Also:
-
ORDER_ARBITRARY
-
ANY_TYPE
-
maxResults
private final int maxResults -
includesEntities
private final boolean includesEntities -
worldLimited
private final boolean worldLimited -
contextFreePredicates
-
range
-
position
-
aabb
-
order
-
currentEntity
private final boolean currentEntity -
playerName
-
entityUUID
-
type
-
usesSelector
private final boolean usesSelector
-
-
Constructor Details
-
EntitySelector
public EntitySelector(int p_121125_, boolean p_121126_, boolean p_121127_, List<Predicate<Entity>> p_345250_, MinMaxBounds.Doubles p_121129_, Function<Vec3, Vec3> p_121130_, @Nullable AABB p_121131_, BiConsumer<Vec3, List<? extends Entity>> p_121132_, boolean p_121133_, @Nullable String p_121134_, @Nullable UUID p_121135_, @Nullable EntityType<?> p_121136_, boolean p_121137_)
-
-
Method Details
-
getMaxResults
public int getMaxResults() -
includesEntities
public boolean includesEntities() -
isSelfSelector
public boolean isSelfSelector() -
isWorldLimited
public boolean isWorldLimited() -
usesSelector
public boolean usesSelector() -
checkPermissions
private void checkPermissions(CommandSourceStack p_121169_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findSingleEntity
public Entity findSingleEntity(CommandSourceStack p_121140_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findEntities
public List<? extends Entity> findEntities(CommandSourceStack p_121161_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
addEntities
-
getResultLimit
private int getResultLimit() -
findSinglePlayer
public ServerPlayer findSinglePlayer(CommandSourceStack p_121164_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findPlayers
public List<ServerPlayer> findPlayers(CommandSourceStack p_121167_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getAbsoluteAabb
-
getPredicate
private Predicate<Entity> getPredicate(Vec3 p_121145_, @Nullable AABB p_343863_, @Nullable FeatureFlagSet p_343062_) -
sortAndLimit
-
joinNames
-