Add NBT toString()

This commit is contained in:
Mike Primm 2021-12-15 02:14:12 -06:00
parent 3725123b76
commit 546ffffdc0
9 changed files with 55 additions and 1 deletions

View File

@ -89,6 +89,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final NBTTagList obj;
@ -107,6 +110,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final DataBits bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final NBTTagList obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final DataBits bs;

View File

@ -87,7 +87,10 @@ public class NBT {
@Override
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final NBTTagList obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.a(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final SimpleBitStorage bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final ListTag obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final PackedIntegerArray bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final NbtList obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final PackedIntegerArray bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final NbtList obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final PackedIntegerArray bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final ListNBT obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final BitArray bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final ListTag obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final BitStorage bs;

View File

@ -88,6 +88,9 @@ public class NBT {
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
return new OurBitStorage(bits, count, data);
}
public String toString() {
return obj.toString();
}
}
public static class NBTList implements GenericNBTList {
private final ListTag obj;
@ -106,6 +109,9 @@ public class NBT {
public GenericNBTCompound getCompound(int idx) {
return new NBTCompound(obj.getCompound(idx));
}
public String toString() {
return obj.toString();
}
}
public static class OurBitStorage implements GenericBitStorage {
private final SimpleBitStorage bs;