Package net.minecraft.nbt
Class NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
- 
Field SummaryFieldsModifier 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic CompoundTagaddCurrentDataVersion(CompoundTag p_265050_) static CompoundTagaddDataVersion(CompoundTag p_265534_, int p_265686_) static booleancompareNbt(Tag p_129236_, Tag p_129237_, boolean p_129238_) static IntArrayTagcreateUUID(UUID p_129227_) static intgetDataVersion(CompoundTag p_265397_, int p_265399_) private static <T extends Comparable<T>>
 StringgetName(Property<T> p_129211_, Comparable<?> p_129212_) private static StringBuilderindent(int p_178020_, StringBuilder p_178021_) static UUID(package private) static StringpackBlockState(CompoundTag p_178076_) (package private) static CompoundTagpackStructureTemplate(CompoundTag p_178068_) static StringBuilderprettyPrint(StringBuilder p_178027_, Tag p_178028_, int p_178029_, boolean p_178030_) static StringprettyPrint(Tag p_178058_) static StringprettyPrint(Tag p_178051_, boolean p_178052_) static BlockPosreadBlockPos(CompoundTag p_129240_) static BlockStatereadBlockState(HolderGetter<Block> p_256363_, CompoundTag p_250775_) static com.mojang.authlib.GameProfilereadGameProfile(CompoundTag p_129229_) private static <S extends StateHolder<?,S>, T extends Comparable<T>> 
 SsetValueHelper(S p_129205_, Property<T> p_129206_, String p_129207_, CompoundTag p_129208_, CompoundTag p_129209_) static CompoundTagsnbtToStructure(String p_178025_) static StringstructureToSnbt(CompoundTag p_178064_) static ComponenttoPrettyComponent(Tag p_178062_) (package private) static CompoundTagunpackBlockState(String p_178054_) (package private) static CompoundTagunpackStructureTemplate(CompoundTag p_178072_) static CompoundTagwriteBlockPos(BlockPos p_129225_) static CompoundTagwriteBlockState(BlockState p_129203_) static CompoundTagwriteFluidState(FluidState p_178023_) static CompoundTagwriteGameProfile(CompoundTag p_129231_, com.mojang.authlib.GameProfile p_129232_) 
- 
Field Details- 
YXZ_LISTTAG_INT_COMPARATOR
- 
YXZ_LISTTAG_DOUBLE_COMPARATOR
- 
SNBT_DATA_TAG- See Also:
 
- 
PROPERTIES_STARTprivate static final char PROPERTIES_START- See Also:
 
- 
PROPERTIES_ENDprivate static final char PROPERTIES_END- See Also:
 
- 
ELEMENT_SEPARATOR- See Also:
 
- 
KEY_VALUE_SEPARATORprivate static final char KEY_VALUE_SEPARATOR- See Also:
 
- 
COMMA_SPLITTERprivate static final com.google.common.base.Splitter COMMA_SPLITTER
- 
COLON_SPLITTERprivate static final com.google.common.base.Splitter COLON_SPLITTER
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
INDENTprivate static final int INDENT- See Also:
 
- 
NOT_FOUNDprivate static final int NOT_FOUND- See Also:
 
 
- 
- 
Constructor Details- 
NbtUtilsprivate NbtUtils()
 
- 
- 
Method Details- 
readGameProfile
- 
writeGameProfilepublic static CompoundTag writeGameProfile(CompoundTag p_129231_, com.mojang.authlib.GameProfile p_129232_) 
- 
compareNbt
- 
createUUID
- 
loadUUID
- 
readBlockPos
- 
writeBlockPos
- 
readBlockState
- 
setValueHelperprivate static <S extends StateHolder<?,S>, S setValueHelperT extends Comparable<T>> (S p_129205_, Property<T> p_129206_, String p_129207_, CompoundTag p_129208_, CompoundTag p_129209_) 
- 
writeBlockState
- 
writeFluidState
- 
getNameprivate static <T extends Comparable<T>> String getName(Property<T> p_129211_, Comparable<?> p_129212_) 
- 
prettyPrint
- 
prettyPrint
- 
prettyPrintpublic static StringBuilder prettyPrint(StringBuilder p_178027_, Tag p_178028_, int p_178029_, boolean p_178030_) 
- 
indent
- 
toPrettyComponent
- 
structureToSnbt
- 
snbtToStructurepublic static CompoundTag snbtToStructure(String p_178025_) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Throws:
- com.mojang.brigadier.exceptions.CommandSyntaxException
 
- 
packStructureTemplate
- 
unpackStructureTemplate
- 
packBlockState
- 
unpackBlockState
- 
addCurrentDataVersion
- 
addDataVersion
- 
getDataVersion
 
-