This commit is contained in:
坏黑
2018-04-26 23:33:44 +08:00
parent 381d96c5b1
commit 93e84b1b80
40 changed files with 444 additions and 278 deletions

View File

@@ -24,11 +24,13 @@ public class NBTContainer extends NBTCompound{
}
}
protected Object getCompound() {
@Override
protected Object getCompound() {
return nbt;
}
protected void setCompound(Object tag) {
@Override
protected void setCompound(Object tag) {
nbt = tag;
}

View File

@@ -11,11 +11,13 @@ public class NBTEntity extends NBTCompound {
ent = entity;
}
protected Object getCompound() {
@Override
protected Object getCompound() {
return NBTReflectionUtil.getEntityNBTTagCompound(NBTReflectionUtil.getNMSEntity(ent));
}
protected void setCompound(Object compound) {
@Override
protected void setCompound(Object compound) {
NBTReflectionUtil.setEntityNBTTag(compound, NBTReflectionUtil.getNMSEntity(ent));
}

View File

@@ -35,11 +35,13 @@ public class NBTFile extends NBTCompound {
return file;
}
protected Object getCompound() {
@Override
protected Object getCompound() {
return nbt;
}
protected void setCompound(Object compound) {
@Override
protected void setCompound(Object compound) {
nbt = compound;
}

View File

@@ -11,11 +11,13 @@ public class NBTItem extends NBTCompound {
bukkitItem = item.clone();
}
protected Object getCompound() {
@Override
protected Object getCompound() {
return NBTReflectionUtil.getItemRootNBTTagCompound(NBTReflectionUtil.getNMSItemStack(bukkitItem));
}
protected void setCompound(Object compound) {
@Override
protected void setCompound(Object compound) {
bukkitItem = NBTReflectionUtil.getBukkitItemStack(NBTReflectionUtil.setNBTTag(compound, NBTReflectionUtil.getNMSItemStack(bukkitItem)));
}

View File

@@ -11,11 +11,13 @@ public class NBTTileEntity extends NBTCompound {
this.tile = tile;
}
protected Object getCompound() {
@Override
protected Object getCompound() {
return NBTReflectionUtil.getTileEntityNBTTagCompound(tile);
}
protected void setCompound(Object compound) {
@Override
protected void setCompound(Object compound) {
NBTReflectionUtil.setTileEntityNBTTagCompound(tile, compound);
}