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
    • predicate

      private final Predicate<Entity> predicate
    • 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
    • findEntitiesRaw

      private List<? extends Entity> findEntitiesRaw(CommandSourceStack p_251934_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • addEntities

      private void addEntities(List<Entity> p_121155_, ServerLevel p_121156_, Vec3 p_121157_, 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
    • getPredicate

      private Predicate<Entity> getPredicate(Vec3 p_121145_)
    • 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_)