Package net.minecraft.command.arguments
Class EntitySelector
- java.lang.Object
-
- net.minecraft.command.arguments.EntitySelector
-
public class EntitySelector extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private AxisAlignedBB
aabb
private boolean
currentEntity
private java.util.UUID
entityUUID
private boolean
includesEntities
private int
maxResults
private java.util.function.BiConsumer<Vector3d,java.util.List<? extends Entity>>
order
private java.lang.String
playerName
private java.util.function.Function<Vector3d,Vector3d>
position
private java.util.function.Predicate<Entity>
predicate
private MinMaxBounds.FloatBound
range
private EntityType<?>
type
private boolean
usesSelector
private boolean
worldLimited
-
Constructor Summary
Constructors Constructor 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<Vector3d,Vector3d> p_i50800_6_, AxisAlignedBB p_i50800_7_, java.util.function.BiConsumer<Vector3d,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_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addEntities(java.util.List<Entity> p_197348_1_, ServerWorld p_197348_2_, Vector3d p_197348_3_, java.util.function.Predicate<Entity> p_197348_4_)
private void
checkPermissions(CommandSource p_210324_1_)
java.util.List<? extends Entity>
findEntities(CommandSource p_197341_1_)
java.util.List<ServerPlayerEntity>
findPlayers(CommandSource p_197342_1_)
Entity
findSingleEntity(CommandSource p_197340_1_)
ServerPlayerEntity
findSinglePlayer(CommandSource p_197347_1_)
int
getMaxResults()
private java.util.function.Predicate<Entity>
getPredicate(Vector3d p_197349_1_)
boolean
includesEntities()
boolean
isSelfSelector()
boolean
isWorldLimited()
static IFormattableTextComponent
joinNames(java.util.List<? extends Entity> p_197350_0_)
private <T extends Entity>
java.util.List<T>sortAndLimit(Vector3d p_197345_1_, java.util.List<T> p_197345_2_)
-
-
-
Field Detail
-
maxResults
private final int maxResults
-
includesEntities
private final boolean includesEntities
-
worldLimited
private final boolean worldLimited
-
predicate
private final java.util.function.Predicate<Entity> predicate
-
range
private final MinMaxBounds.FloatBound range
-
aabb
@Nullable private final AxisAlignedBB aabb
-
currentEntity
private final boolean currentEntity
-
playerName
@Nullable private final java.lang.String playerName
-
entityUUID
@Nullable private final java.util.UUID entityUUID
-
type
@Nullable private final EntityType<?> type
-
usesSelector
private final boolean usesSelector
-
-
Constructor Detail
-
EntitySelector
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<Vector3d,Vector3d> p_i50800_6_, @Nullable AxisAlignedBB p_i50800_7_, java.util.function.BiConsumer<Vector3d,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_)
-
-
Method Detail
-
getMaxResults
public int getMaxResults()
-
includesEntities
public boolean includesEntities()
-
isSelfSelector
public boolean isSelfSelector()
-
isWorldLimited
public boolean isWorldLimited()
-
checkPermissions
private void checkPermissions(CommandSource p_210324_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findSingleEntity
public Entity findSingleEntity(CommandSource p_197340_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findEntities
public java.util.List<? extends Entity> findEntities(CommandSource p_197341_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
addEntities
private void addEntities(java.util.List<Entity> p_197348_1_, ServerWorld p_197348_2_, Vector3d p_197348_3_, java.util.function.Predicate<Entity> p_197348_4_)
-
findSinglePlayer
public ServerPlayerEntity findSinglePlayer(CommandSource p_197347_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
findPlayers
public java.util.List<ServerPlayerEntity> findPlayers(CommandSource p_197342_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
sortAndLimit
private <T extends Entity> java.util.List<T> sortAndLimit(Vector3d p_197345_1_, java.util.List<T> p_197345_2_)
-
joinNames
public static IFormattableTextComponent joinNames(java.util.List<? extends Entity> p_197350_0_)
-
-