Class BlockStateParser
java.lang.Object
net.minecraft.commands.arguments.blocks.BlockStateParser
-
Field Summary
Modifier and TypeFieldDescriptionprivate StateDefinition<Block,
BlockState> static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType
static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType
static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType
static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType
private final boolean
private ResourceLocation
private CompoundTag
private final Map<Property<?>,
Comparable<?>> private final com.mojang.brigadier.StringReader
private BlockState
private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
Registry<Block>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
Registry<Block>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private static final char
private static final char
private static final char
private static final char
private static final char
private static final char
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_205595_, Registry<Block> p_205596_) getNbt()
Map<Property<?>,
Comparable<?>> getState()
getTag()
private boolean
hasBlockEntity
(Registry<Block> p_205606_) 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_205643_, Registry<Block> p_205644_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestEquals
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205628_, Registry<Block> p_205629_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestNextPropertyOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205631_, Registry<Block> p_205632_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205625_, Registry<Block> p_205626_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenPropertiesOrNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205637_, Registry<Block> p_205638_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenVaguePropertiesOrNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205634_, Registry<Block> p_205635_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyName
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205619_, Registry<Block> p_205620_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyNameOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205612_, Registry<Block> p_205613_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestTag
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205640_, Registry<Block> p_205641_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyName
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205622_, Registry<Block> p_205623_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyNameOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205615_, Registry<Block> p_205616_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyValue
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205598_, Registry<Block> p_205599_, String p_205600_)
-
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:
-
SYNTAX_START_NBT
private static final char SYNTAX_START_NBT- See Also:
-
SYNTAX_END_PROPERTIES
private static final char SYNTAX_END_PROPERTIES- See Also:
-
SYNTAX_EQUALS
private static final char SYNTAX_EQUALS- See Also:
-
SYNTAX_PROPERTY_SEPARATOR
private static final char SYNTAX_PROPERTY_SEPARATOR- See Also:
-
SYNTAX_TAG
private static final char SYNTAX_TAG- See Also:
-
SUGGEST_NOTHING
private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,Registry<Block>, SUGGEST_NOTHINGCompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> -
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,Registry<Block>, suggestionsCompletableFuture<com.mojang.brigadier.suggestion.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_205612_, Registry<Block> p_205613_) -
suggestVaguePropertyNameOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205615_, Registry<Block> p_205616_) -
suggestPropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205619_, Registry<Block> p_205620_) -
suggestVaguePropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205622_, Registry<Block> p_205623_) -
suggestOpenNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205625_, Registry<Block> p_205626_) -
hasBlockEntity
-
suggestEquals
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205628_, Registry<Block> p_205629_) -
suggestNextPropertyOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNextPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205631_, Registry<Block> p_205632_) -
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_205598_, Registry<Block> p_205599_, String p_205600_) -
suggestOpenVaguePropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenVaguePropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205634_, Registry<Block> p_205635_) -
suggestOpenPropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenPropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205637_, Registry<Block> p_205638_) -
suggestTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205640_, Registry<Block> p_205641_) -
suggestBlockIdOrTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestBlockIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_205643_, Registry<Block> p_205644_) -
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_205595_, Registry<Block> p_205596_) -
getVagueProperties
-