Class EntitySelectorParser


  • public class EntitySelectorParser
    extends java.lang.Object
    • Field Detail

      • 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 java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> ORDER_ARBITRARY
      • ORDER_NEAREST

        public static final java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> ORDER_NEAREST
      • ORDER_FURTHEST

        public static final java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> ORDER_FURTHEST
      • ORDER_RANDOM

        public static final java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> ORDER_RANDOM
      • SUGGEST_NOTHING

        public static final java.util.function.BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,​java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,​java.util.concurrent.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
      • x

        @Nullable
        private java.lang.Double x
      • y

        @Nullable
        private java.lang.Double y
      • z

        @Nullable
        private java.lang.Double z
      • deltaX

        @Nullable
        private java.lang.Double deltaX
      • deltaY

        @Nullable
        private java.lang.Double deltaY
      • deltaZ

        @Nullable
        private java.lang.Double deltaZ
      • predicate

        private java.util.function.Predicate<Entity> predicate
      • order

        private java.util.function.BiConsumer<Vector3d,​java.util.List<? extends Entity>> order
      • currentEntity

        private boolean currentEntity
      • playerName

        @Nullable
        private java.lang.String playerName
      • startPosition

        private int startPosition
      • entityUUID

        @Nullable
        private java.util.UUID entityUUID
      • suggestions

        private java.util.function.BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,​java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,​java.util.concurrent.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
      • typeInverse

        private boolean typeInverse
      • hasScores

        private boolean hasScores
      • hasAdvancements

        private boolean hasAdvancements
      • usesSelectors

        private boolean usesSelectors
    • Constructor Detail

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

      • createAabb

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

        public void finalizePredicates()
      • createRotationPredicate

        private java.util.function.Predicate<Entity> createRotationPredicate​(MinMaxBoundsWrapped p_197366_1_,
                                                                             java.util.function.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​(java.util.function.Predicate<Entity> p_197401_1_)
      • setWorldLimited

        public void setWorldLimited()
      • getX

        @Nullable
        public java.lang.Double getX()
      • getY

        @Nullable
        public java.lang.Double getY()
      • getZ

        @Nullable
        public java.lang.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 java.lang.Double getDeltaX()
      • getDeltaY

        @Nullable
        public java.lang.Double getDeltaY()
      • getDeltaZ

        @Nullable
        public java.lang.Double getDeltaZ()
      • setMaxResults

        public void setMaxResults​(int p_197388_1_)
      • setIncludesEntities

        public void setIncludesEntities​(boolean p_197373_1_)
      • setOrder

        public void setOrder​(java.util.function.BiConsumer<Vector3d,​java.util.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 java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNameOrSelector​(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201981_1_,
                                                                                                                          java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201981_2_)
      • suggestName

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

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

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

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

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

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

        public boolean isCurrentEntity()
      • setSuggestions

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

        public java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions​(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201993_1_,
                                                                                                                   java.util.function.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_)