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>
basePredicate
private Box
box
private NumberRange.FloatRange
distance
private static class_5575<Entity,?>
field_27774
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 class_5575<Entity,?>
type
private boolean
usesAt
private UUID
uuid
-
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 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>
List<T>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()
-
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
-