类 NbtHelper
- java.lang.Object
-
- net.minecraft.nbt.NbtHelper
-
public final class NbtHelper extends Object
- Mappings:
Namespace Name official nhintermediary net/minecraft/class_2512named net/minecraft/nbt/NbtHelper
-
-
字段概要
字段 修饰符和类型 字段 说明 private static charCOLONprivate static StringCOMMAprivate static SplitterCOMMA_SPLITTERprivate static Comparator<ListTag>field_27816private static Comparator<ListTag>field_27817private static Splitterfield_27819static Stringfield_33224private static intfield_33229private static intfield_33230private static LoggerLOGGERprivate static charSNBT_ENDprivate static charSNBT_START
-
构造器概要
构造器 限定符 构造器 说明 privateNbtHelper()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static CompoundTagfromBlockPos(BlockPos pos)static CompoundTagfromBlockState(BlockState state)static IntArrayTagfromUuid(UUID uuid)Serializes aUUIDinto its equivalent NBT representation.static booleanmatches(@Nullable Tag standard, @Nullable Tag subject, boolean equalValue)static CompoundTagmethod_32260(String string)(专用程序包) static CompoundTagmethod_32267(String string)(专用程序包) static CompoundTagmethod_32273(CompoundTag compound)(专用程序包) static CompoundTagmethod_32275(CompoundTag compound)(专用程序包) static Stringmethod_32277(CompoundTag compound)private static StringBuildermethod_36114(int int2, StringBuilder stringBuilder)static CompoundTagmethod_36115(FluidState fluidState)static StringBuildermethod_36116(StringBuilder stringBuilder, Tag tag, int int2, boolean bool)static Stringmethod_36117(Tag tag, boolean bool)static Stringmethod_36118(Tag tag)private static <T extends Comparable<T>>
StringnameValue(Property<T> property, Comparable<?> value)static BlockPostoBlockPos(CompoundTag compound)static BlockStatetoBlockState(CompoundTag compound)static @Nullable com.mojang.authlib.GameProfiletoGameProfile(CompoundTag compound)static StringtoPrettyPrintedString(CompoundTag compound)static TexttoPrettyPrintedText(Tag element)static UUIDtoUuid(Tag element)Deserializes an NBT element into aUUID.static CompoundTagupdate(com.mojang.datafixers.DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion)Uses the data fixer to update an NBT compound object to the latest data version.static CompoundTagupdate(com.mojang.datafixers.DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion)Uses the data fixer to update an NBT compound object.private static <S extends State<?,S>,T extends Comparable<T>>
SwithProperty(S state, Property<T> property, String key, CompoundTag properties, CompoundTag root)static CompoundTagwriteGameProfile(CompoundTag compound, com.mojang.authlib.GameProfile profile)
-
-
-
字段详细资料
-
field_27816
private static final Comparator<ListTag> field_27816
- Mappings:
Namespace Name Mixin selector official bLnh;b:Ljava/util/Comparator;intermediary field_27816Lnet/minecraft/class_2512;field_27816:Ljava/util/Comparator;named field_27816Lnet/minecraft/nbt/NbtHelper;field_27816:Ljava/util/Comparator;
-
field_27817
private static final Comparator<ListTag> field_27817
- Mappings:
Namespace Name Mixin selector official cLnh;c:Ljava/util/Comparator;intermediary field_27817Lnet/minecraft/class_2512;field_27817:Ljava/util/Comparator;named field_27817Lnet/minecraft/nbt/NbtHelper;field_27817:Ljava/util/Comparator;
-
field_33224
public static final String field_33224
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLnh;a:Ljava/lang/String;intermediary field_33224Lnet/minecraft/class_2512;field_33224:Ljava/lang/String;named field_33224Lnet/minecraft/nbt/NbtHelper;field_33224:Ljava/lang/String;
-
SNBT_START
private static final char SNBT_START
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official dLnh;d:Cintermediary field_33225Lnet/minecraft/class_2512;field_33225:Cnamed SNBT_STARTLnet/minecraft/nbt/NbtHelper;SNBT_START:C
-
SNBT_END
private static final char SNBT_END
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official eLnh;e:Cintermediary field_33226Lnet/minecraft/class_2512;field_33226:Cnamed SNBT_ENDLnet/minecraft/nbt/NbtHelper;SNBT_END:C
-
COMMA
private static final String COMMA
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official fLnh;f:Ljava/lang/String;intermediary field_33227Lnet/minecraft/class_2512;field_33227:Ljava/lang/String;named COMMALnet/minecraft/nbt/NbtHelper;COMMA:Ljava/lang/String;
-
COLON
private static final char COLON
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official gLnh;g:Cintermediary field_33228Lnet/minecraft/class_2512;field_33228:Cnamed COLONLnet/minecraft/nbt/NbtHelper;COLON:C
-
COMMA_SPLITTER
private static final Splitter COMMA_SPLITTER
- Mappings:
Namespace Name Mixin selector official hLnh;h:Lcom/google/common/base/Splitter;intermediary field_27818Lnet/minecraft/class_2512;field_27818:Lcom/google/common/base/Splitter;named COMMA_SPLITTERLnet/minecraft/nbt/NbtHelper;COMMA_SPLITTER:Lcom/google/common/base/Splitter;
-
field_27819
private static final Splitter field_27819
- Mappings:
Namespace Name Mixin selector official iLnh;i:Lcom/google/common/base/Splitter;intermediary field_27819Lnet/minecraft/class_2512;field_27819:Lcom/google/common/base/Splitter;named field_27819Lnet/minecraft/nbt/NbtHelper;field_27819:Lcom/google/common/base/Splitter;
-
LOGGER
private static final Logger LOGGER
- Mappings:
Namespace Name Mixin selector official jLnh;j:Lorg/apache/logging/log4j/Logger;intermediary field_11582Lnet/minecraft/class_2512;field_11582:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/minecraft/nbt/NbtHelper;LOGGER:Lorg/apache/logging/log4j/Logger;
-
field_33229
private static final int field_33229
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official kLnh;k:Iintermediary field_33229Lnet/minecraft/class_2512;field_33229:Inamed field_33229Lnet/minecraft/nbt/NbtHelper;field_33229:I
-
field_33230
private static final int field_33230
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official lLnh;l:Iintermediary field_33230Lnet/minecraft/class_2512;field_33230:Inamed field_33230Lnet/minecraft/nbt/NbtHelper;field_33230:I
-
-
方法详细资料
-
toGameProfile
@Nullable public static @Nullable com.mojang.authlib.GameProfile toGameProfile(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lmv;)Lcom/mojang/authlib/GameProfile;intermediary method_10683Lnet/minecraft/class_2512;method_10683(Lnet/minecraft/class_2487;)Lcom/mojang/authlib/GameProfile;named toGameProfileLnet/minecraft/nbt/NbtHelper;toGameProfile(Lnet/minecraft/nbt/CompoundTag;)Lcom/mojang/authlib/GameProfile;
-
writeGameProfile
public static CompoundTag writeGameProfile(CompoundTag compound, com.mojang.authlib.GameProfile profile)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lmv;Lcom/mojang/authlib/GameProfile;)Lmv;intermediary method_10684Lnet/minecraft/class_2512;method_10684(Lnet/minecraft/class_2487;Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/class_2487;named writeGameProfileLnet/minecraft/nbt/NbtHelper;writeGameProfile(Lnet/minecraft/nbt/CompoundTag;Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/nbt/CompoundTag;
-
matches
public static boolean matches(@Nullable @Nullable Tag standard, @Nullable @Nullable Tag subject, boolean equalValue)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lnn;Lnn;Z)Zintermediary method_10687Lnet/minecraft/class_2512;method_10687(Lnet/minecraft/class_2520;Lnet/minecraft/class_2520;Z)Znamed matchesLnet/minecraft/nbt/NbtHelper;matches(Lnet/minecraft/nbt/Tag;Lnet/minecraft/nbt/Tag;Z)Z
-
fromUuid
public static IntArrayTag fromUuid(UUID uuid)
Serializes aUUIDinto its equivalent NBT representation.- 从以下版本开始:
- 20w10a
- Mappings:
Namespace Name Mixin selector official aLnh;a(Ljava/util/UUID;)Lmz;intermediary method_25929Lnet/minecraft/class_2512;method_25929(Ljava/util/UUID;)Lnet/minecraft/class_2495;named fromUuidLnet/minecraft/nbt/NbtHelper;fromUuid(Ljava/util/UUID;)Lnet/minecraft/nbt/IntArrayTag;
-
toUuid
public static UUID toUuid(Tag element)
Deserializes an NBT element into aUUID. The NBT element's data must have the same structure as the output offromUuid(java.util.UUID).- 抛出:
IllegalArgumentException- ifelementis not a valid representation of a UUID- 从以下版本开始:
- 20w10a
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lnn;)Ljava/util/UUID;intermediary method_25930Lnet/minecraft/class_2512;method_25930(Lnet/minecraft/class_2520;)Ljava/util/UUID;named toUuidLnet/minecraft/nbt/NbtHelper;toUuid(Lnet/minecraft/nbt/Tag;)Ljava/util/UUID;
-
toBlockPos
public static BlockPos toBlockPos(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official bLnh;b(Lmv;)Lgb;intermediary method_10691Lnet/minecraft/class_2512;method_10691(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2338;named toBlockPosLnet/minecraft/nbt/NbtHelper;toBlockPos(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/util/math/BlockPos;
-
fromBlockPos
public static CompoundTag fromBlockPos(BlockPos pos)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lgb;)Lmv;intermediary method_10692Lnet/minecraft/class_2512;method_10692(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2487;named fromBlockPosLnet/minecraft/nbt/NbtHelper;fromBlockPos(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/nbt/CompoundTag;
-
toBlockState
public static BlockState toBlockState(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official cLnh;c(Lmv;)Lcjr;intermediary method_10681Lnet/minecraft/class_2512;method_10681(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2680;named toBlockStateLnet/minecraft/nbt/NbtHelper;toBlockState(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/block/BlockState;
-
withProperty
private static <S extends State<?,S>,T extends Comparable<T>> S withProperty(S state, Property<T> property, String key, CompoundTag properties, CompoundTag root)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lcjt;Lcku;Ljava/lang/String;Lmv;Lmv;)Lcjt;intermediary method_10682Lnet/minecraft/class_2512;method_10682(Lnet/minecraft/class_2688;Lnet/minecraft/class_2769;Ljava/lang/String;Lnet/minecraft/class_2487;Lnet/minecraft/class_2487;)Lnet/minecraft/class_2688;named withPropertyLnet/minecraft/nbt/NbtHelper;withProperty(Lnet/minecraft/state/State;Lnet/minecraft/state/property/Property;Ljava/lang/String;Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/state/State;
-
fromBlockState
public static CompoundTag fromBlockState(BlockState state)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lcjr;)Lmv;intermediary method_10686Lnet/minecraft/class_2512;method_10686(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2487;named fromBlockStateLnet/minecraft/nbt/NbtHelper;fromBlockState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/nbt/CompoundTag;
-
method_36115
public static CompoundTag method_36115(FluidState fluidState)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Ldds;)Lmv;intermediary method_36115Lnet/minecraft/class_2512;method_36115(Lnet/minecraft/class_3610;)Lnet/minecraft/class_2487;named method_36115Lnet/minecraft/nbt/NbtHelper;method_36115(Lnet/minecraft/fluid/FluidState;)Lnet/minecraft/nbt/CompoundTag;
-
nameValue
private static <T extends Comparable<T>> String nameValue(Property<T> property, Comparable<?> value)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lcku;Ljava/lang/Comparable;)Ljava/lang/String;intermediary method_10685Lnet/minecraft/class_2512;method_10685(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/String;named nameValueLnet/minecraft/nbt/NbtHelper;nameValue(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Ljava/lang/String;
-
method_36118
public static String method_36118(Tag tag)
- Mappings:
Namespace Name Mixin selector official bLnh;b(Lnn;)Ljava/lang/String;intermediary method_36118Lnet/minecraft/class_2512;method_36118(Lnet/minecraft/class_2520;)Ljava/lang/String;named method_36118Lnet/minecraft/nbt/NbtHelper;method_36118(Lnet/minecraft/nbt/Tag;)Ljava/lang/String;
-
method_36117
public static String method_36117(Tag tag, boolean bool)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Lnn;Z)Ljava/lang/String;intermediary method_36117Lnet/minecraft/class_2512;method_36117(Lnet/minecraft/class_2520;Z)Ljava/lang/String;named method_36117Lnet/minecraft/nbt/NbtHelper;method_36117(Lnet/minecraft/nbt/Tag;Z)Ljava/lang/String;
-
method_36116
public static StringBuilder method_36116(StringBuilder stringBuilder, Tag tag, int int2, boolean bool)
- Mappings:
Namespace Name Mixin selector official aLnh;a(Ljava/lang/StringBuilder;Lnn;IZ)Ljava/lang/StringBuilder;intermediary method_36116Lnet/minecraft/class_2512;method_36116(Ljava/lang/StringBuilder;Lnet/minecraft/class_2520;IZ)Ljava/lang/StringBuilder;named method_36116Lnet/minecraft/nbt/NbtHelper;method_36116(Ljava/lang/StringBuilder;Lnet/minecraft/nbt/Tag;IZ)Ljava/lang/StringBuilder;
-
method_36114
private static StringBuilder method_36114(int int2, StringBuilder stringBuilder)
- Mappings:
Namespace Name Mixin selector official aLnh;a(ILjava/lang/StringBuilder;)Ljava/lang/StringBuilder;intermediary method_36114Lnet/minecraft/class_2512;method_36114(ILjava/lang/StringBuilder;)Ljava/lang/StringBuilder;named method_36114Lnet/minecraft/nbt/NbtHelper;method_36114(ILjava/lang/StringBuilder;)Ljava/lang/StringBuilder;
-
update
public static CompoundTag update(com.mojang.datafixers.DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion)
Uses the data fixer to update an NBT compound object to the latest data version.- 参数:
fixer- the data fixerfixTypes- the fix typescompound- the NBT compound object to fixoldVersion- the data version of the NBT compound object- Mappings:
Namespace Name Mixin selector official aLnh;a(Lcom/mojang/datafixers/DataFixer;Lahh;Lmv;I)Lmv;intermediary method_10688Lnet/minecraft/class_2512;method_10688(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_4284;Lnet/minecraft/class_2487;I)Lnet/minecraft/class_2487;named updateLnet/minecraft/nbt/NbtHelper;update(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/datafixer/DataFixTypes;Lnet/minecraft/nbt/CompoundTag;I)Lnet/minecraft/nbt/CompoundTag;
-
update
public static CompoundTag update(com.mojang.datafixers.DataFixer fixer, DataFixTypes fixTypes, CompoundTag compound, int oldVersion, int targetVersion)
Uses the data fixer to update an NBT compound object.- 参数:
fixer- the data fixerfixTypes- the fix typescompound- the NBT compound object to fixoldVersion- the data version of the NBT compound objecttargetVersion- the data version to update the NBT compound object to- Mappings:
Namespace Name Mixin selector official aLnh;a(Lcom/mojang/datafixers/DataFixer;Lahh;Lmv;II)Lmv;intermediary method_10693Lnet/minecraft/class_2512;method_10693(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_4284;Lnet/minecraft/class_2487;II)Lnet/minecraft/class_2487;named updateLnet/minecraft/nbt/NbtHelper;update(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/datafixer/DataFixTypes;Lnet/minecraft/nbt/CompoundTag;II)Lnet/minecraft/nbt/CompoundTag;
-
toPrettyPrintedText
public static Text toPrettyPrintedText(Tag element)
- Mappings:
Namespace Name Mixin selector official cLnh;c(Lnn;)Lon;intermediary method_32270Lnet/minecraft/class_2512;method_32270(Lnet/minecraft/class_2520;)Lnet/minecraft/class_2561;named toPrettyPrintedTextLnet/minecraft/nbt/NbtHelper;toPrettyPrintedText(Lnet/minecraft/nbt/Tag;)Lnet/minecraft/text/Text;
-
toPrettyPrintedString
public static String toPrettyPrintedString(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official dLnh;d(Lmv;)Ljava/lang/String;intermediary method_32271Lnet/minecraft/class_2512;method_32271(Lnet/minecraft/class_2487;)Ljava/lang/String;named toPrettyPrintedStringLnet/minecraft/nbt/NbtHelper;toPrettyPrintedString(Lnet/minecraft/nbt/CompoundTag;)Ljava/lang/String;
-
method_32260
public static CompoundTag method_32260(String string) throws com.mojang.brigadier.exceptions.CommandSyntaxException
- 抛出:
com.mojang.brigadier.exceptions.CommandSyntaxException- Mappings:
Namespace Name Mixin selector official aLnh;a(Ljava/lang/String;)Lmv;intermediary method_32260Lnet/minecraft/class_2512;method_32260(Ljava/lang/String;)Lnet/minecraft/class_2487;named method_32260Lnet/minecraft/nbt/NbtHelper;method_32260(Ljava/lang/String;)Lnet/minecraft/nbt/CompoundTag;
-
method_32273
static CompoundTag method_32273(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official eLnh;e(Lmv;)Lmv;intermediary method_32273Lnet/minecraft/class_2512;method_32273(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;named method_32273Lnet/minecraft/nbt/NbtHelper;method_32273(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/nbt/CompoundTag;
-
method_32275
static CompoundTag method_32275(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official fLnh;f(Lmv;)Lmv;intermediary method_32275Lnet/minecraft/class_2512;method_32275(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;named method_32275Lnet/minecraft/nbt/NbtHelper;method_32275(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/nbt/CompoundTag;
-
method_32277
static String method_32277(CompoundTag compound)
- Mappings:
Namespace Name Mixin selector official gLnh;g(Lmv;)Ljava/lang/String;intermediary method_32277Lnet/minecraft/class_2512;method_32277(Lnet/minecraft/class_2487;)Ljava/lang/String;named method_32277Lnet/minecraft/nbt/NbtHelper;method_32277(Lnet/minecraft/nbt/CompoundTag;)Ljava/lang/String;
-
method_32267
static CompoundTag method_32267(String string)
- Mappings:
Namespace Name Mixin selector official bLnh;b(Ljava/lang/String;)Lmv;intermediary method_32267Lnet/minecraft/class_2512;method_32267(Ljava/lang/String;)Lnet/minecraft/class_2487;named method_32267Lnet/minecraft/nbt/NbtHelper;method_32267(Ljava/lang/String;)Lnet/minecraft/nbt/CompoundTag;
-
-