类 NbtHelper


  • public final class NbtHelper
    extends Object
    Mappings:
    Namespace Name
    official nh
    intermediary net/minecraft/class_2512
    named net/minecraft/nbt/NbtHelper
    • 字段详细资料

      • field_27816

        private static final Comparator<ListTag> field_27816
        Mappings:
        Namespace Name Mixin selector
        official b Lnh;b:Ljava/util/Comparator;
        intermediary field_27816 Lnet/minecraft/class_2512;field_27816:Ljava/util/Comparator;
        named field_27816 Lnet/minecraft/nbt/NbtHelper;field_27816:Ljava/util/Comparator;
      • field_27817

        private static final Comparator<ListTag> field_27817
        Mappings:
        Namespace Name Mixin selector
        official c Lnh;c:Ljava/util/Comparator;
        intermediary field_27817 Lnet/minecraft/class_2512;field_27817:Ljava/util/Comparator;
        named field_27817 Lnet/minecraft/nbt/NbtHelper;field_27817:Ljava/util/Comparator;
      • field_33224

        public static final String field_33224
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a:Ljava/lang/String;
        intermediary field_33224 Lnet/minecraft/class_2512;field_33224:Ljava/lang/String;
        named field_33224 Lnet/minecraft/nbt/NbtHelper;field_33224:Ljava/lang/String;
      • SNBT_START

        private static final char SNBT_START
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official d Lnh;d:C
        intermediary field_33225 Lnet/minecraft/class_2512;field_33225:C
        named SNBT_START Lnet/minecraft/nbt/NbtHelper;SNBT_START:C
      • SNBT_END

        private static final char SNBT_END
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official e Lnh;e:C
        intermediary field_33226 Lnet/minecraft/class_2512;field_33226:C
        named SNBT_END Lnet/minecraft/nbt/NbtHelper;SNBT_END:C
      • COMMA

        private static final String COMMA
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official f Lnh;f:Ljava/lang/String;
        intermediary field_33227 Lnet/minecraft/class_2512;field_33227:Ljava/lang/String;
        named COMMA Lnet/minecraft/nbt/NbtHelper;COMMA:Ljava/lang/String;
      • COLON

        private static final char COLON
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official g Lnh;g:C
        intermediary field_33228 Lnet/minecraft/class_2512;field_33228:C
        named COLON Lnet/minecraft/nbt/NbtHelper;COLON:C
      • COMMA_SPLITTER

        private static final Splitter COMMA_SPLITTER
        Mappings:
        Namespace Name Mixin selector
        official h Lnh;h:Lcom/google/common/base/Splitter;
        intermediary field_27818 Lnet/minecraft/class_2512;field_27818:Lcom/google/common/base/Splitter;
        named COMMA_SPLITTER Lnet/minecraft/nbt/NbtHelper;COMMA_SPLITTER:Lcom/google/common/base/Splitter;
      • field_27819

        private static final Splitter field_27819
        Mappings:
        Namespace Name Mixin selector
        official i Lnh;i:Lcom/google/common/base/Splitter;
        intermediary field_27819 Lnet/minecraft/class_2512;field_27819:Lcom/google/common/base/Splitter;
        named field_27819 Lnet/minecraft/nbt/NbtHelper;field_27819:Lcom/google/common/base/Splitter;
      • LOGGER

        private static final Logger LOGGER
        Mappings:
        Namespace Name Mixin selector
        official j Lnh;j:Lorg/apache/logging/log4j/Logger;
        intermediary field_11582 Lnet/minecraft/class_2512;field_11582:Lorg/apache/logging/log4j/Logger;
        named LOGGER Lnet/minecraft/nbt/NbtHelper;LOGGER:Lorg/apache/logging/log4j/Logger;
      • field_33229

        private static final int field_33229
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official k Lnh;k:I
        intermediary field_33229 Lnet/minecraft/class_2512;field_33229:I
        named field_33229 Lnet/minecraft/nbt/NbtHelper;field_33229:I
      • field_33230

        private static final int field_33230
        另请参阅:
        常量字段值
        Mappings:
        Namespace Name Mixin selector
        official l Lnh;l:I
        intermediary field_33230 Lnet/minecraft/class_2512;field_33230:I
        named field_33230 Lnet/minecraft/nbt/NbtHelper;field_33230:I
    • 构造器详细资料

      • NbtHelper

        private NbtHelper()
    • 方法详细资料

      • toGameProfile

        @Nullable
        public static @Nullable com.mojang.authlib.GameProfile toGameProfile​(CompoundTag compound)
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a(Lmv;)Lcom/mojang/authlib/GameProfile;
        intermediary method_10683 Lnet/minecraft/class_2512;method_10683(Lnet/minecraft/class_2487;)Lcom/mojang/authlib/GameProfile;
        named toGameProfile Lnet/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 a Lnh;a(Lmv;Lcom/mojang/authlib/GameProfile;)Lmv;
        intermediary method_10684 Lnet/minecraft/class_2512;method_10684(Lnet/minecraft/class_2487;Lcom/mojang/authlib/GameProfile;)Lnet/minecraft/class_2487;
        named writeGameProfile Lnet/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 a Lnh;a(Lnn;Lnn;Z)Z
        intermediary method_10687 Lnet/minecraft/class_2512;method_10687(Lnet/minecraft/class_2520;Lnet/minecraft/class_2520;Z)Z
        named matches Lnet/minecraft/nbt/NbtHelper;matches(Lnet/minecraft/nbt/Tag;Lnet/minecraft/nbt/Tag;Z)Z
      • fromUuid

        public static IntArrayTag fromUuid​(UUID uuid)
        Serializes a UUID into its equivalent NBT representation.
        从以下版本开始:
        20w10a
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a(Ljava/util/UUID;)Lmz;
        intermediary method_25929 Lnet/minecraft/class_2512;method_25929(Ljava/util/UUID;)Lnet/minecraft/class_2495;
        named fromUuid Lnet/minecraft/nbt/NbtHelper;fromUuid(Ljava/util/UUID;)Lnet/minecraft/nbt/IntArrayTag;
      • toUuid

        public static UUID toUuid​(Tag element)
        Deserializes an NBT element into a UUID. The NBT element's data must have the same structure as the output of fromUuid(java.util.UUID).
        抛出:
        IllegalArgumentException - if element is not a valid representation of a UUID
        从以下版本开始:
        20w10a
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a(Lnn;)Ljava/util/UUID;
        intermediary method_25930 Lnet/minecraft/class_2512;method_25930(Lnet/minecraft/class_2520;)Ljava/util/UUID;
        named toUuid Lnet/minecraft/nbt/NbtHelper;toUuid(Lnet/minecraft/nbt/Tag;)Ljava/util/UUID;
      • toBlockPos

        public static BlockPos toBlockPos​(CompoundTag compound)
        Mappings:
        Namespace Name Mixin selector
        official b Lnh;b(Lmv;)Lgb;
        intermediary method_10691 Lnet/minecraft/class_2512;method_10691(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2338;
        named toBlockPos Lnet/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 a Lnh;a(Lgb;)Lmv;
        intermediary method_10692 Lnet/minecraft/class_2512;method_10692(Lnet/minecraft/class_2338;)Lnet/minecraft/class_2487;
        named fromBlockPos Lnet/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 c Lnh;c(Lmv;)Lcjr;
        intermediary method_10681 Lnet/minecraft/class_2512;method_10681(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2680;
        named toBlockState Lnet/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 a Lnh;a(Lcjt;Lcku;Ljava/lang/String;Lmv;Lmv;)Lcjt;
        intermediary method_10682 Lnet/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 withProperty Lnet/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 a Lnh;a(Lcjr;)Lmv;
        intermediary method_10686 Lnet/minecraft/class_2512;method_10686(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2487;
        named fromBlockState Lnet/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 a Lnh;a(Ldds;)Lmv;
        intermediary method_36115 Lnet/minecraft/class_2512;method_36115(Lnet/minecraft/class_3610;)Lnet/minecraft/class_2487;
        named method_36115 Lnet/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 a Lnh;a(Lcku;Ljava/lang/Comparable;)Ljava/lang/String;
        intermediary method_10685 Lnet/minecraft/class_2512;method_10685(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Ljava/lang/String;
        named nameValue Lnet/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 b Lnh;b(Lnn;)Ljava/lang/String;
        intermediary method_36118 Lnet/minecraft/class_2512;method_36118(Lnet/minecraft/class_2520;)Ljava/lang/String;
        named method_36118 Lnet/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 a Lnh;a(Lnn;Z)Ljava/lang/String;
        intermediary method_36117 Lnet/minecraft/class_2512;method_36117(Lnet/minecraft/class_2520;Z)Ljava/lang/String;
        named method_36117 Lnet/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 a Lnh;a(Ljava/lang/StringBuilder;Lnn;IZ)Ljava/lang/StringBuilder;
        intermediary method_36116 Lnet/minecraft/class_2512;method_36116(Ljava/lang/StringBuilder;Lnet/minecraft/class_2520;IZ)Ljava/lang/StringBuilder;
        named method_36116 Lnet/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 a Lnh;a(ILjava/lang/StringBuilder;)Ljava/lang/StringBuilder;
        intermediary method_36114 Lnet/minecraft/class_2512;method_36114(ILjava/lang/StringBuilder;)Ljava/lang/StringBuilder;
        named method_36114 Lnet/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 fixer
        fixTypes - the fix types
        compound - the NBT compound object to fix
        oldVersion - the data version of the NBT compound object
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a(Lcom/mojang/datafixers/DataFixer;Lahh;Lmv;I)Lmv;
        intermediary method_10688 Lnet/minecraft/class_2512;method_10688(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_4284;Lnet/minecraft/class_2487;I)Lnet/minecraft/class_2487;
        named update Lnet/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 fixer
        fixTypes - the fix types
        compound - the NBT compound object to fix
        oldVersion - the data version of the NBT compound object
        targetVersion - the data version to update the NBT compound object to
        Mappings:
        Namespace Name Mixin selector
        official a Lnh;a(Lcom/mojang/datafixers/DataFixer;Lahh;Lmv;II)Lmv;
        intermediary method_10693 Lnet/minecraft/class_2512;method_10693(Lcom/mojang/datafixers/DataFixer;Lnet/minecraft/class_4284;Lnet/minecraft/class_2487;II)Lnet/minecraft/class_2487;
        named update Lnet/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 c Lnh;c(Lnn;)Lon;
        intermediary method_32270 Lnet/minecraft/class_2512;method_32270(Lnet/minecraft/class_2520;)Lnet/minecraft/class_2561;
        named toPrettyPrintedText Lnet/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 d Lnh;d(Lmv;)Ljava/lang/String;
        intermediary method_32271 Lnet/minecraft/class_2512;method_32271(Lnet/minecraft/class_2487;)Ljava/lang/String;
        named toPrettyPrintedString Lnet/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 a Lnh;a(Ljava/lang/String;)Lmv;
        intermediary method_32260 Lnet/minecraft/class_2512;method_32260(Ljava/lang/String;)Lnet/minecraft/class_2487;
        named method_32260 Lnet/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 e Lnh;e(Lmv;)Lmv;
        intermediary method_32273 Lnet/minecraft/class_2512;method_32273(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;
        named method_32273 Lnet/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 f Lnh;f(Lmv;)Lmv;
        intermediary method_32275 Lnet/minecraft/class_2512;method_32275(Lnet/minecraft/class_2487;)Lnet/minecraft/class_2487;
        named method_32275 Lnet/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 g Lnh;g(Lmv;)Ljava/lang/String;
        intermediary method_32277 Lnet/minecraft/class_2512;method_32277(Lnet/minecraft/class_2487;)Ljava/lang/String;
        named method_32277 Lnet/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 b Lnh;b(Ljava/lang/String;)Lmv;
        intermediary method_32267 Lnet/minecraft/class_2512;method_32267(Ljava/lang/String;)Lnet/minecraft/class_2487;
        named method_32267 Lnet/minecraft/nbt/NbtHelper;method_32267(Ljava/lang/String;)Lnet/minecraft/nbt/CompoundTag;