change nbt format: fix visibility

This commit is contained in:
Sen 2025-05-27 21:38:31 +02:00
parent dda5ac3573
commit 4433d3b3df
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
19 changed files with 37 additions and 37 deletions

View file

@ -47,7 +47,7 @@ public abstract class NBTBase {
abstract void write(DataOutput output) throws IOException;
abstract void read(DataInput input, int depth, SizeTracker tracker) throws IOException;
public abstract String toString();
public abstract byte getId();
protected abstract byte getId();
public abstract NBTBase copy();
public boolean equals(Object other) {

View file

@ -28,7 +28,7 @@ class NBTTagByte extends NBTBase
this.data = input.readByte();
}
public byte getId()
protected byte getId()
{
return (byte)1;
}

View file

@ -28,7 +28,7 @@ class NBTTagByteArray extends NBTBase {
input.readFully(this.data);
}
public byte getId() {
protected byte getId() {
return (byte)7;
}

View file

@ -45,7 +45,7 @@ public class NBTTagCompound extends NBTBase {
return this.tags.keySet();
}
public byte getId() {
protected byte getId() {
return (byte)10;
}

View file

@ -28,7 +28,7 @@ class NBTTagDouble extends NBTBase
this.data = input.readDouble();
}
public byte getId()
protected byte getId()
{
return (byte)6;
}

View file

@ -1,19 +1,19 @@
package common.nbt;
public class NBTTagDoubleList extends NBTTagList<NBTTagDouble> {
public byte getId() {
protected byte getId() {
return 14;
}
public byte getType() {
protected byte getType() {
return 6;
}
public NBTTagList<NBTTagDouble> createInstance() {
protected NBTTagList<NBTTagDouble> createInstance() {
return new NBTTagDoubleList();
}
public NBTTagDouble getDefault() {
protected NBTTagDouble getDefault() {
return new NBTTagDouble(0.0);
}

View file

@ -12,7 +12,7 @@ class NBTTagEnd extends NBTBase {
void write(DataOutput output) throws IOException {
}
public byte getId() {
protected byte getId() {
return (byte)0;
}

View file

@ -28,7 +28,7 @@ class NBTTagFloat extends NBTBase
this.data = input.readFloat();
}
public byte getId()
protected byte getId()
{
return (byte)5;
}

View file

@ -1,19 +1,19 @@
package common.nbt;
public class NBTTagFloatList extends NBTTagList<NBTTagFloat> {
public byte getId() {
protected byte getId() {
return 13;
}
public byte getType() {
protected byte getType() {
return 5;
}
public NBTTagList<NBTTagFloat> createInstance() {
protected NBTTagList<NBTTagFloat> createInstance() {
return new NBTTagFloatList();
}
public NBTTagFloat getDefault() {
protected NBTTagFloat getDefault() {
return new NBTTagFloat(0.0f);
}

View file

@ -28,7 +28,7 @@ class NBTTagInt extends NBTBase
this.data = input.readInt();
}
public byte getId()
protected byte getId()
{
return (byte)3;
}

View file

@ -32,7 +32,7 @@ class NBTTagIntArray extends NBTBase {
}
}
public byte getId() {
protected byte getId() {
return (byte)11;
}

View file

@ -1,19 +1,19 @@
package common.nbt;
public class NBTTagIntArrayList extends NBTTagList<NBTTagIntArray> {
public byte getId() {
protected byte getId() {
return 15;
}
public byte getType() {
protected byte getType() {
return 11;
}
public NBTTagList<NBTTagIntArray> createInstance() {
protected NBTTagList<NBTTagIntArray> createInstance() {
return new NBTTagIntArrayList();
}
public NBTTagIntArray getDefault() {
protected NBTTagIntArray getDefault() {
return new NBTTagIntArray(new int[0]);
}

View file

@ -33,10 +33,10 @@ abstract class NBTTagList<K extends NBTBase> extends NBTBase {
}
}
public abstract byte getId();
public abstract byte getType();
public abstract NBTTagList<K> createInstance();
public abstract K getDefault();
protected abstract byte getId();
protected abstract byte getType();
protected abstract NBTTagList<K> createInstance();
protected abstract K getDefault();
public String toString() {
StringBuilder sb = new StringBuilder("[");

View file

@ -28,7 +28,7 @@ class NBTTagLong extends NBTBase
this.data = input.readLong();
}
public byte getId()
protected byte getId()
{
return (byte)4;
}

View file

@ -28,7 +28,7 @@ class NBTTagShort extends NBTBase
this.data = input.readShort();
}
public byte getId()
protected byte getId()
{
return (byte)2;
}

View file

@ -27,7 +27,7 @@ class NBTTagString extends NBTBase {
tracker.read(2 * this.data.length());
}
public byte getId() {
protected byte getId() {
return (byte)8;
}

View file

@ -1,19 +1,19 @@
package common.nbt;
public class NBTTagStringList extends NBTTagList<NBTTagString> {
public byte getId() {
protected byte getId() {
return 9;
}
public byte getType() {
protected byte getType() {
return 8;
}
public NBTTagList<NBTTagString> createInstance() {
protected NBTTagList<NBTTagString> createInstance() {
return new NBTTagStringList();
}
public NBTTagString getDefault() {
protected NBTTagString getDefault() {
return new NBTTagString("");
}

View file

@ -1,19 +1,19 @@
package common.nbt;
public class NBTTagTagList extends NBTTagList<NBTTagCompound> {
public byte getId() {
protected byte getId() {
return 12;
}
public byte getType() {
protected byte getType() {
return 10;
}
public NBTTagList<NBTTagCompound> createInstance() {
protected NBTTagList<NBTTagCompound> createInstance() {
return new NBTTagTagList();
}
public NBTTagCompound getDefault() {
protected NBTTagCompound getDefault() {
return new NBTTagCompound();
}