Class EntitySelectorParser

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

public class EntitySelectorParser extends Object
  • Field Details

    • ERROR_INVALID_NAME_OR_UUID

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_INVALID_NAME_OR_UUID
    • ERROR_UNKNOWN_SELECTOR_TYPE

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_SELECTOR_TYPE
    • ERROR_SELECTORS_NOT_ALLOWED

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_SELECTORS_NOT_ALLOWED
    • ERROR_MISSING_SELECTOR_TYPE

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_MISSING_SELECTOR_TYPE
    • ERROR_EXPECTED_END_OF_OPTIONS

      public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EXPECTED_END_OF_OPTIONS
    • ERROR_EXPECTED_OPTION_VALUE

      public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_EXPECTED_OPTION_VALUE
    • ORDER_ARBITRARY

      public static final BiConsumer<Vector3d,List<? extends Entity>> ORDER_ARBITRARY
    • ORDER_NEAREST

      public static final BiConsumer<Vector3d,List<? extends Entity>> ORDER_NEAREST
    • ORDER_FURTHEST

      public static final BiConsumer<Vector3d,List<? extends Entity>> ORDER_FURTHEST
    • ORDER_RANDOM

      public static final BiConsumer<Vector3d,List<? extends Entity>> ORDER_RANDOM
    • SUGGEST_NOTHING

      public static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> SUGGEST_NOTHING
    • reader

      private final com.mojang.brigadier.StringReader reader
    • allowSelectors

      private final boolean allowSelectors
    • maxResults

      private int maxResults
    • includesEntities

      private boolean includesEntities
    • worldLimited

      private boolean worldLimited
    • distance

      private MinMaxBounds.FloatBound distance
    • level

      private MinMaxBounds.IntBound level
    • x

      @Nullable private Double x
    • y

      @Nullable private Double y
    • z

      @Nullable private Double z
    • deltaX

      @Nullable private Double deltaX
    • deltaY

      @Nullable private Double deltaY
    • deltaZ

      @Nullable private Double deltaZ
    • rotX

      private MinMaxBoundsWrapped rotX
    • rotY

      private MinMaxBoundsWrapped rotY
    • predicate

      private Predicate<Entity> predicate
    • order

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

      private boolean currentEntity
    • playerName

      @Nullable private String playerName
    • startPosition

      private int startPosition
    • entityUUID

      @Nullable private UUID entityUUID
    • suggestions

      private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestions
    • hasNameEquals

      private boolean hasNameEquals
    • hasNameNotEquals

      private boolean hasNameNotEquals
    • isLimited

      private boolean isLimited
    • isSorted

      private boolean isSorted
    • hasGamemodeEquals

      private boolean hasGamemodeEquals
    • hasGamemodeNotEquals

      private boolean hasGamemodeNotEquals
    • hasTeamEquals

      private boolean hasTeamEquals
    • hasTeamNotEquals

      private boolean hasTeamNotEquals
    • type

      @Nullable private EntityType<?> type
    • typeInverse

      private boolean typeInverse
    • hasScores

      private boolean hasScores
    • hasAdvancements

      private boolean hasAdvancements
    • usesSelectors

      private boolean usesSelectors
  • Constructor Details

    • EntitySelectorParser

      public EntitySelectorParser(com.mojang.brigadier.StringReader p_i47958_1_)
    • EntitySelectorParser

      public EntitySelectorParser(com.mojang.brigadier.StringReader p_i49550_1_, boolean p_i49550_2_)
  • Method Details

    • getSelector

      public EntitySelector getSelector()
    • createAabb

      private AxisAlignedBB createAabb(double p_197390_1_, double p_197390_3_, double p_197390_5_)
    • finalizePredicates

      public void finalizePredicates()
    • createRotationPredicate

      private Predicate<Entity> createRotationPredicate(MinMaxBoundsWrapped p_197366_1_, ToDoubleFunction<Entity> p_197366_2_)
    • parseSelector

      protected void parseSelector() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parseNameOrUUID

      protected void parseNameOrUUID() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • parseOptions

      public void parseOptions() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • shouldInvertValue

      public boolean shouldInvertValue()
    • isTag

      public boolean isTag()
    • getReader

      public com.mojang.brigadier.StringReader getReader()
    • addPredicate

      public void addPredicate(Predicate<Entity> p_197401_1_)
    • setWorldLimited

      public void setWorldLimited()
    • getDistance

      public MinMaxBounds.FloatBound getDistance()
    • setDistance

      public void setDistance(MinMaxBounds.FloatBound p_197397_1_)
    • getLevel

      public MinMaxBounds.IntBound getLevel()
    • setLevel

      public void setLevel(MinMaxBounds.IntBound p_197399_1_)
    • getRotX

      public MinMaxBoundsWrapped getRotX()
    • setRotX

      public void setRotX(MinMaxBoundsWrapped p_197389_1_)
    • getRotY

      public MinMaxBoundsWrapped getRotY()
    • setRotY

      public void setRotY(MinMaxBoundsWrapped p_197387_1_)
    • getX

      @Nullable public Double getX()
    • getY

      @Nullable public Double getY()
    • getZ

      @Nullable public Double getZ()
    • setX

      public void setX(double p_197384_1_)
    • setY

      public void setY(double p_197395_1_)
    • setZ

      public void setZ(double p_197372_1_)
    • setDeltaX

      public void setDeltaX(double p_197377_1_)
    • setDeltaY

      public void setDeltaY(double p_197391_1_)
    • setDeltaZ

      public void setDeltaZ(double p_197405_1_)
    • getDeltaX

      @Nullable public Double getDeltaX()
    • getDeltaY

      @Nullable public Double getDeltaY()
    • getDeltaZ

      @Nullable public Double getDeltaZ()
    • setMaxResults

      public void setMaxResults(int p_197388_1_)
    • setIncludesEntities

      public void setIncludesEntities(boolean p_197373_1_)
    • setOrder

      public void setOrder(BiConsumer<Vector3d,List<? extends Entity>> p_197376_1_)
    • parse

      public EntitySelector parse() throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • fillSelectorSuggestions

      private static void fillSelectorSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_210326_0_)
    • suggestNameOrSelector

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNameOrSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201981_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201981_2_)
    • suggestName

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201974_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201974_2_)
    • suggestSelector

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201959_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201959_2_)
    • suggestOpenOptions

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenOptions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201989_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201989_2_)
    • suggestOptionsKeyOrClose

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsKeyOrClose(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201996_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201996_2_)
    • suggestOptionsKey

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsKey(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201994_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201994_2_)
    • suggestOptionsNextOrClose

      private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsNextOrClose(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201969_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201969_2_)
    • isCurrentEntity

      public boolean isCurrentEntity()
    • setSuggestions

      public void setSuggestions(BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> p_201978_1_)
    • fillSuggestions

      public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201993_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201993_2_)
    • hasNameEquals

      public boolean hasNameEquals()
    • setHasNameEquals

      public void setHasNameEquals(boolean p_201990_1_)
    • hasNameNotEquals

      public boolean hasNameNotEquals()
    • setHasNameNotEquals

      public void setHasNameNotEquals(boolean p_201998_1_)
    • isLimited

      public boolean isLimited()
    • setLimited

      public void setLimited(boolean p_201979_1_)
    • isSorted

      public boolean isSorted()
    • setSorted

      public void setSorted(boolean p_201986_1_)
    • hasGamemodeEquals

      public boolean hasGamemodeEquals()
    • setHasGamemodeEquals

      public void setHasGamemodeEquals(boolean p_201988_1_)
    • hasGamemodeNotEquals

      public boolean hasGamemodeNotEquals()
    • setHasGamemodeNotEquals

      public void setHasGamemodeNotEquals(boolean p_201973_1_)
    • hasTeamEquals

      public boolean hasTeamEquals()
    • setHasTeamEquals

      public void setHasTeamEquals(boolean p_201975_1_)
    • setHasTeamNotEquals

      public void setHasTeamNotEquals(boolean p_201958_1_)
    • limitToType

      public void limitToType(EntityType<?> p_218114_1_)
    • setTypeLimitedInversely

      public void setTypeLimitedInversely()
    • isTypeLimited

      public boolean isTypeLimited()
    • isTypeLimitedInversely

      public boolean isTypeLimitedInversely()
    • hasScores

      public boolean hasScores()
    • setHasScores

      public void setHasScores(boolean p_201970_1_)
    • hasAdvancements

      public boolean hasAdvancements()
    • setHasAdvancements

      public void setHasAdvancements(boolean p_201992_1_)