Class NBTHelper

java.lang.Object
com.simibubi.create.foundation.utility.NBTHelper

public class NBTHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.nbt.Tag
    getINBT(net.minecraft.nbt.CompoundTag nbt, String id)
     
    static <T> void
    iterateCompoundList(net.minecraft.nbt.ListTag listNBT, Consumer<net.minecraft.nbt.CompoundTag> consumer)
     
    static void
    putMarker(net.minecraft.nbt.CompoundTag nbt, String marker)
     
    static net.minecraft.world.phys.AABB
    readAABB(net.minecraft.nbt.ListTag bbtag)
     
    static <T> List<T>
    readCompoundList(net.minecraft.nbt.ListTag listNBT, Function<net.minecraft.nbt.CompoundTag,T> deserializer)
     
    static <T extends Enum<?>>
    T
    readEnum(net.minecraft.nbt.CompoundTag nbt, String key, Class<T> enumClass)
     
    static List<net.minecraft.world.item.ItemStack>
    readItemList(net.minecraft.nbt.ListTag stacks)
     
    static net.minecraft.core.Vec3i
    readVec3i(net.minecraft.nbt.ListTag tag)
     
    static net.minecraft.nbt.ListTag
    writeAABB(net.minecraft.world.phys.AABB bb)
     
    static <T> net.minecraft.nbt.ListTag
    writeCompoundList(Iterable<T> list, Function<T,net.minecraft.nbt.CompoundTag> serializer)
     
    static <T extends Enum<?>>
    void
    writeEnum(net.minecraft.nbt.CompoundTag nbt, String key, T enumConstant)
     
    static net.minecraft.nbt.ListTag
    writeItemList(Iterable<net.minecraft.world.item.ItemStack> stacks)
     
    static net.minecraft.nbt.ListTag
    writeVec3i(net.minecraft.core.Vec3i vec)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NBTHelper

      public NBTHelper()
  • Method Details

    • putMarker

      public static void putMarker(net.minecraft.nbt.CompoundTag nbt, String marker)
    • readEnum

      public static <T extends Enum<?>> T readEnum(net.minecraft.nbt.CompoundTag nbt, String key, Class<T> enumClass)
    • writeEnum

      public static <T extends Enum<?>> void writeEnum(net.minecraft.nbt.CompoundTag nbt, String key, T enumConstant)
    • writeCompoundList

      public static <T> net.minecraft.nbt.ListTag writeCompoundList(Iterable<T> list, Function<T,net.minecraft.nbt.CompoundTag> serializer)
    • readCompoundList

      public static <T> List<T> readCompoundList(net.minecraft.nbt.ListTag listNBT, Function<net.minecraft.nbt.CompoundTag,T> deserializer)
    • iterateCompoundList

      public static <T> void iterateCompoundList(net.minecraft.nbt.ListTag listNBT, Consumer<net.minecraft.nbt.CompoundTag> consumer)
    • writeItemList

      public static net.minecraft.nbt.ListTag writeItemList(Iterable<net.minecraft.world.item.ItemStack> stacks)
    • readItemList

      public static List<net.minecraft.world.item.ItemStack> readItemList(net.minecraft.nbt.ListTag stacks)
    • writeAABB

      public static net.minecraft.nbt.ListTag writeAABB(net.minecraft.world.phys.AABB bb)
    • readAABB

      public static net.minecraft.world.phys.AABB readAABB(net.minecraft.nbt.ListTag bbtag)
    • writeVec3i

      public static net.minecraft.nbt.ListTag writeVec3i(net.minecraft.core.Vec3i vec)
    • readVec3i

      public static net.minecraft.core.Vec3i readVec3i(net.minecraft.nbt.ListTag tag)
    • getINBT

      @Nonnull public static net.minecraft.nbt.Tag getINBT(net.minecraft.nbt.CompoundTag nbt, String id)