类 NbtUtils
java.lang.Object
net.minecraft.nbt.NbtUtils
-
字段概要
字段修饰符和类型字段说明private 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>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static CompoundTag
static CompoundTag
addDataVersion
(CompoundTag pTag, int pDataVersion) static boolean
compareNbt
(Tag pTag, Tag pOther, boolean pCompareListTag) static IntArrayTag
createUUID
(UUID pUuid) static int
getDataVersion
(CompoundTag pTag, int pDefaultValue) private static <T extends Comparable<T>>
StringgetName
(Property<T> pProperty, Comparable<?> pValue) private static StringBuilder
indent
(int pIndentLevel, StringBuilder pStringBuilder) static UUID
(专用程序包) static String
packBlockState
(CompoundTag p_178076_) (专用程序包) static CompoundTag
static StringBuilder
prettyPrint
(StringBuilder pStringBuilder, Tag pTag, int pIndentLevel, boolean pPrettyPrintArray) static String
prettyPrint
(Tag pTag) static String
prettyPrint
(Tag pTag, boolean pPrettyPrintArray) static BlockPos
readBlockPos
(CompoundTag pTag) static BlockState
readBlockState
(HolderGetter<Block> pBlockGetter, CompoundTag pTag) static com.mojang.authlib.GameProfile
readGameProfile
(CompoundTag pTag) private static <S extends StateHolder<?,
S>, T extends Comparable<T>>
SsetValueHelper
(S pStateHolder, Property<T> pProperty, String pPropertyName, CompoundTag pPropertiesTag, CompoundTag pBlockStateTag) static CompoundTag
snbtToStructure
(String pText) static String
structureToSnbt
(CompoundTag pTag) static Component
toPrettyComponent
(Tag pTag) (专用程序包) static CompoundTag
unpackBlockState
(String p_178054_) (专用程序包) static CompoundTag
static CompoundTag
writeBlockPos
(BlockPos pPos) static CompoundTag
writeBlockState
(BlockState pState) static CompoundTag
writeFluidState
(FluidState pState) static CompoundTag
writeGameProfile
(CompoundTag pTag, com.mojang.authlib.GameProfile pProfile)
-
字段详细资料
-
YXZ_LISTTAG_INT_COMPARATOR
-
YXZ_LISTTAG_DOUBLE_COMPARATOR
-
SNBT_DATA_TAG
- 另请参阅:
-
PROPERTIES_START
private static final char PROPERTIES_START- 另请参阅:
-
PROPERTIES_END
private static final char PROPERTIES_END- 另请参阅:
-
ELEMENT_SEPARATOR
- 另请参阅:
-
KEY_VALUE_SEPARATOR
private static final char KEY_VALUE_SEPARATOR- 另请参阅:
-
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- 另请参阅:
-
NOT_FOUND
private static final int NOT_FOUND- 另请参阅:
-
-
构造器详细资料
-
NbtUtils
private NbtUtils()
-
-
方法详细资料
-
readGameProfile
-
writeGameProfile
public static CompoundTag writeGameProfile(CompoundTag pTag, com.mojang.authlib.GameProfile pProfile) -
compareNbt
-
createUUID
-
loadUUID
-
readBlockPos
-
writeBlockPos
-
readBlockState
-
setValueHelper
private static <S extends StateHolder<?,S>, S setValueHelperT extends Comparable<T>> (S pStateHolder, Property<T> pProperty, String pPropertyName, CompoundTag pPropertiesTag, CompoundTag pBlockStateTag) -
writeBlockState
-
writeFluidState
-
getName
private static <T extends Comparable<T>> String getName(Property<T> pProperty, Comparable<?> pValue) -
prettyPrint
-
prettyPrint
-
prettyPrint
public static StringBuilder prettyPrint(StringBuilder pStringBuilder, Tag pTag, int pIndentLevel, boolean pPrettyPrintArray) -
indent
-
toPrettyComponent
-
structureToSnbt
-
snbtToStructure
public static CompoundTag snbtToStructure(String pText) throws com.mojang.brigadier.exceptions.CommandSyntaxException - 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
packStructureTemplate
-
unpackStructureTemplate
-
packBlockState
-
unpackBlockState
-
addCurrentDataVersion
-
addDataVersion
-
getDataVersion
-