Class BlockStateParser
java.lang.Object
net.minecraft.commands.arguments.blocks.BlockStateParser
-
Field Summary
Modifier and TypeFieldDescriptionprivate StateDefinition<Block,BlockState>
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
static com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private boolean
private ResourceLocation
private CompoundTag
private Map<Property<?>,Comparable<?>>
private com.mojang.brigadier.StringReader
private BlockState
private static BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,TagCollection<Block>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>>
private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,TagCollection<Block>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>>
private static char
private static char
private static char
private static char
private static char
private static char
private ResourceLocation
private int
-
Constructor Summary
ConstructorDescriptionBlockStateParser(com.mojang.brigadier.StringReader p_116762_, boolean p_116763_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends Comparable<T>>
com.mojang.brigadier.suggestion.SuggestionsBuilderaddSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116787_, Property<T> p_116788_)
private static <T extends Comparable<T>>
voidappendProperty(StringBuilder p_116803_, Property<T> p_116804_, Comparable<?> p_116805_)
CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116780_, TagCollection<Block> p_116781_)
getNbt()
Map<Property<?>,Comparable<?>>
getState()
getTag()
private boolean
hasBlockEntity(TagCollection<Block> p_116768_)
parse(boolean p_116807_)
void
void
readNbt()
void
void
readTag()
void
static String
serialize(BlockState p_116770_)
private <T extends Comparable<T>>
voidprivate CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestBlockIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116854_, TagCollection<Block> p_116855_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116836_, TagCollection<Block> p_116837_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestNextPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116840_, TagCollection<Block> p_116841_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116832_, TagCollection<Block> p_116833_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenPropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116848_, TagCollection<Block> p_116849_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenVaguePropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116844_, TagCollection<Block> p_116845_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116824_, TagCollection<Block> p_116825_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116810_, TagCollection<Block> p_116811_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116851_, TagCollection<Block> p_116852_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116828_, TagCollection<Block> p_116829_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116817_, TagCollection<Block> p_116818_)
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyValue(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116783_, TagCollection<Block> p_116784_, String p_116785_)
-
Field Details
-
ERROR_NO_TAGS_ALLOWED
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_NO_TAGS_ALLOWED -
ERROR_UNKNOWN_BLOCK
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType ERROR_UNKNOWN_BLOCK -
ERROR_UNKNOWN_PROPERTY
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_UNKNOWN_PROPERTY -
ERROR_DUPLICATE_PROPERTY
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_DUPLICATE_PROPERTY -
ERROR_INVALID_VALUE
public static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType ERROR_INVALID_VALUE -
ERROR_EXPECTED_VALUE
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType ERROR_EXPECTED_VALUE -
ERROR_EXPECTED_END_OF_PROPERTIES
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType ERROR_EXPECTED_END_OF_PROPERTIES -
SYNTAX_START_PROPERTIES
private static final char SYNTAX_START_PROPERTIES- See Also:
- Constant Field Values
-
SYNTAX_START_NBT
private static final char SYNTAX_START_NBT- See Also:
- Constant Field Values
-
SYNTAX_END_PROPERTIES
private static final char SYNTAX_END_PROPERTIES- See Also:
- Constant Field Values
-
SYNTAX_EQUALS
private static final char SYNTAX_EQUALS- See Also:
- Constant Field Values
-
SYNTAX_PROPERTY_SEPARATOR
private static final char SYNTAX_PROPERTY_SEPARATOR- See Also:
- Constant Field Values
-
SYNTAX_TAG
private static final char SYNTAX_TAG- See Also:
- Constant Field Values
-
SUGGEST_NOTHING
private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,TagCollection<Block>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> SUGGEST_NOTHING -
reader
private final com.mojang.brigadier.StringReader reader -
forTesting
private final boolean forTesting -
properties
-
vagueProperties
-
id
-
definition
-
state
-
nbt
-
tag
-
tagCursor
private int tagCursor -
suggestions
private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,TagCollection<Block>,CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestions
-
-
Constructor Details
-
BlockStateParser
public BlockStateParser(com.mojang.brigadier.StringReader p_116762_, boolean p_116763_)
-
-
Method Details
-
getProperties
-
getState
-
getNbt
-
getTag
-
parse
public BlockStateParser parse(boolean p_116807_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
suggestPropertyNameOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116810_, TagCollection<Block> p_116811_) -
suggestVaguePropertyNameOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116817_, TagCollection<Block> p_116818_) -
suggestPropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116824_, TagCollection<Block> p_116825_) -
suggestVaguePropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116828_, TagCollection<Block> p_116829_) -
suggestOpenNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116832_, TagCollection<Block> p_116833_) -
hasBlockEntity
-
suggestEquals
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116836_, TagCollection<Block> p_116837_) -
suggestNextPropertyOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNextPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116840_, TagCollection<Block> p_116841_) -
addSuggestions
private static <T extends Comparable<T>> com.mojang.brigadier.suggestion.SuggestionsBuilder addSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116787_, Property<T> p_116788_) -
suggestVaguePropertyValue
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyValue(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116783_, TagCollection<Block> p_116784_, String p_116785_) -
suggestOpenVaguePropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenVaguePropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116844_, TagCollection<Block> p_116845_) -
suggestOpenPropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenPropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116848_, TagCollection<Block> p_116849_) -
suggestTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116851_, TagCollection<Block> p_116852_) -
suggestBlockIdOrTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestBlockIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116854_, TagCollection<Block> p_116855_) -
readBlock
public void readBlock() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readTag
public void readTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readProperties
public void readProperties() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readVagueProperties
public void readVagueProperties() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
readNbt
public void readNbt() throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
setValue
private <T extends Comparable<T>> void setValue(Property<T> p_116776_, String p_116777_, int p_116778_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
serialize
-
appendProperty
private static <T extends Comparable<T>> void appendProperty(StringBuilder p_116803_, Property<T> p_116804_, Comparable<?> p_116805_) -
fillSuggestions
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_116780_, TagCollection<Block> p_116781_) -
getVagueProperties
-