Package net.minecraft.command.arguments
Class EntitySelectorParser
java.lang.Object
net.minecraft.command.arguments.EntitySelectorParser
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private boolean
private Double
private Double
private Double
private MinMaxBounds.FloatBound
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.IntBound
private int
private BiConsumer<Vector3d,
List<? extends Entity>> static final BiConsumer<Vector3d,
List<? extends Entity>> static final BiConsumer<Vector3d,
List<? extends Entity>> static final BiConsumer<Vector3d,
List<? extends Entity>> static final BiConsumer<Vector3d,
List<? extends Entity>> private String
private final com.mojang.brigadier.StringReader
private MinMaxBoundsWrapped
private MinMaxBoundsWrapped
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>> private EntityType<?>
private boolean
private boolean
private boolean
private Double
private Double
private Double
-
Constructor Summary
ConstructorDescriptionEntitySelectorParser
(com.mojang.brigadier.StringReader p_i47958_1_) EntitySelectorParser
(com.mojang.brigadier.StringReader p_i49550_1_, boolean p_i49550_2_) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPredicate
(Predicate<Entity> p_197401_1_) private AxisAlignedBB
createAabb
(double p_197390_1_, double p_197390_3_, double p_197390_5_) createRotationPredicate
(MinMaxBoundsWrapped p_197366_1_, ToDoubleFunction<Entity> p_197366_2_) private static void
fillSelectorSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_210326_0_) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
fillSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201993_1_, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> p_201993_2_) void
getLevel()
com.mojang.brigadier.StringReader
getRotX()
getRotY()
getX()
getY()
getZ()
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSorted()
boolean
isTag()
boolean
boolean
void
limitToType
(EntityType<?> p_218114_1_) parse()
protected void
void
protected void
void
setDeltaX
(double p_197377_1_) void
setDeltaY
(double p_197391_1_) void
setDeltaZ
(double p_197405_1_) void
setDistance
(MinMaxBounds.FloatBound p_197397_1_) void
setHasAdvancements
(boolean p_201992_1_) void
setHasGamemodeEquals
(boolean p_201988_1_) void
setHasGamemodeNotEquals
(boolean p_201973_1_) void
setHasNameEquals
(boolean p_201990_1_) void
setHasNameNotEquals
(boolean p_201998_1_) void
setHasScores
(boolean p_201970_1_) void
setHasTeamEquals
(boolean p_201975_1_) void
setHasTeamNotEquals
(boolean p_201958_1_) void
setIncludesEntities
(boolean p_197373_1_) void
setLevel
(MinMaxBounds.IntBound p_197399_1_) void
setLimited
(boolean p_201979_1_) void
setMaxResults
(int p_197388_1_) void
setOrder
(BiConsumer<Vector3d, List<? extends Entity>> p_197376_1_) void
setRotX
(MinMaxBoundsWrapped p_197389_1_) void
setRotY
(MinMaxBoundsWrapped p_197387_1_) void
setSorted
(boolean p_201986_1_) void
setSuggestions
(BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> p_201978_1_) void
void
void
setX
(double p_197384_1_) void
setY
(double p_197395_1_) void
setZ
(double p_197372_1_) boolean
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_) 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_) 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_) 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_) 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_) 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_) 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_)
-
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
-
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_i47958_1_) -
EntitySelectorParser
public EntitySelectorParser(com.mojang.brigadier.StringReader p_i49550_1_, boolean p_i49550_2_)
-
-
Method Details
-
getSelector
-
createAabb
-
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
-
setWorldLimited
public void setWorldLimited() -
getDistance
-
setDistance
-
getLevel
-
setLevel
-
getRotX
-
setRotX
-
getRotY
-
setRotY
-
getX
-
getY
-
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
-
getDeltaY
-
getDeltaZ
-
setMaxResults
public void setMaxResults(int p_197388_1_) -
setIncludesEntities
public void setIncludesEntities(boolean p_197373_1_) -
setOrder
-
parse
- 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
-
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_)
-