Add NBT toString()
This commit is contained in:
parent
8dbf972238
commit
3af5ac05e2
9 changed files with 55 additions and 1 deletions
|
|
@ -89,6 +89,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final NBTTagList obj;
|
private final NBTTagList obj;
|
||||||
|
|
@ -107,6 +110,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final DataBits bs;
|
private final DataBits bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final NBTTagList obj;
|
private final NBTTagList obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final DataBits bs;
|
private final DataBits bs;
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,10 @@ public class NBT {
|
||||||
@Override
|
@Override
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final NBTTagList obj;
|
private final NBTTagList obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.a(idx));
|
return new NBTCompound(obj.a(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final SimpleBitStorage bs;
|
private final SimpleBitStorage bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final ListTag obj;
|
private final ListTag obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final PackedIntegerArray bs;
|
private final PackedIntegerArray bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final NbtList obj;
|
private final NbtList obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final PackedIntegerArray bs;
|
private final PackedIntegerArray bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final NbtList obj;
|
private final NbtList obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final PackedIntegerArray bs;
|
private final PackedIntegerArray bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final ListNBT obj;
|
private final ListNBT obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final BitArray bs;
|
private final BitArray bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final ListTag obj;
|
private final ListTag obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final BitStorage bs;
|
private final BitStorage bs;
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ public class NBT {
|
||||||
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
public GenericBitStorage makeBitStorage(int bits, int count, long[] data) {
|
||||||
return new OurBitStorage(bits, count, data);
|
return new OurBitStorage(bits, count, data);
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class NBTList implements GenericNBTList {
|
public static class NBTList implements GenericNBTList {
|
||||||
private final ListTag obj;
|
private final ListTag obj;
|
||||||
|
|
@ -106,6 +109,9 @@ public class NBT {
|
||||||
public GenericNBTCompound getCompound(int idx) {
|
public GenericNBTCompound getCompound(int idx) {
|
||||||
return new NBTCompound(obj.getCompound(idx));
|
return new NBTCompound(obj.getCompound(idx));
|
||||||
}
|
}
|
||||||
|
public String toString() {
|
||||||
|
return obj.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static class OurBitStorage implements GenericBitStorage {
|
public static class OurBitStorage implements GenericBitStorage {
|
||||||
private final SimpleBitStorage bs;
|
private final SimpleBitStorage bs;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue