change nbt format: fix visibility
This commit is contained in:
parent
dda5ac3573
commit
4433d3b3df
19 changed files with 37 additions and 37 deletions
|
@ -47,7 +47,7 @@ public abstract class NBTBase {
|
||||||
abstract void write(DataOutput output) throws IOException;
|
abstract void write(DataOutput output) throws IOException;
|
||||||
abstract void read(DataInput input, int depth, SizeTracker tracker) throws IOException;
|
abstract void read(DataInput input, int depth, SizeTracker tracker) throws IOException;
|
||||||
public abstract String toString();
|
public abstract String toString();
|
||||||
public abstract byte getId();
|
protected abstract byte getId();
|
||||||
public abstract NBTBase copy();
|
public abstract NBTBase copy();
|
||||||
|
|
||||||
public boolean equals(Object other) {
|
public boolean equals(Object other) {
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagByte extends NBTBase
|
||||||
this.data = input.readByte();
|
this.data = input.readByte();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)1;
|
return (byte)1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagByteArray extends NBTBase {
|
||||||
input.readFully(this.data);
|
input.readFully(this.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return (byte)7;
|
return (byte)7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class NBTTagCompound extends NBTBase {
|
||||||
return this.tags.keySet();
|
return this.tags.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return (byte)10;
|
return (byte)10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagDouble extends NBTBase
|
||||||
this.data = input.readDouble();
|
this.data = input.readDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)6;
|
return (byte)6;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package common.nbt;
|
package common.nbt;
|
||||||
|
|
||||||
public class NBTTagDoubleList extends NBTTagList<NBTTagDouble> {
|
public class NBTTagDoubleList extends NBTTagList<NBTTagDouble> {
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return 14;
|
return 14;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getType() {
|
protected byte getType() {
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagList<NBTTagDouble> createInstance() {
|
protected NBTTagList<NBTTagDouble> createInstance() {
|
||||||
return new NBTTagDoubleList();
|
return new NBTTagDoubleList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagDouble getDefault() {
|
protected NBTTagDouble getDefault() {
|
||||||
return new NBTTagDouble(0.0);
|
return new NBTTagDouble(0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ class NBTTagEnd extends NBTBase {
|
||||||
void write(DataOutput output) throws IOException {
|
void write(DataOutput output) throws IOException {
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return (byte)0;
|
return (byte)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagFloat extends NBTBase
|
||||||
this.data = input.readFloat();
|
this.data = input.readFloat();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)5;
|
return (byte)5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package common.nbt;
|
package common.nbt;
|
||||||
|
|
||||||
public class NBTTagFloatList extends NBTTagList<NBTTagFloat> {
|
public class NBTTagFloatList extends NBTTagList<NBTTagFloat> {
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return 13;
|
return 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getType() {
|
protected byte getType() {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagList<NBTTagFloat> createInstance() {
|
protected NBTTagList<NBTTagFloat> createInstance() {
|
||||||
return new NBTTagFloatList();
|
return new NBTTagFloatList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagFloat getDefault() {
|
protected NBTTagFloat getDefault() {
|
||||||
return new NBTTagFloat(0.0f);
|
return new NBTTagFloat(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagInt extends NBTBase
|
||||||
this.data = input.readInt();
|
this.data = input.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)3;
|
return (byte)3;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class NBTTagIntArray extends NBTBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return (byte)11;
|
return (byte)11;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package common.nbt;
|
package common.nbt;
|
||||||
|
|
||||||
public class NBTTagIntArrayList extends NBTTagList<NBTTagIntArray> {
|
public class NBTTagIntArrayList extends NBTTagList<NBTTagIntArray> {
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return 15;
|
return 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getType() {
|
protected byte getType() {
|
||||||
return 11;
|
return 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagList<NBTTagIntArray> createInstance() {
|
protected NBTTagList<NBTTagIntArray> createInstance() {
|
||||||
return new NBTTagIntArrayList();
|
return new NBTTagIntArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagIntArray getDefault() {
|
protected NBTTagIntArray getDefault() {
|
||||||
return new NBTTagIntArray(new int[0]);
|
return new NBTTagIntArray(new int[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@ abstract class NBTTagList<K extends NBTBase> extends NBTBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract byte getId();
|
protected abstract byte getId();
|
||||||
public abstract byte getType();
|
protected abstract byte getType();
|
||||||
public abstract NBTTagList<K> createInstance();
|
protected abstract NBTTagList<K> createInstance();
|
||||||
public abstract K getDefault();
|
protected abstract K getDefault();
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder sb = new StringBuilder("[");
|
StringBuilder sb = new StringBuilder("[");
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagLong extends NBTBase
|
||||||
this.data = input.readLong();
|
this.data = input.readLong();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)4;
|
return (byte)4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ class NBTTagShort extends NBTBase
|
||||||
this.data = input.readShort();
|
this.data = input.readShort();
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId()
|
protected byte getId()
|
||||||
{
|
{
|
||||||
return (byte)2;
|
return (byte)2;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ class NBTTagString extends NBTBase {
|
||||||
tracker.read(2 * this.data.length());
|
tracker.read(2 * this.data.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return (byte)8;
|
return (byte)8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package common.nbt;
|
package common.nbt;
|
||||||
|
|
||||||
public class NBTTagStringList extends NBTTagList<NBTTagString> {
|
public class NBTTagStringList extends NBTTagList<NBTTagString> {
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return 9;
|
return 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getType() {
|
protected byte getType() {
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagList<NBTTagString> createInstance() {
|
protected NBTTagList<NBTTagString> createInstance() {
|
||||||
return new NBTTagStringList();
|
return new NBTTagStringList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagString getDefault() {
|
protected NBTTagString getDefault() {
|
||||||
return new NBTTagString("");
|
return new NBTTagString("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
package common.nbt;
|
package common.nbt;
|
||||||
|
|
||||||
public class NBTTagTagList extends NBTTagList<NBTTagCompound> {
|
public class NBTTagTagList extends NBTTagList<NBTTagCompound> {
|
||||||
public byte getId() {
|
protected byte getId() {
|
||||||
return 12;
|
return 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte getType() {
|
protected byte getType() {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagList<NBTTagCompound> createInstance() {
|
protected NBTTagList<NBTTagCompound> createInstance() {
|
||||||
return new NBTTagTagList();
|
return new NBTTagTagList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NBTTagCompound getDefault() {
|
protected NBTTagCompound getDefault() {
|
||||||
return new NBTTagCompound();
|
return new NBTTagCompound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,7 +209,7 @@ public abstract class MapGenStructure extends MapGenBase
|
||||||
{
|
{
|
||||||
NBTBase nbtbase = tag.get(s);
|
NBTBase nbtbase = tag.get(s);
|
||||||
|
|
||||||
if (nbtbase.getId() == 10)
|
if (nbtbase instanceof NBTTagCompound)
|
||||||
{
|
{
|
||||||
NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbtbase;
|
NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbtbase;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue