Package net.sandrohc.schematic4j.utils
Class TagUtils
java.lang.Object
net.sandrohc.schematic4j.utils.TagUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<byte[]>getByteArray(net.querz.nbt.tag.CompoundTag tag, String key) static byte[]getByteArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static bytegetByteOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<net.querz.nbt.tag.CompoundTag>getCompound(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<net.querz.nbt.tag.ListTag<net.querz.nbt.tag.CompoundTag>>getCompoundList(net.querz.nbt.tag.CompoundTag tag, String key) static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.CompoundTag>getCompoundListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static net.querz.nbt.tag.CompoundTaggetCompoundOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<net.querz.nbt.tag.ListTag<net.querz.nbt.tag.DoubleTag>>getDoubleList(net.querz.nbt.tag.CompoundTag tag, String key) static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.DoubleTag>getDoubleListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static doublegetDoubleOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<net.querz.nbt.tag.ListTag<net.querz.nbt.tag.FloatTag>>getFloatList(net.querz.nbt.tag.CompoundTag tag, String key) static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.FloatTag>getFloatListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static floatgetFloatOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<int[]>getIntArray(net.querz.nbt.tag.CompoundTag tag, String key) static int[]getIntArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static intgetIntOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static Optional<long[]>getLongArray(net.querz.nbt.tag.CompoundTag tag, String key) static long[]getLongArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static longgetLongOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static shortgetShortOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) static StringgetStringOrThrow(net.querz.nbt.tag.CompoundTag tag, String key)
-
Constructor Details
-
TagUtils
public TagUtils()
-
-
Method Details
-
getInt
-
getShort
-
getByte
-
getLong
-
getFloat
-
getDouble
-
getIntArray
-
getByteArray
-
getLongArray
-
getFloatList
-
getDoubleList
-
getCompoundList
-
getString
-
getCompound
-
getIntOrThrow
public static int getIntOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getShortOrThrow
public static short getShortOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getByteOrThrow
public static byte getByteOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getLongOrThrow
public static long getLongOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getFloatOrThrow
public static float getFloatOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getDoubleOrThrow
public static double getDoubleOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getIntArrayOrThrow
public static int[] getIntArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getByteArrayOrThrow
public static byte[] getByteArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getLongArrayOrThrow
public static long[] getLongArrayOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getFloatListOrThrow
public static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.FloatTag> getFloatListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getDoubleListOrThrow
public static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.DoubleTag> getDoubleListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getCompoundListOrThrow
public static net.querz.nbt.tag.ListTag<net.querz.nbt.tag.CompoundTag> getCompoundListOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getStringOrThrow
public static String getStringOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-
getCompoundOrThrow
public static net.querz.nbt.tag.CompoundTag getCompoundOrThrow(net.querz.nbt.tag.CompoundTag tag, String key) throws MissingFieldException - Throws:
MissingFieldException
-