Package net.minecraft.nbt
Class NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static com.google.common.base.Splitterprivate static com.google.common.base.Splitterprivate static Stringprivate static intprivate static charprivate static org.apache.logging.log4j.Loggerprivate static intprivate static charprivate static charstatic Stringprivate static Comparator<ListTag>private static Comparator<ListTag> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareNbt(Tag p_129236_, Tag p_129237_, boolean p_129238_)static IntArrayTagcreateUUID(UUID p_129227_)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(CompoundTag p_129242_)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 CompoundTagupdate(com.mojang.datafixers.DataFixer p_129214_, DataFixTypes p_129215_, CompoundTag p_129216_, int p_129217_)static CompoundTagupdate(com.mojang.datafixers.DataFixer p_129219_, DataFixTypes p_129220_, CompoundTag p_129221_, int p_129222_, int p_129223_)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:
- Constant Field Values
-
PROPERTIES_START
private static final char PROPERTIES_START- See Also:
- Constant Field Values
-
PROPERTIES_END
private static final char PROPERTIES_END- See Also:
- Constant Field Values
-
ELEMENT_SEPARATOR
- See Also:
- Constant Field Values
-
KEY_VALUE_SEPARATOR
private static final char KEY_VALUE_SEPARATOR- See Also:
- Constant Field Values
-
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.apache.logging.log4j.Logger LOGGER -
INDENT
private static final int INDENT- See Also:
- Constant Field Values
-
NOT_FOUND
private static final int NOT_FOUND- See Also:
- Constant Field Values
-
-
Constructor Details
-
NbtUtils
private NbtUtils()
-
-
Method Details
-
readGameProfile
-
writeGameProfile
public static CompoundTag writeGameProfile(CompoundTag p_129231_, com.mojang.authlib.GameProfile p_129232_) -
compareNbt
-
createUUID
-
loadUUID
-
readBlockPos
-
writeBlockPos
-
readBlockState
-
setValueHelper
private static <S extends StateHolder<?, S>, T extends Comparable<T>> S setValueHelper(S p_129205_, Property<T> p_129206_, String p_129207_, CompoundTag p_129208_, CompoundTag p_129209_) -
writeBlockState
-
writeFluidState
-
getName
private static <T extends Comparable<T>> String getName(Property<T> p_129211_, Comparable<?> p_129212_) -
prettyPrint
-
prettyPrint
-
prettyPrint
public static StringBuilder prettyPrint(StringBuilder p_178027_, Tag p_178028_, int p_178029_, boolean p_178030_) -
indent
-
update
public static CompoundTag update(com.mojang.datafixers.DataFixer p_129214_, DataFixTypes p_129215_, CompoundTag p_129216_, int p_129217_) -
update
public static CompoundTag update(com.mojang.datafixers.DataFixer p_129219_, DataFixTypes p_129220_, CompoundTag p_129221_, int p_129222_, int p_129223_) -
toPrettyComponent
-
structureToSnbt
-
snbtToStructure
public static CompoundTag snbtToStructure(String p_178025_) throws com.mojang.brigadier.exceptions.CommandSyntaxException- Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
packStructureTemplate
-
unpackStructureTemplate
-
packBlockState
-
unpackBlockState
-