Package net.minecraft.nbt
Class NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.google.common.base.Splitterprivate static final com.google.common.base.Splitterprivate static final Stringprivate static final intprivate static final charprivate static final org.slf4j.Loggerprivate static final intprivate static final charprivate static final charstatic final Stringprivate static final Comparator<ListTag> private static final Comparator<ListTag> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CompoundTagstatic CompoundTagaddDataVersion(CompoundTag tag, int dataVersion) static booleancompareNbt(Tag p_tag, Tag other, boolean compareListTag) static IntArrayTagcreateUUID(UUID uuid) static intgetDataVersion(CompoundTag tag, int defaultValue) private static <T extends Comparable<T>>
StringgetName(Property<T> property, Comparable<?> value) private static StringBuilderindent(int indentLevel, StringBuilder stringBuilder) static UUID(package private) static String(package private) static CompoundTagstatic StringBuilderprettyPrint(StringBuilder stringBuilder, Tag tag, int indentLevel, boolean prettyPrintArray) static StringprettyPrint(Tag tag) static StringprettyPrint(Tag tag, boolean prettyPrintArray) readBlockPos(CompoundTag tag, String key) static BlockStatereadBlockState(HolderGetter<Block> blockGetter, CompoundTag tag) private static <S extends StateHolder<?,S>, T extends Comparable<T>>
SsetValueHelper(S stateHolder, Property<T> property, String propertyName, CompoundTag propertiesTag, CompoundTag blockStateTag) static CompoundTagsnbtToStructure(String text) static Stringstatic ComponenttoPrettyComponent(Tag tag) (package private) static CompoundTagunpackBlockState(String blockStateText) (package private) static CompoundTagstatic TagwriteBlockPos(BlockPos pos) static CompoundTagwriteBlockState(BlockState state) static CompoundTagwriteFluidState(FluidState state)
-
Field Details
-
YXZ_LISTTAG_INT_COMPARATOR
-
YXZ_LISTTAG_DOUBLE_COMPARATOR
-
SNBT_DATA_TAG
- See Also:
-
PROPERTIES_START
private static final char PROPERTIES_START- See Also:
-
PROPERTIES_END
private static final char PROPERTIES_END- See Also:
-
ELEMENT_SEPARATOR
- See Also:
-
KEY_VALUE_SEPARATOR
private static final char KEY_VALUE_SEPARATOR- See Also:
-
COMMA_SPLITTER
private static final com.google.common.base.Splitter COMMA_SPLITTER -
COLON_SPLITTER
private static final com.google.common.base.Splitter COLON_SPLITTER -
LOGGER
private static final org.slf4j.Logger LOGGER -
INDENT
private static final int INDENT- See Also:
-
NOT_FOUND
private static final int NOT_FOUND- See Also:
-
-
Constructor Details
-
NbtUtils
private NbtUtils()
-
-
Method Details
-
compareNbt
-
createUUID
-
loadUUID
-
readBlockPos
-
writeBlockPos
-
readBlockState
-
setValueHelper
private static <S extends StateHolder<?,S>, S setValueHelperT extends Comparable<T>> (S stateHolder, Property<T> property, String propertyName, CompoundTag propertiesTag, CompoundTag blockStateTag) -
writeBlockState
-
writeFluidState
-
getName
-
prettyPrint
-
prettyPrint
-
prettyPrint
public static StringBuilder prettyPrint(StringBuilder stringBuilder, Tag tag, int indentLevel, boolean prettyPrintArray) -
indent
-
toPrettyComponent
-
structureToSnbt
-
snbtToStructure
public static CompoundTag snbtToStructure(String text) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
packStructureTemplate
-
unpackStructureTemplate
-
packBlockState
-
unpackBlockState
-
addCurrentDataVersion
-
addDataVersion
-
getDataVersion
-