public final class NBTUtilBC
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static net.minecraft.nbt.NBTTagCompound |
NBT_NULL |
Constructor and Description |
---|
NBTUtilBC() |
Modifier and Type | Method and Description |
---|---|
static net.minecraft.nbt.NBTTagCompound |
getItemData(net.minecraft.item.ItemStack stack) |
static net.minecraft.nbt.NBTBase |
merge(net.minecraft.nbt.NBTBase destination,
net.minecraft.nbt.NBTBase source) |
static net.minecraft.util.math.BlockPos |
readBlockPos(net.minecraft.nbt.NBTBase base) |
static java.util.stream.Stream<net.minecraft.nbt.NBTTagCompound> |
readCompoundList(net.minecraft.nbt.NBTBase list) |
static double[] |
readDoubleArray(net.minecraft.nbt.NBTBase tag,
int intendedLength) |
static <E extends java.lang.Enum<E>> |
readEnum(net.minecraft.nbt.NBTBase nbt,
java.lang.Class<E> clazz) |
static <E extends java.lang.Enum<E>> |
readEnumSet(net.minecraft.nbt.NBTBase tag,
java.lang.Class<E> clazz) |
static java.util.stream.Stream<java.lang.String> |
readStringList(net.minecraft.nbt.NBTBase list) |
static net.minecraft.util.math.Vec3d |
readVec3d(net.minecraft.nbt.NBTBase nbt) |
static net.minecraft.util.math.Vec3d |
readVec3d(net.minecraft.nbt.NBTTagList list) |
static <N extends net.minecraft.nbt.NBTBase> |
toOptional(N value) |
static net.minecraft.nbt.NBTTagIntArray |
writeBlockPos(net.minecraft.util.math.BlockPos pos) |
static net.minecraft.nbt.NBTTagCompound |
writeBlockPosAsCompound(net.minecraft.util.math.BlockPos pos) |
static net.minecraft.nbt.NBTTagList |
writeCompoundList(java.util.stream.Stream<net.minecraft.nbt.NBTTagCompound> stream) |
static net.minecraft.nbt.NBTBase |
writeDoubleArray(double[] data) |
static <E extends java.lang.Enum<E>> |
writeEnum(E value) |
static <E extends java.lang.Enum<E>> |
writeEnumSet(java.util.EnumSet<E> set,
java.lang.Class<E> clazz)
Writes an
EnumSet to an NBTBase . |
static net.minecraft.nbt.NBTTagList |
writeStringList(java.util.stream.Stream<java.lang.String> stream) |
static net.minecraft.nbt.NBTTagList |
writeVec3d(net.minecraft.util.math.Vec3d vec3) |
public static <N extends net.minecraft.nbt.NBTBase> java.util.Optional<N> toOptional(N value)
public static net.minecraft.nbt.NBTBase merge(net.minecraft.nbt.NBTBase destination, net.minecraft.nbt.NBTBase source)
public static net.minecraft.nbt.NBTTagCompound getItemData(@Nonnull net.minecraft.item.ItemStack stack)
public static net.minecraft.nbt.NBTTagIntArray writeBlockPos(net.minecraft.util.math.BlockPos pos)
public static net.minecraft.nbt.NBTTagCompound writeBlockPosAsCompound(net.minecraft.util.math.BlockPos pos)
@Nullable public static net.minecraft.util.math.BlockPos readBlockPos(net.minecraft.nbt.NBTBase base)
public static net.minecraft.nbt.NBTTagList writeVec3d(net.minecraft.util.math.Vec3d vec3)
@Nullable public static net.minecraft.util.math.Vec3d readVec3d(net.minecraft.nbt.NBTBase nbt)
public static net.minecraft.util.math.Vec3d readVec3d(net.minecraft.nbt.NBTTagList list)
public static <E extends java.lang.Enum<E>> net.minecraft.nbt.NBTBase writeEnum(E value)
public static <E extends java.lang.Enum<E>> E readEnum(net.minecraft.nbt.NBTBase nbt, java.lang.Class<E> clazz)
public static net.minecraft.nbt.NBTBase writeDoubleArray(double[] data)
public static double[] readDoubleArray(net.minecraft.nbt.NBTBase tag, int intendedLength)
public static <E extends java.lang.Enum<E>> net.minecraft.nbt.NBTBase writeEnumSet(java.util.EnumSet<E> set, java.lang.Class<E> clazz)
EnumSet
to an NBTBase
. The returned type will either be NBTTagByte
or
NBTTagByteArray
.clazz
- The class that the EnumSet
is of. This is required as we have no way of getting the class
from the set.public static <E extends java.lang.Enum<E>> java.util.EnumSet<E> readEnumSet(net.minecraft.nbt.NBTBase tag, java.lang.Class<E> clazz)
public static net.minecraft.nbt.NBTTagList writeCompoundList(java.util.stream.Stream<net.minecraft.nbt.NBTTagCompound> stream)
public static java.util.stream.Stream<net.minecraft.nbt.NBTTagCompound> readCompoundList(net.minecraft.nbt.NBTBase list)
public static net.minecraft.nbt.NBTTagList writeStringList(java.util.stream.Stream<java.lang.String> stream)
public static java.util.stream.Stream<java.lang.String> readStringList(net.minecraft.nbt.NBTBase list)