Class EntitySelectorParser
java.lang.Object
net.minecraft.commands.arguments.selector.EntitySelectorParser
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private boolean
private Double
private Double
private Double
private MinMaxBounds.Doubles
private UUID
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private boolean
private MinMaxBounds.Ints
private int
private BiConsumer<Vec3,
List<? extends Entity>> static final BiConsumer<Vec3,
List<? extends Entity>> static final BiConsumer<Vec3,
List<? extends Entity>> static final BiConsumer<Vec3,
List<? extends Entity>> static final BiConsumer<Vec3,
List<? extends Entity>> private String
private final com.mojang.brigadier.StringReader
private WrappedMinMaxBounds
private WrappedMinMaxBounds
private static final char
private static final char
private static final char
private static final char
private static final char
private int
static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> static final char
private static final char
static final char
private static final char
private static final char
static final char
static final char
private EntityType<?>
private boolean
private boolean
private boolean
private Double
private Double
private Double
-
Constructor Summary
ConstructorDescriptionEntitySelectorParser
(com.mojang.brigadier.StringReader p_121218_) EntitySelectorParser
(com.mojang.brigadier.StringReader p_121220_, boolean p_121221_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredicate
(Predicate<Entity> p_121273_) private AABB
createAabb
(double p_121234_, double p_121235_, double p_121236_) createRotationPredicate
(WrappedMinMaxBounds p_121255_, ToDoubleFunction<Entity> p_121256_) private static void
fillSelectorSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121248_) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
fillSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121250_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121251_) void
getLevel()
BiConsumer<Vec3,
List<? extends Entity>> getOrder()
com.mojang.brigadier.StringReader
getRotX()
getRotY()
getX()
getY()
getZ()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSorted()
boolean
isTag()
boolean
boolean
void
limitToType
(EntityType<?> p_121242_) parse()
protected void
void
protected void
void
setDeltaX
(double p_121319_) void
setDeltaY
(double p_121332_) void
setDeltaZ
(double p_121340_) void
setDistance
(MinMaxBounds.Doubles p_175128_) void
setHasAdvancements
(boolean p_121369_) void
setHasGamemodeEquals
(boolean p_121345_) void
setHasGamemodeNotEquals
(boolean p_121351_) void
setHasNameEquals
(boolean p_121303_) void
setHasNameNotEquals
(boolean p_121316_) void
setHasScores
(boolean p_121366_) void
setHasTeamEquals
(boolean p_121357_) void
setHasTeamNotEquals
(boolean p_121360_) void
setIncludesEntities
(boolean p_121280_) void
setLevel
(MinMaxBounds.Ints p_121246_) void
setLimited
(boolean p_121329_) void
setMaxResults
(int p_121238_) void
setOrder
(BiConsumer<Vec3, List<? extends Entity>> p_121269_) void
setRotX
(WrappedMinMaxBounds p_121253_) void
setRotY
(WrappedMinMaxBounds p_121290_) void
setSorted
(boolean p_121337_) void
setSuggestions
(BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> p_121271_) void
void
void
setX
(double p_121232_) void
setY
(double p_121283_) void
setZ
(double p_121306_) boolean
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestEquals
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_175144_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_175145_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestName
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121310_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121311_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestNameOrSelector
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121287_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121288_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenOptions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121334_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121335_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOptionsKey
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121348_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121349_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOptionsKeyOrClose
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121342_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121343_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOptionsNextOrClose
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121354_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121355_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestSelector
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121323_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121324_)
-
Field Details
-
SYNTAX_SELECTOR_START
public static final char SYNTAX_SELECTOR_START- See Also:
-
SYNTAX_OPTIONS_START
private static final char SYNTAX_OPTIONS_START- See Also:
-
SYNTAX_OPTIONS_END
private static final char SYNTAX_OPTIONS_END- See Also:
-
SYNTAX_OPTIONS_KEY_VALUE_SEPARATOR
public static final char SYNTAX_OPTIONS_KEY_VALUE_SEPARATOR- See Also:
-
SYNTAX_OPTIONS_SEPARATOR
private static final char SYNTAX_OPTIONS_SEPARATOR- See Also:
-
SYNTAX_NOT
public static final char SYNTAX_NOT- See Also:
-
SYNTAX_TAG
public static final char SYNTAX_TAG- See Also:
-
SELECTOR_NEAREST_PLAYER
private static final char SELECTOR_NEAREST_PLAYER- See Also:
-
SELECTOR_ALL_PLAYERS
private static final char SELECTOR_ALL_PLAYERS- See Also:
-
SELECTOR_RANDOM_PLAYERS
private static final char SELECTOR_RANDOM_PLAYERS- See Also:
-
SELECTOR_CURRENT_ENTITY
private static final char SELECTOR_CURRENT_ENTITY- See Also:
-
SELECTOR_ALL_ENTITIES
private static final char SELECTOR_ALL_ENTITIES- See Also:
-
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
-
ORDER_NEAREST
-
ORDER_FURTHEST
-
ORDER_RANDOM
-
SUGGEST_NOTHING
public static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, SUGGEST_NOTHINGCompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> -
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
-
level
-
x
-
y
-
z
-
deltaX
-
deltaY
-
deltaZ
-
rotX
-
rotY
-
predicate
-
order
-
currentEntity
private boolean currentEntity -
playerName
-
startPosition
private int startPosition -
entityUUID
-
suggestions
private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, suggestionsCompletableFuture<com.mojang.brigadier.suggestion.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
-
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_121218_) -
EntitySelectorParser
public EntitySelectorParser(com.mojang.brigadier.StringReader p_121220_, boolean p_121221_)
-
-
Method Details
-
getSelector
-
createAabb
-
finalizePredicates
public void finalizePredicates() -
createRotationPredicate
private Predicate<Entity> createRotationPredicate(WrappedMinMaxBounds p_121255_, ToDoubleFunction<Entity> p_121256_) -
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
-
setWorldLimited
public void setWorldLimited() -
getDistance
-
setDistance
-
getLevel
-
setLevel
-
getRotX
-
setRotX
-
getRotY
-
setRotY
-
getX
-
getY
-
getZ
-
setX
public void setX(double p_121232_) -
setY
public void setY(double p_121283_) -
setZ
public void setZ(double p_121306_) -
setDeltaX
public void setDeltaX(double p_121319_) -
setDeltaY
public void setDeltaY(double p_121332_) -
setDeltaZ
public void setDeltaZ(double p_121340_) -
getDeltaX
-
getDeltaY
-
getDeltaZ
-
setMaxResults
public void setMaxResults(int p_121238_) -
setIncludesEntities
public void setIncludesEntities(boolean p_121280_) -
getOrder
-
setOrder
-
parse
- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
fillSelectorSuggestions
private static void fillSelectorSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121248_) -
suggestNameOrSelector
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNameOrSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121287_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121288_) -
suggestName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121310_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121311_) -
suggestSelector
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121323_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121324_) -
suggestOpenOptions
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenOptions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121334_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121335_) -
suggestOptionsKeyOrClose
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsKeyOrClose(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121342_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121343_) -
suggestOptionsKey
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsKey(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121348_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121349_) -
suggestOptionsNextOrClose
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsNextOrClose(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121354_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121355_) -
suggestEquals
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder p_175144_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_175145_) -
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_121271_) -
fillSuggestions
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_121250_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_121251_) -
hasNameEquals
public boolean hasNameEquals() -
setHasNameEquals
public void setHasNameEquals(boolean p_121303_) -
hasNameNotEquals
public boolean hasNameNotEquals() -
setHasNameNotEquals
public void setHasNameNotEquals(boolean p_121316_) -
isLimited
public boolean isLimited() -
setLimited
public void setLimited(boolean p_121329_) -
isSorted
public boolean isSorted() -
setSorted
public void setSorted(boolean p_121337_) -
hasGamemodeEquals
public boolean hasGamemodeEquals() -
setHasGamemodeEquals
public void setHasGamemodeEquals(boolean p_121345_) -
hasGamemodeNotEquals
public boolean hasGamemodeNotEquals() -
setHasGamemodeNotEquals
public void setHasGamemodeNotEquals(boolean p_121351_) -
hasTeamEquals
public boolean hasTeamEquals() -
setHasTeamEquals
public void setHasTeamEquals(boolean p_121357_) -
hasTeamNotEquals
public boolean hasTeamNotEquals() -
setHasTeamNotEquals
public void setHasTeamNotEquals(boolean p_121360_) -
limitToType
-
setTypeLimitedInversely
public void setTypeLimitedInversely() -
isTypeLimited
public boolean isTypeLimited() -
isTypeLimitedInversely
public boolean isTypeLimitedInversely() -
hasScores
public boolean hasScores() -
setHasScores
public void setHasScores(boolean p_121366_) -
hasAdvancements
public boolean hasAdvancements() -
setHasAdvancements
public void setHasAdvancements(boolean p_121369_)
-