Class EntitySelector

java.lang.Object
net.minecraft.command.arguments.EntitySelector

public class EntitySelector extends Object
  • Field Details

    • 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.FloatBound range
    • position

      private final Function<Vector3d,Vector3d> position
    • aabb

      @Nullable private final AxisAlignedBB aabb
    • order

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

      private final boolean currentEntity
    • playerName

      @Nullable private final String playerName
    • entityUUID

      @Nullable private final UUID entityUUID
    • type

      @Nullable private final EntityType<?> 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()
    • 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 List<? extends Entity> findEntities(CommandSource p_197341_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • addEntities

      private void addEntities(List<Entity> p_197348_1_, ServerWorld p_197348_2_, Vector3d p_197348_3_, 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 List<ServerPlayerEntity> findPlayers(CommandSource p_197342_1_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • getPredicate

      private Predicate<Entity> getPredicate(Vector3d p_197349_1_)
    • sortAndLimit

      private <T extends Entity> List<T> sortAndLimit(Vector3d p_197345_1_, List<T> p_197345_2_)
    • joinNames

      public static IFormattableTextComponent joinNames(List<? extends Entity> p_197350_0_)