public class BlockStateParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ResourceLocation |
blockID |
private StateContainer<Block,BlockState> |
blockStateContainer |
private int |
cursorPos |
private CompoundNBT |
nbt |
private java.util.Map<IProperty<?>,java.lang.Comparable<?>> |
properties |
private com.mojang.brigadier.StringReader |
reader |
private BlockState |
state |
static com.mojang.brigadier.exceptions.DynamicCommandExceptionType |
STATE_BAD_ID |
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType |
STATE_DUPLICATE_PROPERTY |
static com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType |
STATE_INVALID_PROPERTY_VALUE |
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType |
STATE_NO_VALUE |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
STATE_TAGS_NOT_ALLOWED |
static com.mojang.brigadier.exceptions.SimpleCommandExceptionType |
STATE_UNCLOSED |
static com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType |
STATE_UNKNOWN_PROPERTY |
private java.util.Map<java.lang.String,java.lang.String> |
stringProperties |
private static java.util.function.Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> |
SUGGEST_NONE |
private java.util.function.Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> |
suggestor |
private ResourceLocation |
tag |
private boolean |
tagsAllowed |
Constructor and Description |
---|
BlockStateParser(com.mojang.brigadier.StringReader readerIn,
boolean allowTags) |
Modifier and Type | Method and Description |
---|---|
private boolean |
func_212598_k() |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
func_212599_i(com.mojang.brigadier.suggestion.SuggestionsBuilder p_212599_1_) |
CompoundNBT |
getNbt() |
java.util.Map<IProperty<?>,java.lang.Comparable<?>> |
getProperties() |
BlockState |
getState() |
java.util.Map<java.lang.String,java.lang.String> |
getStringProperties() |
java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
getSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
ResourceLocation |
getTag() |
BlockStateParser |
parse(boolean parseTileEntity) |
private <T extends java.lang.Comparable<T>> |
parseValue(IProperty<T> property,
java.lang.String value,
int valuePosition) |
private static <T extends java.lang.Comparable<T>> |
propValToString(java.lang.StringBuilder builder,
IProperty<T> property,
java.lang.Comparable<?> value) |
void |
readBlock() |
void |
readNBT() |
void |
readProperties() |
void |
readStringProperties() |
void |
readTag() |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestProperty(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestPropertyEndOrContinue(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestPropertyOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestStringProperty(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestStringPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestTagOrBlock(com.mojang.brigadier.suggestion.SuggestionsBuilder builder) |
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
suggestTagProperties(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
java.lang.String property) |
private static <T extends java.lang.Comparable<T>> |
suggestValue(com.mojang.brigadier.suggestion.SuggestionsBuilder builder,
IProperty<T> property) |
static java.lang.String |
toString(BlockState state) |
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType STATE_TAGS_NOT_ALLOWED
public static final com.mojang.brigadier.exceptions.DynamicCommandExceptionType STATE_BAD_ID
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType STATE_UNKNOWN_PROPERTY
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType STATE_DUPLICATE_PROPERTY
public static final com.mojang.brigadier.exceptions.Dynamic3CommandExceptionType STATE_INVALID_PROPERTY_VALUE
public static final com.mojang.brigadier.exceptions.Dynamic2CommandExceptionType STATE_NO_VALUE
public static final com.mojang.brigadier.exceptions.SimpleCommandExceptionType STATE_UNCLOSED
private static final java.util.function.Function<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 tagsAllowed
private final java.util.Map<IProperty<?>,java.lang.Comparable<?>> properties
private final java.util.Map<java.lang.String,java.lang.String> stringProperties
private ResourceLocation blockID
private StateContainer<Block,BlockState> blockStateContainer
private BlockState state
@Nullable private CompoundNBT nbt
private ResourceLocation tag
private int cursorPos
private java.util.function.Function<com.mojang.brigadier.suggestion.SuggestionsBuilder,java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>> suggestor
public BlockStateParser(com.mojang.brigadier.StringReader readerIn, boolean allowTags)
public java.util.Map<IProperty<?>,java.lang.Comparable<?>> getProperties()
@Nullable public BlockState getState()
@Nullable public CompoundNBT getNbt()
@Nullable public ResourceLocation getTag()
public BlockStateParser parse(boolean parseTileEntity) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestStringPropertyOrEnd(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestProperty(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestStringProperty(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private boolean func_212598_k()
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestEquals(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyEndOrContinue(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private static <T extends java.lang.Comparable<T>> com.mojang.brigadier.suggestion.SuggestionsBuilder suggestValue(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, IProperty<T> property)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTagProperties(com.mojang.brigadier.suggestion.SuggestionsBuilder builder, java.lang.String property)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> func_212599_i(com.mojang.brigadier.suggestion.SuggestionsBuilder p_212599_1_)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestPropertyOrNbt(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTag(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
private java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> suggestTagOrBlock(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
public void readBlock() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public void readTag() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public void readProperties() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public void readStringProperties() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public void readNBT() throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
private <T extends java.lang.Comparable<T>> void parseValue(IProperty<T> property, java.lang.String value, int valuePosition) throws com.mojang.brigadier.exceptions.CommandSyntaxException
com.mojang.brigadier.exceptions.CommandSyntaxException
public static java.lang.String toString(BlockState state)
private static <T extends java.lang.Comparable<T>> void propValToString(java.lang.StringBuilder builder, IProperty<T> property, java.lang.Comparable<?> value)
public java.util.concurrent.CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> getSuggestions(com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
public java.util.Map<java.lang.String,java.lang.String> getStringProperties()