Package net.minecraft.nbt
Class NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
-
Field Summary
Modifier and TypeFieldDescriptionprivate static com.google.common.base.Splitter
private static com.google.common.base.Splitter
private static String
private static int
private static char
private static org.apache.logging.log4j.Logger
private static int
private static char
private static char
static String
private static Comparator<ListTag>
private static Comparator<ListTag>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
compareNbt(Tag p_129236_, Tag p_129237_, boolean p_129238_)
static IntArrayTag
createUUID(UUID p_129227_)
private static <T extends Comparable<T>>
StringgetName(Property<T> p_129211_, Comparable<?> p_129212_)
private static StringBuilder
indent(int p_178020_, StringBuilder p_178021_)
static UUID
(package private) static String
packBlockState(CompoundTag p_178076_)
(package private) static CompoundTag
packStructureTemplate(CompoundTag p_178068_)
static StringBuilder
prettyPrint(StringBuilder p_178027_, Tag p_178028_, int p_178029_, boolean p_178030_)
static String
prettyPrint(Tag p_178058_)
static String
prettyPrint(Tag p_178051_, boolean p_178052_)
static BlockPos
readBlockPos(CompoundTag p_129240_)
static BlockState
readBlockState(CompoundTag p_129242_)
static com.mojang.authlib.GameProfile
readGameProfile(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 CompoundTag
snbtToStructure(String p_178025_)
static String
structureToSnbt(CompoundTag p_178064_)
static Component
toPrettyComponent(Tag p_178062_)
(package private) static CompoundTag
unpackBlockState(String p_178054_)
(package private) static CompoundTag
unpackStructureTemplate(CompoundTag p_178072_)
static CompoundTag
update(com.mojang.datafixers.DataFixer p_129214_, DataFixTypes p_129215_, CompoundTag p_129216_, int p_129217_)
static CompoundTag
update(com.mojang.datafixers.DataFixer p_129219_, DataFixTypes p_129220_, CompoundTag p_129221_, int p_129222_, int p_129223_)
static CompoundTag
writeBlockPos(BlockPos p_129225_)
static CompoundTag
writeBlockState(BlockState p_129203_)
static CompoundTag
writeFluidState(FluidState p_178023_)
static CompoundTag
writeGameProfile(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
-