Package net.minecraft.command.arguments
Class BlockStateParser
java.lang.Object
net.minecraft.command.arguments.BlockStateParser
-
Field Summary
Modifier and TypeFieldDescriptionprivate StateContainer<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 CompoundNBT
private final Map<Property<?>,
Comparable<?>> private final com.mojang.brigadier.StringReader
private BlockState
private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
ITagCollection<Block>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,
ITagCollection<Block>, CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> private ResourceLocation
private int
-
Constructor Summary
ConstructorDescriptionBlockStateParser
(com.mojang.brigadier.StringReader p_i48214_1_, boolean p_i48214_2_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T extends Comparable<T>>
com.mojang.brigadier.suggestion.SuggestionsBuilderaddSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201037_0_, Property<T> p_201037_1_) private static <T extends Comparable<T>>
voidappendProperty
(StringBuilder p_211375_0_, Property<T> p_211375_1_, Comparable<?> p_211375_2_) CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
fillSuggestions
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197245_1_, ITagCollection<Block> p_197245_2_) getNbt()
Map<Property<?>,
Comparable<?>> getState()
getTag()
private boolean
hasBlockEntity
(ITagCollection<Block> p_212598_1_) parse
(boolean p_197243_1_) void
void
readNbt()
void
void
readTag()
void
static String
serialize
(BlockState p_197247_0_) private <T extends Comparable<T>>
voidprivate CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestBlockIdOrTag
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197250_1_, ITagCollection<Block> p_197250_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestEquals
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197246_1_, ITagCollection<Block> p_197246_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestNextPropertyOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197248_1_, ITagCollection<Block> p_197248_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197244_1_, ITagCollection<Block> p_197244_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenPropertiesOrNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197255_1_, ITagCollection<Block> p_197255_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestOpenVaguePropertiesOrNbt
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_212599_1_, ITagCollection<Block> p_212599_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyName
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197256_1_, ITagCollection<Block> p_197256_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestPropertyNameOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197252_1_, ITagCollection<Block> p_197252_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestTag
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201953_1_, ITagCollection<Block> p_201953_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyName
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_200134_1_, ITagCollection<Block> p_200134_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyNameOrEnd
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_200136_1_, ITagCollection<Block> p_200136_2_) private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
suggestVaguePropertyValue
(com.mojang.brigadier.suggestion.SuggestionsBuilder p_239295_1_, ITagCollection<Block> p_239295_2_, String p_239295_3_)
-
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 -
SUGGEST_NOTHING
private static final BiFunction<com.mojang.brigadier.suggestion.SuggestionsBuilder,ITagCollection<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,ITagCollection<Block>, suggestionsCompletableFuture<com.mojang.brigadier.suggestion.Suggestions>>
-
-
Constructor Details
-
BlockStateParser
public BlockStateParser(com.mojang.brigadier.StringReader p_i48214_1_, boolean p_i48214_2_)
-
-
Method Details
-
getProperties
-
getState
-
getNbt
-
getTag
-
parse
public BlockStateParser parse(boolean p_197243_1_) 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_197252_1_, ITagCollection<Block> p_197252_2_) -
suggestVaguePropertyNameOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyNameOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_200136_1_, ITagCollection<Block> p_200136_2_) -
suggestPropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197256_1_, ITagCollection<Block> p_197256_2_) -
suggestVaguePropertyName
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyName(com.mojang.brigadier.suggestion.SuggestionsBuilder p_200134_1_, ITagCollection<Block> p_200134_2_) -
suggestOpenNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197244_1_, ITagCollection<Block> p_197244_2_) -
hasBlockEntity
-
suggestEquals
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197246_1_, ITagCollection<Block> p_197246_2_) -
suggestNextPropertyOrEnd
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNextPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197248_1_, ITagCollection<Block> p_197248_2_) -
addSuggestions
private static <T extends Comparable<T>> com.mojang.brigadier.suggestion.SuggestionsBuilder addSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201037_0_, Property<T> p_201037_1_) -
suggestVaguePropertyValue
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestVaguePropertyValue(com.mojang.brigadier.suggestion.SuggestionsBuilder p_239295_1_, ITagCollection<Block> p_239295_2_, String p_239295_3_) -
suggestOpenVaguePropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenVaguePropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_212599_1_, ITagCollection<Block> p_212599_2_) -
suggestOpenPropertiesOrNbt
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestOpenPropertiesOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197255_1_, ITagCollection<Block> p_197255_2_) -
suggestTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_201953_1_, ITagCollection<Block> p_201953_2_) -
suggestBlockIdOrTag
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestBlockIdOrTag(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197250_1_, ITagCollection<Block> p_197250_2_) -
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_197253_1_, String p_197253_2_, int p_197253_3_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
serialize
-
appendProperty
private static <T extends Comparable<T>> void appendProperty(StringBuilder p_211375_0_, Property<T> p_211375_1_, Comparable<?> p_211375_2_) -
fillSuggestions
public CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> fillSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder p_197245_1_, ITagCollection<Block> p_197245_2_) -
getVagueProperties
-