Package net.minecraft.command
Class EntitySelector
java.lang.Object
net.minecraft.command.EntitySelector
public class EntitySelector extends Object
-
Field Summary
Fields Modifier and Type Field Description private Predicate<Entity>basePredicateprivate Boxboxprivate NumberRange.FloatRangedistanceprivate static class_5575<Entity,?>field_27774private booleanincludesNonPlayersprivate intlimitprivate booleanlocalWorldOnlyprivate StringplayerNameprivate Function<Vec3d,Vec3d>positionOffsetprivate booleansenderOnlyprivate BiConsumer<Vec3d,List<? extends Entity>>sorterprivate class_5575<Entity,?>typeprivate booleanusesAtprivate UUIDuuid -
Constructor Summary
Constructors Constructor 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) -
Method Summary
Modifier and Type Method Description private voidappendEntitiesFromWorld(List<Entity> list, ServerWorld serverWorld, Vec3d vec3d, Predicate<Entity> predicate)private voidcheckSourcePermission(ServerCommandSource serverCommandSource)List<? extends Entity>getEntities(ServerCommandSource serverCommandSource)private <T extends Entity>
List<T>getEntities(Vec3d vec3d, List<T> list)EntitygetEntity(ServerCommandSource serverCommandSource)intgetLimit()static MutableTextgetNames(List<? extends Entity> list)ServerPlayerEntitygetPlayer(ServerCommandSource serverCommandSource)List<ServerPlayerEntity>getPlayers(ServerCommandSource serverCommandSource)private Predicate<Entity>getPositionPredicate(Vec3d vec3d)booleanincludesNonPlayers()booleanisLocalWorldOnly()booleanisSenderOnly()
-
Field Details
-
field_27774
-
limit
private final int limit -
includesNonPlayers
private final boolean includesNonPlayers -
localWorldOnly
private final boolean localWorldOnly -
basePredicate
-
distance
-
positionOffset
-
box
-
sorter
-
senderOnly
private final boolean senderOnly -
playerName
-
uuid
-
type
-
usesAt
private final boolean usesAt
-
-
Constructor Details
-
EntitySelector
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)
-
-
Method Details
-
getLimit
public int getLimit() -
includesNonPlayers
public boolean includesNonPlayers() -
isSenderOnly
public boolean isSenderOnly() -
isLocalWorldOnly
public boolean isLocalWorldOnly() -
checkSourcePermission
private void checkSourcePermission(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntity
public Entity getEntity(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getEntities
-
appendEntitiesFromWorld
-
getPlayer
public ServerPlayerEntity getPlayer(ServerCommandSource serverCommandSource) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
getPlayers
-
getPositionPredicate
-
getEntities
-
getNames
-