@@ -0,0 +1,11 @@
+package com.gmail.nossr50.core.nbt;
+
+public interface NBTBase {
+ /**
+ * Get the NBTType for this NBTBase
+ * @return this NBTType
+ */
+ NBTType getNBTType();
+}
@@ -0,0 +1,28 @@
+public class NBTByte implements NBTBase {
+ private String key;
+ private Byte value;
+ @Override
+ public NBTType getNBTType() {
+ return NBTType.BYTE;
+ }
+ public String getKey() {
+ return key;
+ public void setKey(String key) {
+ this.key = key;
+ public Byte getValue() {
+ return value;
+ public void setValue(Byte value) {
+ this.value = value;
@@ -0,0 +1,32 @@
+public class NBTByteArray implements NBTBase {
+ private byte[] values;
+ return NBTType.BYTE_ARRAY;
+ public int getLength() {
+ return values.length;
+ public byte[] getValues() {
+ return values;
+ public void setValues(byte[] values) {
+ this.values = values;
+public class NBTDouble implements NBTBase {
+ private double value;
+ return NBTType.DOUBLE;
+ public double getValue() {
+ public void setValue(double value) {
+public class NBTFloat implements NBTBase {
+ private float value;
+ return NBTType.FLOAT;
+ public float getValue() {
+ public void setValue(float value) {
+public class NBTIntArray implements NBTBase {
+ private int[] values;
+ return NBTType.INT_ARRAY;
+ public int[] getValues() {
+ public void setValues(int[] values) {
+public class NBTInteger implements NBTBase {
+ private int value;
+ return NBTType.INT;
+ public int getValue() {
+ public void setValue(int value) {
@@ -0,0 +1,35 @@
+import java.util.List;
+public class NBTList implements NBTBase {
+ private int length;
+ private List<? extends NBTBase> values;
+ return NBTType.LIST;
+ return length;
+ public List<? extends NBTBase> getValues() {
+ public void setValues(List<? extends NBTBase> values) {
+public class NBTLong implements NBTBase {
+ public String key;
+ public long value;
+ public long getValue() {
+ public void setValue(long value) {
+ return NBTType.LONG;
+public class NBTLongArray implements NBTBase {
+ private long[] values;
+ return NBTType.LONG_ARRAY;
+ public long[] getValues() {
+ public void setValues(long[] values) {
+public class NBTShort implements NBTBase {
+ private short value;
+ return NBTType.SHORT;
+ public short getValue() {
+ public void setValue(short value) {
+public class NBTString implements NBTBase {
+ private String value;
+ return NBTType.STRING;
+ public String getValue() {
+ public void setValue(String value) {
@@ -0,0 +1,18 @@
+import java.util.Map;
+public class NBTTagCompound implements NBTBase {
+ private Map<String, NBTBase> tagMap;
+ return NBTType.COMPOUND;
+ public NBTBase getTag(String key) {
+ return tagMap.get(key);
@@ -0,0 +1,22 @@
+/**
+ * Represents the NBT Type
+ * Based on NBT Structure in 1.14.4
+public enum NBTType {
+ ////String[] a = new String[]{"END", "BYTE", "SHORT", "INT", "LONG", "FLOAT", "DOUBLE", "BYTE[]", "STRING", "LIST", "COMPOUND", "INT[]", "LONG[]"};
+ END,
+ BYTE,
+ SHORT,
+ INT,
+ LONG,
+ FLOAT,
+ DOUBLE,
+ BYTE_ARRAY,
+ STRING,
+ LIST,
+ COMPOUND,
+ INT_ARRAY,
+ LONG_ARRAY