public class EntitySelectorReader extends Object
Modifier and Type | Field and Description |
---|---|
static BiConsumer<Vec3d,List<? extends Entity>> |
ARBITRARY |
private boolean |
atAllowed |
static BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> |
DEFAULT_SUGGESTION_PROVIDER |
private NumberRange.FloatRange |
distance |
private Double |
dx |
private Double |
dy |
private Double |
dz |
private EntityType<?> |
entityType |
private boolean |
excludesEntityType |
private boolean |
excludesGameMode |
private boolean |
excludesName |
private boolean |
excludesTeam |
static BiConsumer<Vec3d,List<? extends Entity>> |
FURTHEST |
private boolean |
hasLimit |
private boolean |
hasSorter |
private boolean |
includesNonPlayers |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
INVALID_ENTITY_EXCEPTION |
private NumberRange.IntRange |
levelRange |
private int |
limit |
private boolean |
localWorldOnly |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
MISSING_EXCEPTION |
static BiConsumer<Vec3d,List<? extends Entity>> |
NEAREST |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
NOT_ALLOWED_EXCEPTION |
private FloatRangeArgument |
pitchRange |
private String |
playerName |
private Predicate<Entity> |
predicate |
static BiConsumer<Vec3d,List<? extends Entity>> |
RANDOM |
private com.mojang.brigadier.StringReader |
reader |
private boolean |
selectsAdvancements |
private boolean |
selectsGameMode |
private boolean |
selectsName |
private boolean |
selectsScores |
private boolean |
selectsTeam |
private boolean |
senderOnly |
private BiConsumer<Vec3d,List<? extends Entity>> |
sorter |
private int |
startCursor |
private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> |
suggestionProvider |
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
UNKNOWN_SELECTOR_EXCEPTION |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
UNTERMINATED_EXCEPTION |
private boolean |
usesAt |
private UUID |
uuid |
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
VALUELESS_EXCEPTION |
private Double |
x |
private Double |
y |
private FloatRangeArgument |
yawRange |
private Double |
z |
Constructor and Description |
---|
EntitySelectorReader(com.mojang.brigadier.StringReader reader) |
EntitySelectorReader(com.mojang.brigadier.StringReader reader,
boolean atAllowed) |
Modifier and Type | Method and Description |
---|---|
EntitySelector |
build() |
private void |
buildPredicate() |
private Box |
createBox(double x,
double y,
double z) |
boolean |
excludesEntityType() |
boolean |
excludesGameMode() |
boolean |
excludesName() |
NumberRange.FloatRange |
getDistance() |
Double |
getDx() |
Double |
getDy() |
Double |
getDz() |
NumberRange.IntRange |
getLevelRange() |
FloatRangeArgument |
getPitchRange() |
com.mojang.brigadier.StringReader |
getReader() |
Double |
getX() |
Double |
getY() |
FloatRangeArgument |
getYawRange() |
Double |
getZ() |
boolean |
hasLimit() |
boolean |
hasSorter() |
boolean |
isSenderOnly() |
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
listSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
EntitySelector |
read() |
protected void |
readArguments() |
protected void |
readAtVariable() |
boolean |
readNegationCharacter() |
protected void |
readRegular() |
boolean |
readTagCharacter() |
private Predicate<Entity> |
rotationPredicate(FloatRangeArgument floatRangeArgument,
ToDoubleFunction<Entity> toDoubleFunction) |
boolean |
selectsAdvancements() |
boolean |
selectsEntityType() |
boolean |
selectsGameMode() |
boolean |
selectsName() |
boolean |
selectsScores() |
boolean |
selectsTeam() |
void |
setDistance(NumberRange.FloatRange distance) |
void |
setDx(double dx) |
void |
setDy(double dy) |
void |
setDz(double dz) |
void |
setEntityType(EntityType<?> entityType) |
void |
setExcludesEntityType() |
void |
setExcludesName(boolean bool) |
void |
setExcludesTeam(boolean excludesTeam) |
void |
setHasLimit(boolean hasLimit) |
void |
setHasNegatedGameMode(boolean hasNegatedGameMode) |
void |
setHasSorter(boolean hasSorter) |
void |
setIncludesNonPlayers(boolean includesNonPlayers) |
void |
setLevelRange(NumberRange.IntRange experienceRange) |
void |
setLimit(int limit) |
void |
setLocalWorldOnly() |
void |
setPitchRange(FloatRangeArgument floatRangeArgument) |
void |
setPredicate(Predicate<Entity> predicate) |
void |
setSelectsAdvancements(boolean selectsAdvancements) |
void |
setSelectsGameMode(boolean selectsGameMode) |
void |
setSelectsName(boolean selectsName) |
void |
setSelectsScores(boolean selectsScores) |
void |
setSelectsTeam(boolean selectsTeam) |
void |
setSorter(BiConsumer<Vec3d,List<? extends Entity>> sorter) |
void |
setSuggestionProvider(BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> biFunction) |
void |
setX(double x) |
void |
setY(double y) |
void |
setYawRange(FloatRangeArgument floatRangeArgument) |
void |
setZ(double z) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestEndNext(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestNormal(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOpen(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOption(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestOptionOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private static void |
suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestSelectorRest(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer) |
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType INVALID_ENTITY_EXCEPTION
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType UNKNOWN_SELECTOR_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType NOT_ALLOWED_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType MISSING_EXCEPTION
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType UNTERMINATED_EXCEPTION
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType VALUELESS_EXCEPTION
public static final BiConsumer<Vec3d,List<? extends Entity>> ARBITRARY
public static final BiConsumer<Vec3d,List<? extends Entity>> NEAREST
public static final BiConsumer<Vec3d,List<? extends Entity>> FURTHEST
public static final BiConsumer<Vec3d,List<? extends Entity>> RANDOM
public static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> DEFAULT_SUGGESTION_PROVIDER
private final com.mojang.brigadier.StringReader reader
private final boolean atAllowed
private int limit
private boolean includesNonPlayers
private boolean localWorldOnly
private NumberRange.FloatRange distance
private NumberRange.IntRange levelRange
private FloatRangeArgument pitchRange
private FloatRangeArgument yawRange
private BiConsumer<Vec3d,List<? extends Entity>> sorter
private boolean senderOnly
private int startCursor
private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestionProvider
private boolean selectsName
private boolean excludesName
private boolean hasLimit
private boolean hasSorter
private boolean selectsGameMode
private boolean excludesGameMode
private boolean selectsTeam
private boolean excludesTeam
@Nullable private EntityType<?> entityType
private boolean excludesEntityType
private boolean selectsScores
private boolean selectsAdvancements
private boolean usesAt
public EntitySelectorReader(com.mojang.brigadier.StringReader reader)
public EntitySelectorReader(com.mojang.brigadier.StringReader reader, boolean atAllowed)
public EntitySelector build()
private Box createBox(double x, double y, double z)
private void buildPredicate()
private Predicate<Entity> rotationPredicate(FloatRangeArgument floatRangeArgument, ToDoubleFunction<Entity> toDoubleFunction)
protected void readAtVariable() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
protected void readRegular() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
protected void readArguments() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public boolean readNegationCharacter()
public boolean readTagCharacter()
public com.mojang.brigadier.StringReader getReader()
public void setLocalWorldOnly()
public NumberRange.FloatRange getDistance()
public void setDistance(NumberRange.FloatRange distance)
public NumberRange.IntRange getLevelRange()
public void setLevelRange(NumberRange.IntRange experienceRange)
public FloatRangeArgument getPitchRange()
public void setPitchRange(FloatRangeArgument floatRangeArgument)
public FloatRangeArgument getYawRange()
public void setYawRange(FloatRangeArgument floatRangeArgument)
public void setX(double x)
public void setY(double y)
public void setZ(double z)
public void setDx(double dx)
public void setDy(double dy)
public void setDz(double dz)
public void setLimit(int limit)
public void setIncludesNonPlayers(boolean includesNonPlayers)
public void setSorter(BiConsumer<Vec3d,List<? extends Entity>> sorter)
public EntitySelector read() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private static void suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestSelector(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNormal(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestSelectorRest(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpen(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOptionOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOption(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEndNext(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
public boolean isSenderOnly()
public void setSuggestionProvider(BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> biFunction)
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, Consumer<com.mojang.brigadier.suggestion.SuggestionsBuilder> consumer)
public boolean selectsName()
public void setSelectsName(boolean selectsName)
public boolean excludesName()
public void setExcludesName(boolean bool)
public boolean hasLimit()
public void setHasLimit(boolean hasLimit)
public boolean hasSorter()
public void setHasSorter(boolean hasSorter)
public boolean selectsGameMode()
public void setSelectsGameMode(boolean selectsGameMode)
public boolean excludesGameMode()
public void setHasNegatedGameMode(boolean hasNegatedGameMode)
public boolean selectsTeam()
public void setSelectsTeam(boolean selectsTeam)
public void setExcludesTeam(boolean excludesTeam)
public void setEntityType(EntityType<?> entityType)
public void setExcludesEntityType()
public boolean selectsEntityType()
public boolean excludesEntityType()
public boolean selectsScores()
public void setSelectsScores(boolean selectsScores)
public boolean selectsAdvancements()
public void setSelectsAdvancements(boolean selectsAdvancements)