Class NbtUtils

java.lang.Object
net.minecraft.nbt.NbtUtils

public final class NbtUtils extends Object
  • Field Details

    • YXZ_LISTTAG_INT_COMPARATOR

      private static final Comparator<ListTag> YXZ_LISTTAG_INT_COMPARATOR
    • YXZ_LISTTAG_DOUBLE_COMPARATOR

      private static final Comparator<ListTag> YXZ_LISTTAG_DOUBLE_COMPARATOR
    • SNBT_DATA_TAG

      public static final String 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

      private static final String 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

      @Nullable public static com.mojang.authlib.GameProfile readGameProfile(CompoundTag p_129229_)
    • writeGameProfile

      public static CompoundTag writeGameProfile(CompoundTag p_129231_, com.mojang.authlib.GameProfile p_129232_)
    • compareNbt

      public static boolean compareNbt(@Nullable Tag p_129236_, @Nullable Tag p_129237_, boolean p_129238_)
    • createUUID

      public static IntArrayTag createUUID(UUID p_129227_)
    • loadUUID

      public static UUID loadUUID(Tag p_129234_)
    • readBlockPos

      public static BlockPos readBlockPos(CompoundTag p_129240_)
    • writeBlockPos

      public static CompoundTag writeBlockPos(BlockPos p_129225_)
    • readBlockState

      public static BlockState readBlockState(CompoundTag p_129242_)
    • 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

      public static CompoundTag writeBlockState(BlockState p_129203_)
    • writeFluidState

      public static CompoundTag writeFluidState(FluidState p_178023_)
    • getName

      private static <T extends Comparable<T>> String getName(Property<T> p_129211_, Comparable<?> p_129212_)
    • prettyPrint

      public static String prettyPrint(Tag p_178058_)
    • prettyPrint

      public static String prettyPrint(Tag p_178051_, boolean p_178052_)
    • prettyPrint

      public static StringBuilder prettyPrint(StringBuilder p_178027_, Tag p_178028_, int p_178029_, boolean p_178030_)
    • indent

      private static StringBuilder indent(int p_178020_, StringBuilder p_178021_)
    • 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

      public static Component toPrettyComponent(Tag p_178062_)
    • structureToSnbt

      public static String structureToSnbt(CompoundTag p_178064_)
    • snbtToStructure

      public static CompoundTag snbtToStructure(String p_178025_) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • packStructureTemplate

      static CompoundTag packStructureTemplate(CompoundTag p_178068_)
    • unpackStructureTemplate

      static CompoundTag unpackStructureTemplate(CompoundTag p_178072_)
    • packBlockState

      static String packBlockState(CompoundTag p_178076_)
    • unpackBlockState

      static CompoundTag unpackBlockState(String p_178054_)