Class EntitySelector

java.lang.Object
net.minecraft.commands.arguments.selector.EntitySelector

public class EntitySelector extends Object
  • Field Details

    • INFINITE

      public static final int INFINITE
      See Also:
    • ORDER_ARBITRARY

      public static final BiConsumer<Vec3,List<? extends Entity>> ORDER_ARBITRARY
    • ANY_TYPE

      private static final EntityTypeTest<Entity,?> ANY_TYPE
    • maxResults

      private final int maxResults
    • includesEntities

      private final boolean includesEntities
    • worldLimited

      private final boolean worldLimited
    • contextFreePredicates

      private final List<Predicate<Entity>> contextFreePredicates
    • range

      private final MinMaxBounds.Doubles range
    • position

      private final Function<Vec3,Vec3> position
    • aabb

      @Nullable private final AABB aabb
    • order

      private final BiConsumer<Vec3,List<? extends Entity>> order
    • currentEntity

      private final boolean currentEntity
    • playerName

      @Nullable private final String playerName
    • entityUUID

      @Nullable private final UUID entityUUID
    • type

      private final EntityTypeTest<Entity,?> type
    • usesSelector

      private final boolean usesSelector
  • Constructor Details

  • 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

      private void addEntities(List<Entity> p_121155_, ServerLevel p_121156_, @Nullable AABB p_343022_, Predicate<Entity> p_121158_)
    • 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

      @Nullable private AABB getAbsoluteAabb(Vec3 p_345041_)
    • getPredicate

      private Predicate<Entity> getPredicate(Vec3 p_121145_, @Nullable AABB p_343863_, @Nullable FeatureFlagSet p_343062_)
    • sortAndLimit

      private <T extends Entity> List<T> sortAndLimit(Vec3 p_121150_, List<T> p_121151_)
    • joinNames

      public static Component joinNames(List<? extends Entity> p_175104_)