Package net.minecraft.nbt
Class NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final com.google.common.base.Splitter
private static final com.google.common.base.Splitter
private static final String
private static final int
private static final char
private static final org.slf4j.Logger
private static final int
private static final char
private static final char
static final String
private static final Comparator
<ListTag> private static final Comparator
<ListTag> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompoundTag
addCurrentDataVersion
(CompoundTag p_265050_) static CompoundTag
addDataVersion
(CompoundTag p_265534_, int p_265686_) static boolean
compareNbt
(Tag p_129236_, Tag p_129237_, boolean p_129238_) static IntArrayTag
createUUID
(UUID p_129227_) static int
getDataVersion
(CompoundTag p_265397_, int p_265399_) 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_) readBlockPos
(CompoundTag p_129240_, String p_328737_) static BlockState
readBlockState
(HolderGetter<Block> p_256363_, CompoundTag p_250775_) 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 Tag
writeBlockPos
(BlockPos p_129225_) static CompoundTag
writeBlockState
(BlockState p_129203_) static CompoundTag
writeFluidState
(FluidState p_178023_)
-
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 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
-
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
-
addCurrentDataVersion
-
addDataVersion
-
getDataVersion
-