Added the ability to use Int Arrays in nbt.

This commit is contained in:
Brianna 2020-08-24 13:03:43 -05:00
parent 8c6c9b1daf
commit e9509dc95f
30 changed files with 144 additions and 0 deletions

View File

@ -16,6 +16,8 @@ public interface NBTCompound {
NBTCompound set(String tag, byte b);
NBTCompound set(String tag, int[] i);
NBTCompound remove(String tag);
boolean has(String tag);

View File

@ -15,4 +15,6 @@ public interface NBTObject {
short asShort();
byte asByte();
int[] asIntArray();
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}

View File

@ -61,6 +61,12 @@ public abstract class NBTCompoundImpl implements NBTCompound {
return this;
}
@Override
public NBTCompound set(String tag, int[] i) {
compound.setIntArray(tag, i);
return this;
}
@Override
public NBTCompound remove(String tag) {
compound.remove(tag);

View File

@ -41,4 +41,8 @@ public class NBTObjectImpl implements NBTObject {
return compound.getByte(tag);
}
public int[] asIntArray() {
return compound.getIntArray(tag);
}
}