public class EntitySelectorParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
ARBITRARY |
private boolean |
checkPermission |
private boolean |
currentWorldOnly |
private int |
cursorStart |
private MinMaxBounds.FloatBound |
distance |
private java.lang.Double |
dx |
private java.lang.Double |
dy |
private java.lang.Double |
dz |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
EXPECTED_END_OF_OPTIONS |
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
EXPECTED_VALUE_FOR_OPTION |
private java.util.function.Predicate<Entity> |
filter |
static java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
FURTHEST |
private boolean |
hasAdvancements |
private boolean |
hasGamemodeEquals |
private boolean |
hasGamemodeNotEquals |
private boolean |
hasNameEquals |
private boolean |
hasNameNotEquals |
private boolean |
hasPermission |
private boolean |
hasScores |
private boolean |
hasTeamEquals |
private boolean |
hasTeamNotEquals |
private boolean |
includeNonPlayers |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
INVALID_ENTITY_NAME_OR_UUID |
private boolean |
isLimited |
private boolean |
isSorted |
private MinMaxBounds.IntBound |
level |
private int |
limit |
static java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
NEAREST |
static java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
RANDOM |
private com.mojang.brigadier.StringReader |
reader |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
SELECTOR_NOT_ALLOWED |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
SELECTOR_TYPE_MISSING |
private boolean |
self |
private java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> |
sorter |
static 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_NONE |
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>> |
suggestionHandler |
private EntityType<?> |
type |
private boolean |
typeInverse |
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
UNKNOWN_SELECTOR_TYPE |
private java.lang.String |
username |
private java.util.UUID |
uuid |
private java.lang.Double |
x |
private MinMaxBoundsWrapped |
xRotation |
private java.lang.Double |
y |
private MinMaxBoundsWrapped |
yRotation |
private java.lang.Double |
z |
Constructor and Description |
---|
EntitySelectorParser(com.mojang.brigadier.StringReader readerIn) |
EntitySelectorParser(com.mojang.brigadier.StringReader readerIn,
boolean hasPermissionIn) |
Modifier and Type | Method and Description |
---|---|
void |
addFilter(java.util.function.Predicate<Entity> filterIn) |
EntitySelector |
build() |
private AxisAlignedBB |
createAABB(double sizeX,
double sizeY,
double sizeZ) |
private java.util.function.Predicate<Entity> |
createRotationPredicate(MinMaxBoundsWrapped angleBounds,
java.util.function.ToDoubleFunction<Entity> angleFunc) |
private static void |
fillSelectorSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder) |
java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
void |
func_218114_a(EntityType<?> p_218114_1_) |
boolean |
func_218115_f() |
MinMaxBounds.FloatBound |
getDistance() |
java.lang.Double |
getDx() |
java.lang.Double |
getDy() |
java.lang.Double |
getDz() |
MinMaxBounds.IntBound |
getLevel() |
com.mojang.brigadier.StringReader |
getReader() |
java.lang.Double |
getX() |
MinMaxBoundsWrapped |
getXRotation() |
java.lang.Double |
getY() |
MinMaxBoundsWrapped |
getYRotation() |
java.lang.Double |
getZ() |
boolean |
hasAdvancements() |
boolean |
hasGamemodeEquals() |
boolean |
hasGamemodeNotEquals() |
boolean |
hasNameEquals() |
boolean |
hasNameNotEquals() |
boolean |
hasScores() |
boolean |
hasTeamEquals() |
boolean |
isCurrentEntity() |
boolean |
isLimited() |
boolean |
isSorted() |
boolean |
isTypeLimited() |
boolean |
isTypeLimitedInversely() |
EntitySelector |
parse() |
void |
parseArguments() |
protected void |
parseSelector() |
protected void |
parseSingleEntity() |
void |
setCurrentWorldOnly() |
void |
setDistance(MinMaxBounds.FloatBound distanceIn) |
void |
setDx(double dxIn) |
void |
setDy(double dyIn) |
void |
setDz(double dzIn) |
void |
setHasAdvancements(boolean value) |
void |
setHasGamemodeEquals(boolean value) |
void |
setHasGamemodeNotEquals(boolean value) |
void |
setHasNameEquals(boolean value) |
void |
setHasNameNotEquals(boolean value) |
void |
setHasScores(boolean value) |
void |
setHasTeamEquals(boolean value) |
void |
setHasTeamNotEquals(boolean value) |
void |
setIncludeNonPlayers(boolean includeNonPlayersIn) |
void |
setLevel(MinMaxBounds.IntBound levelIn) |
void |
setLimit(int limitIn) |
void |
setLimited(boolean value) |
void |
setSorted(boolean value) |
void |
setSorter(java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> sorterIn) |
void |
setSuggestionHandler(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>> suggestionHandlerIn) |
void |
setTypeLimitedInversely() |
void |
setX(double xIn) |
void |
setXRotation(MinMaxBoundsWrapped xRotationIn) |
void |
setY(double yIn) |
void |
setYRotation(MinMaxBoundsWrapped yRotationIn) |
void |
setZ(double zIn) |
boolean |
shouldInvertValue() |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestCommaOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestName(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestNameOrSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOpenBracket(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOptions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOptionsOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
void |
updateFilter() |
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_ENTITY_NAME_OR_UUID
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_SELECTOR_TYPE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType SELECTOR_NOT_ALLOWED
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType SELECTOR_TYPE_MISSING
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType EXPECTED_END_OF_OPTIONS
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType EXPECTED_VALUE_FOR_OPTION
public static final java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> ARBITRARY
public static final java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> NEAREST
public static final java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> FURTHEST
public static final java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> RANDOM
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_NONE
private final com.mojang.brigadier.StringReader reader
private final boolean hasPermission
private int limit
private boolean includeNonPlayers
private boolean currentWorldOnly
private MinMaxBounds.FloatBound distance
private MinMaxBounds.IntBound level
@Nullable private java.lang.Double x
@Nullable private java.lang.Double y
@Nullable private java.lang.Double z
@Nullable private java.lang.Double dx
@Nullable private java.lang.Double dy
@Nullable private java.lang.Double dz
private MinMaxBoundsWrapped xRotation
private MinMaxBoundsWrapped yRotation
private java.util.function.Predicate<Entity> filter
private boolean self
@Nullable private java.lang.String username
private int cursorStart
@Nullable private java.util.UUID uuid
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>> suggestionHandler
private boolean hasNameEquals
private boolean hasNameNotEquals
private boolean isLimited
private boolean isSorted
private boolean hasGamemodeEquals
private boolean hasGamemodeNotEquals
private boolean hasTeamEquals
private boolean hasTeamNotEquals
@Nullable private EntityType<?> type
private boolean typeInverse
private boolean hasScores
private boolean hasAdvancements
private boolean checkPermission
public EntitySelectorParser(com.mojang.brigadier.StringReader readerIn)
public EntitySelectorParser(com.mojang.brigadier.StringReader readerIn, boolean hasPermissionIn)
public EntitySelector build()
private AxisAlignedBB createAABB(double sizeX, double sizeY, double sizeZ)
public void updateFilter()
private java.util.function.Predicate<Entity> createRotationPredicate(MinMaxBoundsWrapped angleBounds, java.util.function.ToDoubleFunction<Entity> angleFunc)
protected void parseSelector() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
protected void parseSingleEntity() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public void parseArguments() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public boolean shouldInvertValue()
public boolean func_218115_f()
public com.mojang.brigadier.StringReader getReader()
public void addFilter(java.util.function.Predicate<Entity> filterIn)
public void setCurrentWorldOnly()
public MinMaxBounds.FloatBound getDistance()
public void setDistance(MinMaxBounds.FloatBound distanceIn)
public MinMaxBounds.IntBound getLevel()
public void setLevel(MinMaxBounds.IntBound levelIn)
public MinMaxBoundsWrapped getXRotation()
public void setXRotation(MinMaxBoundsWrapped xRotationIn)
public MinMaxBoundsWrapped getYRotation()
public void setYRotation(MinMaxBoundsWrapped yRotationIn)
@Nullable public java.lang.Double getX()
@Nullable public java.lang.Double getY()
@Nullable public java.lang.Double getZ()
public void setX(double xIn)
public void setY(double yIn)
public void setZ(double zIn)
public void setDx(double dxIn)
public void setDy(double dyIn)
public void setDz(double dzIn)
@Nullable public java.lang.Double getDx()
@Nullable public java.lang.Double getDy()
@Nullable public java.lang.Double getDz()
public void setLimit(int limitIn)
public void setIncludeNonPlayers(boolean includeNonPlayersIn)
public void setSorter(java.util.function.BiConsumer<Vec3d,java.util.List<? extends Entity>> sorterIn)
public EntitySelector parse() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static void fillSelectorSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNameOrSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder suggestionBuilder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestName(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenBracket(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionsOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestCommaOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
public boolean isCurrentEntity()
public void setSuggestionHandler(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>> suggestionHandlerIn)
public java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.util.function.Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
public boolean hasNameEquals()
public void setHasNameEquals(boolean value)
public boolean hasNameNotEquals()
public void setHasNameNotEquals(boolean value)
public boolean isLimited()
public void setLimited(boolean value)
public boolean isSorted()
public void setSorted(boolean value)
public boolean hasGamemodeEquals()
public void setHasGamemodeEquals(boolean value)
public boolean hasGamemodeNotEquals()
public void setHasGamemodeNotEquals(boolean value)
public boolean hasTeamEquals()
public void setHasTeamEquals(boolean value)
public void setHasTeamNotEquals(boolean value)
public void func_218114_a(EntityType<?> p_218114_1_)
public void setTypeLimitedInversely()
public boolean isTypeLimited()
public boolean isTypeLimitedInversely()
public boolean hasScores()
public void setHasScores(boolean value)
public boolean hasAdvancements()
public void setHasAdvancements(boolean value)