rename tag methods
This commit is contained in:
parent
c527989ada
commit
753b4b8b5d
57 changed files with 276 additions and 276 deletions
|
@ -96,7 +96,7 @@ import common.packet.SPacketSignEditorOpen;
|
||||||
import common.packet.SPacketPlayerListItem;
|
import common.packet.SPacketPlayerListItem;
|
||||||
import common.packet.SPacketPlayerAbilities;
|
import common.packet.SPacketPlayerAbilities;
|
||||||
import common.packet.SPacketTabComplete;
|
import common.packet.SPacketTabComplete;
|
||||||
import common.packet.SPacketUpdateEntityNBT;
|
import common.packet.SPacketUpdateEntityTags;
|
||||||
import common.packet.SPacketAnimation;
|
import common.packet.SPacketAnimation;
|
||||||
import common.packet.SPacketBiome;
|
import common.packet.SPacketBiome;
|
||||||
import common.packet.SPacketBlockAction;
|
import common.packet.SPacketBlockAction;
|
||||||
|
@ -1345,7 +1345,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
||||||
|
|
||||||
if (tileentity != null && packetIn.isTileEntityType(tileentity)) // i == 1 && tileentity instanceof TileEntityMobSpawner || /* i == 2 && tileentity instanceof TileEntityCommandBlock || */ i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || /* i == 5 && tileentity instanceof TileEntityFlowerPot || */ i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityMachine)
|
if (tileentity != null && packetIn.isTileEntityType(tileentity)) // i == 1 && tileentity instanceof TileEntityMobSpawner || /* i == 2 && tileentity instanceof TileEntityCommandBlock || */ i == 3 && tileentity instanceof TileEntityBeacon || i == 4 && tileentity instanceof TileEntitySkull || /* i == 5 && tileentity instanceof TileEntityFlowerPot || */ i == 6 && tileentity instanceof TileEntityBanner || i == 7 && tileentity instanceof TileEntityMachine)
|
||||||
{
|
{
|
||||||
tileentity.readFromNBT(packetIn.getNbtCompound());
|
tileentity.readTags(packetIn.getNbtCompound());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1714,7 +1714,7 @@ public class ClientPlayer extends NetHandler implements IClientPlayer
|
||||||
//// }
|
//// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public void handleEntityNBT(SPacketUpdateEntityNBT packetIn)
|
public void handleEntityNBT(SPacketUpdateEntityTags packetIn)
|
||||||
{
|
{
|
||||||
NetHandler.checkThread(packetIn, this, this.gameController, this.clientWorldController);
|
NetHandler.checkThread(packetIn, this, this.gameController, this.clientWorldController);
|
||||||
Entity entity = packetIn.getEntity(this.clientWorldController);
|
Entity entity = packetIn.getEntity(this.clientWorldController);
|
||||||
|
|
|
@ -206,7 +206,7 @@ public class EntityFirework
|
||||||
|
|
||||||
if (p_i46464_15_ != null)
|
if (p_i46464_15_ != null)
|
||||||
{
|
{
|
||||||
this.fireworkExplosions = p_i46464_15_.getTagList("Explosions");
|
this.fireworkExplosions = p_i46464_15_.getObjectList("Explosions");
|
||||||
|
|
||||||
if (this.fireworkExplosions.size() == 0)
|
if (this.fireworkExplosions.size() == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class Attributes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound.setTagList("Modifiers", nbttaglist);
|
nbttagcompound.setObjectList("Modifiers", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
|
@ -116,9 +116,9 @@ public class Attributes
|
||||||
{
|
{
|
||||||
instance.setBaseValue(compound.getDouble("Base"));
|
instance.setBaseValue(compound.getDouble("Base"));
|
||||||
|
|
||||||
if (compound.hasTagList("Modifiers"))
|
if (compound.hasObjectList("Modifiers"))
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist = compound.getTagList("Modifiers");
|
TagObjectList nbttaglist = compound.getObjectList("Modifiers");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class BlockBanner extends BlockContainer
|
||||||
{
|
{
|
||||||
ItemStack itemstack = new ItemStack(Items.banner, 1, ((TileEntityBanner)tileentity).getBaseColor());
|
ItemStack itemstack = new ItemStack(Items.banner, 1, ((TileEntityBanner)tileentity).getBaseColor());
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
tileentity.writeToNBT(nbttagcompound);
|
tileentity.writeTags(nbttagcompound);
|
||||||
nbttagcompound.remove("x");
|
nbttagcompound.remove("x");
|
||||||
nbttagcompound.remove("y");
|
nbttagcompound.remove("y");
|
||||||
nbttagcompound.remove("z");
|
nbttagcompound.remove("z");
|
||||||
|
|
|
@ -1006,8 +1006,8 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
this.hotBiomes = null;
|
this.hotBiomes = null;
|
||||||
}
|
}
|
||||||
this.ores.clear();
|
this.ores.clear();
|
||||||
if(tag.hasTagList("Ores")) {
|
if(tag.hasObjectList("Ores")) {
|
||||||
TagObjectList list = tag.getTagList("Ores");
|
TagObjectList list = tag.getObjectList("Ores");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject gen = list.get(z);
|
TagObject gen = list.get(z);
|
||||||
this.ores.add(new Ore(BlockRegistry.getFromIdName(gen.getString("Block"), Blocks.iron_ore.getState()),
|
this.ores.add(new Ore(BlockRegistry.getFromIdName(gen.getString("Block"), Blocks.iron_ore.getState()),
|
||||||
|
@ -1016,8 +1016,8 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.lakes.clear();
|
this.lakes.clear();
|
||||||
if(tag.hasTagList("Lakes")) {
|
if(tag.hasObjectList("Lakes")) {
|
||||||
TagObjectList list = tag.getTagList("Lakes");
|
TagObjectList list = tag.getObjectList("Lakes");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject gen = list.get(z);
|
TagObject gen = list.get(z);
|
||||||
this.lakes.add(new Lake(
|
this.lakes.add(new Lake(
|
||||||
|
@ -1028,8 +1028,8 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.liquids.clear();
|
this.liquids.clear();
|
||||||
if(tag.hasTagList("Liquids")) {
|
if(tag.hasObjectList("Liquids")) {
|
||||||
TagObjectList list = tag.getTagList("Liquids");
|
TagObjectList list = tag.getObjectList("Liquids");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject gen = list.get(z);
|
TagObject gen = list.get(z);
|
||||||
this.liquids.add(new Liquid(
|
this.liquids.add(new Liquid(
|
||||||
|
@ -1067,8 +1067,8 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
if(tag.hasInt("StarColor")) {
|
if(tag.hasInt("StarColor")) {
|
||||||
this.setStarColor(tag.getInt("StarColor"));
|
this.setStarColor(tag.getInt("StarColor"));
|
||||||
}
|
}
|
||||||
else if(tag.hasTag("StarColorFnc")) {
|
else if(tag.hasObject("StarColorFnc")) {
|
||||||
TagObject fnc = tag.getTag("StarColorFnc");
|
TagObject fnc = tag.getObject("StarColorFnc");
|
||||||
this.setStarColorSin(fnc.getFloat("Period"), fnc.getFloat("Det"), fnc.getFloat("Dist"),
|
this.setStarColorSin(fnc.getFloat("Period"), fnc.getFloat("Det"), fnc.getFloat("Dist"),
|
||||||
fnc.getInt("Color"), fnc.getByte("DetChn"), fnc.getByte("DistChn"));
|
fnc.getInt("Color"), fnc.getByte("DetChn"), fnc.getByte("DistChn"));
|
||||||
}
|
}
|
||||||
|
@ -1078,8 +1078,8 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
if(tag.hasInt("DStarColor")) {
|
if(tag.hasInt("DStarColor")) {
|
||||||
this.setDeepStarColor(tag.getInt("DStarColor"));
|
this.setDeepStarColor(tag.getInt("DStarColor"));
|
||||||
}
|
}
|
||||||
else if(tag.hasTag("DStarColorFnc")) {
|
else if(tag.hasObject("DStarColorFnc")) {
|
||||||
TagObject fnc = tag.getTag("DStarColorFnc");
|
TagObject fnc = tag.getObject("DStarColorFnc");
|
||||||
this.setDeepStarColorSin(fnc.getFloat("Period"), fnc.getFloat("Det"), fnc.getFloat("Dist"),
|
this.setDeepStarColorSin(fnc.getFloat("Period"), fnc.getFloat("Det"), fnc.getFloat("Dist"),
|
||||||
fnc.getInt("Color"), fnc.getByte("DetChn"), fnc.getByte("DistChn"));
|
fnc.getInt("Color"), fnc.getByte("DetChn"), fnc.getByte("DistChn"));
|
||||||
}
|
}
|
||||||
|
@ -1212,7 +1212,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
ore.setInt("MaxS", gen.max);
|
ore.setInt("MaxS", gen.max);
|
||||||
list.add(ore);
|
list.add(ore);
|
||||||
}
|
}
|
||||||
tag.setTagList("Ores", list);
|
tag.setObjectList("Ores", list);
|
||||||
}
|
}
|
||||||
if(!this.lakes.isEmpty()) {
|
if(!this.lakes.isEmpty()) {
|
||||||
TagObjectList list = new TagObjectList();
|
TagObjectList list = new TagObjectList();
|
||||||
|
@ -1229,7 +1229,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
lake.setInt("Max", gen.maxHeight);
|
lake.setInt("Max", gen.maxHeight);
|
||||||
list.add(lake);
|
list.add(lake);
|
||||||
}
|
}
|
||||||
tag.setTagList("Lakes", list);
|
tag.setObjectList("Lakes", list);
|
||||||
}
|
}
|
||||||
if(!this.liquids.isEmpty()) {
|
if(!this.liquids.isEmpty()) {
|
||||||
TagObjectList list = new TagObjectList();
|
TagObjectList list = new TagObjectList();
|
||||||
|
@ -1242,7 +1242,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
liquid.setInt("Max", gen.maxHeight);
|
liquid.setInt("Max", gen.maxHeight);
|
||||||
list.add(liquid);
|
list.add(liquid);
|
||||||
}
|
}
|
||||||
tag.setTagList("Liquids", list);
|
tag.setObjectList("Liquids", list);
|
||||||
}
|
}
|
||||||
if(!this.populated)
|
if(!this.populated)
|
||||||
tag.setBool("NoPopulation", true);
|
tag.setBool("NoPopulation", true);
|
||||||
|
@ -1284,7 +1284,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
fnc.setInt("Color", ((SinusColorGen)this.starColorFunc).color);
|
fnc.setInt("Color", ((SinusColorGen)this.starColorFunc).color);
|
||||||
fnc.setByte("DetChn", (byte)((SinusColorGen)this.starColorFunc).detChn);
|
fnc.setByte("DetChn", (byte)((SinusColorGen)this.starColorFunc).detChn);
|
||||||
fnc.setByte("DistChn", (byte)((SinusColorGen)this.starColorFunc).distChn);
|
fnc.setByte("DistChn", (byte)((SinusColorGen)this.starColorFunc).distChn);
|
||||||
tag.setTag("StarColorFnc", fnc);
|
tag.setObject("StarColorFnc", fnc);
|
||||||
}
|
}
|
||||||
if(this.deepstarColorFunc instanceof SingleColorGen) {
|
if(this.deepstarColorFunc instanceof SingleColorGen) {
|
||||||
tag.setInt("DStarColor", ((SingleColorGen)this.deepstarColorFunc).color);
|
tag.setInt("DStarColor", ((SingleColorGen)this.deepstarColorFunc).color);
|
||||||
|
@ -1297,7 +1297,7 @@ public abstract class Dimension extends Nameable implements Comparable<Dimension
|
||||||
fnc.setInt("Color", ((SinusColorGen)this.deepstarColorFunc).color);
|
fnc.setInt("Color", ((SinusColorGen)this.deepstarColorFunc).color);
|
||||||
fnc.setByte("DetChn", (byte)((SinusColorGen)this.deepstarColorFunc).detChn);
|
fnc.setByte("DetChn", (byte)((SinusColorGen)this.deepstarColorFunc).detChn);
|
||||||
fnc.setByte("DistChn", (byte)((SinusColorGen)this.deepstarColorFunc).distChn);
|
fnc.setByte("DistChn", (byte)((SinusColorGen)this.deepstarColorFunc).distChn);
|
||||||
tag.setTag("DStarColorFnc", fnc);
|
tag.setObject("DStarColorFnc", fnc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tag;
|
return tag;
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ public abstract class Entity
|
||||||
|
|
||||||
if (this.vehicle.writeMountToNBT(nbttagcompound))
|
if (this.vehicle.writeMountToNBT(nbttagcompound))
|
||||||
{
|
{
|
||||||
tagCompund.setTag("Riding", nbttagcompound);
|
tagCompund.setObject("Riding", nbttagcompound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ import common.packet.SPacketEntityAttach;
|
||||||
import common.packet.SPacketEntityMetadata;
|
import common.packet.SPacketEntityMetadata;
|
||||||
import common.packet.SPacketEntityEffect;
|
import common.packet.SPacketEntityEffect;
|
||||||
import common.packet.SPacketEntityProperties;
|
import common.packet.SPacketEntityProperties;
|
||||||
import common.packet.SPacketUpdateEntityNBT;
|
import common.packet.SPacketUpdateEntityTags;
|
||||||
import common.packet.SPacketEntityEquipment;
|
import common.packet.SPacketEntityEquipment;
|
||||||
import common.packet.SPacketEntityVelocity;
|
import common.packet.SPacketEntityVelocity;
|
||||||
import common.packet.SPacketSpawnMob;
|
import common.packet.SPacketSpawnMob;
|
||||||
|
@ -299,7 +299,7 @@ public class EntityTrackerEntry {
|
||||||
TagObject nbttagcompound = this.trackedEntity.getNBTTagCompound();
|
TagObject nbttagcompound = this.trackedEntity.getNBTTagCompound();
|
||||||
|
|
||||||
if(nbttagcompound != null) {
|
if(nbttagcompound != null) {
|
||||||
playerMP.connection.sendPacket(new SPacketUpdateEntityNBT(this.trackedEntity.getId(), nbttagcompound));
|
playerMP.connection.sendPacket(new SPacketUpdateEntityTags(this.trackedEntity.getId(), nbttagcompound));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.trackedEntity instanceof EntityLiving) {
|
if(this.trackedEntity instanceof EntityLiving) {
|
||||||
|
|
|
@ -1417,17 +1417,17 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("Items", nbttaglist);
|
tagCompound.setObjectList("Items", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.horseChest.getStackInSlot(1) != null)
|
if (this.horseChest.getStackInSlot(1) != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("ArmorItem", this.horseChest.getStackInSlot(1).writeToNBT(new TagObject()));
|
tagCompound.setObject("ArmorItem", this.horseChest.getStackInSlot(1).writeToNBT(new TagObject()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.horseChest.getStackInSlot(0) != null)
|
if (this.horseChest.getStackInSlot(0) != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("SaddleItem", this.horseChest.getStackInSlot(0).writeToNBT(new TagObject()));
|
tagCompound.setObject("SaddleItem", this.horseChest.getStackInSlot(0).writeToNBT(new TagObject()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1466,7 +1466,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||||
|
|
||||||
if (this.isChested())
|
if (this.isChested())
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist = tagCompund.getTagList("Items");
|
TagObjectList nbttaglist = tagCompund.getObjectList("Items");
|
||||||
this.initHorseChest();
|
this.initHorseChest();
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
|
@ -1481,9 +1481,9 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagCompund.hasTag("ArmorItem"))
|
if (tagCompund.hasObject("ArmorItem"))
|
||||||
{
|
{
|
||||||
ItemStack itemstack = ItemStack.loadItemStackFromNBT(tagCompund.getTag("ArmorItem"));
|
ItemStack itemstack = ItemStack.loadItemStackFromNBT(tagCompund.getObject("ArmorItem"));
|
||||||
|
|
||||||
if (itemstack != null && isArmorItem(itemstack.getItem()))
|
if (itemstack != null && isArmorItem(itemstack.getItem()))
|
||||||
{
|
{
|
||||||
|
@ -1491,9 +1491,9 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagCompund.hasTag("SaddleItem"))
|
if (tagCompund.hasObject("SaddleItem"))
|
||||||
{
|
{
|
||||||
ItemStack itemstack1 = ItemStack.loadItemStackFromNBT(tagCompund.getTag("SaddleItem"));
|
ItemStack itemstack1 = ItemStack.loadItemStackFromNBT(tagCompund.getObject("SaddleItem"));
|
||||||
|
|
||||||
if (itemstack1 != null && itemstack1.getItem() == Items.saddle)
|
if (itemstack1 != null && itemstack1.getItem() == Items.saddle)
|
||||||
{
|
{
|
||||||
|
|
|
@ -203,7 +203,7 @@ public abstract class EntityCartContainer extends EntityCart implements ILockabl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("Items", nbttaglist);
|
tagCompound.setObjectList("Items", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,7 +212,7 @@ public abstract class EntityCartContainer extends EntityCart implements ILockabl
|
||||||
protected void readEntityFromNBT(TagObject tagCompund)
|
protected void readEntityFromNBT(TagObject tagCompund)
|
||||||
{
|
{
|
||||||
super.readEntityFromNBT(tagCompund);
|
super.readEntityFromNBT(tagCompund);
|
||||||
TagObjectList nbttaglist = tagCompund.getTagList("Items");
|
TagObjectList nbttaglist = tagCompund.getObjectList("Items");
|
||||||
this.minecartContainerItems = new ItemStack[this.getSizeInventory()];
|
this.minecartContainerItems = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
|
|
|
@ -149,7 +149,7 @@ public class EntityFalling extends Entity implements IObjectData
|
||||||
if (tileentity != null)
|
if (tileentity != null)
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
tileentity.writeToNBT(nbttagcompound);
|
tileentity.writeTags(nbttagcompound);
|
||||||
|
|
||||||
for (String s : this.tileEntityData.getKeySet())
|
for (String s : this.tileEntityData.getKeySet())
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ public class EntityFalling extends Entity implements IObjectData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tileentity.readFromNBT(nbttagcompound);
|
tileentity.readTags(nbttagcompound);
|
||||||
tileentity.markDirty();
|
tileentity.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -242,7 +242,7 @@ public class EntityFalling extends Entity implements IObjectData
|
||||||
|
|
||||||
if (this.tileEntityData != null)
|
if (this.tileEntityData != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("TileEntityData", this.tileEntityData);
|
tagCompound.setObject("TileEntityData", this.tileEntityData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,9 +271,9 @@ public class EntityFalling extends Entity implements IObjectData
|
||||||
|
|
||||||
this.shouldDropItem = tagCompund.getBool("DropItem");
|
this.shouldDropItem = tagCompund.getBool("DropItem");
|
||||||
|
|
||||||
if (tagCompund.hasTag("TileEntityData"))
|
if (tagCompund.hasObject("TileEntityData"))
|
||||||
{
|
{
|
||||||
this.tileEntityData = tagCompund.getTag("TileEntityData");
|
this.tileEntityData = tagCompund.getObject("TileEntityData");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block == null || block == Blocks.air)
|
if (block == null || block == Blocks.air)
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class EntityFireworks extends Entity
|
||||||
{
|
{
|
||||||
this.dataWatcher.updateObject(8, givenItem);
|
this.dataWatcher.updateObject(8, givenItem);
|
||||||
TagObject nbttagcompound = givenItem.getTagCompound();
|
TagObject nbttagcompound = givenItem.getTagCompound();
|
||||||
TagObject nbttagcompound1 = nbttagcompound.getTag("Fireworks");
|
TagObject nbttagcompound1 = nbttagcompound.getObject("Fireworks");
|
||||||
|
|
||||||
if (nbttagcompound1 != null)
|
if (nbttagcompound1 != null)
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ public class EntityFireworks extends Entity
|
||||||
|
|
||||||
if (itemstack != null && itemstack.hasTagCompound())
|
if (itemstack != null && itemstack.hasTagCompound())
|
||||||
{
|
{
|
||||||
nbttagcompound = itemstack.getTagCompound().getTag("Fireworks");
|
nbttagcompound = itemstack.getTagCompound().getObject("Fireworks");
|
||||||
}
|
}
|
||||||
|
|
||||||
((AWorldClient)this.worldObj).makeFireworks(this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ, nbttagcompound);
|
((AWorldClient)this.worldObj).makeFireworks(this.posX, this.posY, this.posZ, this.motionX, this.motionY, this.motionZ, nbttagcompound);
|
||||||
|
@ -177,7 +177,7 @@ public class EntityFireworks extends Entity
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
itemstack.writeToNBT(nbttagcompound);
|
itemstack.writeToNBT(nbttagcompound);
|
||||||
tagCompound.setTag("FireworksItem", nbttagcompound);
|
tagCompound.setObject("FireworksItem", nbttagcompound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ public class EntityFireworks extends Entity
|
||||||
{
|
{
|
||||||
this.fireworkAge = tagCompund.getInt("Life");
|
this.fireworkAge = tagCompund.getInt("Life");
|
||||||
this.lifetime = tagCompund.getInt("LifeTime");
|
this.lifetime = tagCompund.getInt("LifeTime");
|
||||||
TagObject nbttagcompound = tagCompund.getTag("FireworksItem");
|
TagObject nbttagcompound = tagCompund.getObject("FireworksItem");
|
||||||
|
|
||||||
if (nbttagcompound != null)
|
if (nbttagcompound != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -360,7 +360,7 @@ public class EntityItem extends Entity
|
||||||
|
|
||||||
if (this.getEntityItem() != null)
|
if (this.getEntityItem() != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("Item", this.getEntityItem().writeToNBT(new TagObject()));
|
tagCompound.setObject("Item", this.getEntityItem().writeToNBT(new TagObject()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,7 +384,7 @@ public class EntityItem extends Entity
|
||||||
// this.thrower = tagCompund.getString("Thrower");
|
// this.thrower = tagCompund.getString("Thrower");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
TagObject nbttagcompound = tagCompund.getTag("Item");
|
TagObject nbttagcompound = tagCompund.getObject("Item");
|
||||||
this.setEntityItemStack(ItemStack.loadItemStackFromNBT(nbttagcompound));
|
this.setEntityItemStack(ItemStack.loadItemStackFromNBT(nbttagcompound));
|
||||||
|
|
||||||
if (this.getEntityItem() == null)
|
if (this.getEntityItem() == null)
|
||||||
|
|
|
@ -3389,8 +3389,8 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
// this.setCanPickUpLoot(tagCompund.getBoolean("CanPickUpLoot"));
|
// this.setCanPickUpLoot(tagCompund.getBoolean("CanPickUpLoot"));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if(tagCompund.hasTagList("Equipment")) {
|
if(tagCompund.hasObjectList("Equipment")) {
|
||||||
TagObjectList nbttaglist = tagCompund.getTagList("Equipment");
|
TagObjectList nbttaglist = tagCompund.getObjectList("Equipment");
|
||||||
|
|
||||||
for(int i = 0; i < this.equipment.length; ++i) {
|
for(int i = 0; i < this.equipment.length; ++i) {
|
||||||
this.equipment[i] = ItemStack.loadItemStackFromNBT(nbttaglist.get(i));
|
this.equipment[i] = ItemStack.loadItemStackFromNBT(nbttaglist.get(i));
|
||||||
|
@ -3423,7 +3423,7 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
this.setNpcClass(type);
|
this.setNpcClass(type);
|
||||||
this.setHeight(tagCompund.hasFloat("Height") ? tagCompund.getFloat("Height") : this.getBaseSize());
|
this.setHeight(tagCompund.hasFloat("Height") ? tagCompund.getFloat("Height") : this.getBaseSize());
|
||||||
|
|
||||||
TagObjectList nbttaglist = tagCompund.getTagList("Items");
|
TagObjectList nbttaglist = tagCompund.getObjectList("Items");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -3435,9 +3435,9 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tagCompund.hasTagList("Offers")) {
|
if(tagCompund.hasObjectList("Offers")) {
|
||||||
this.trades = new MerchantRecipeList();
|
this.trades = new MerchantRecipeList();
|
||||||
this.trades.fromNbt(tagCompund.getTagList("Offers"));
|
this.trades.fromNbt(tagCompund.getObjectList("Offers"));
|
||||||
}
|
}
|
||||||
this.healTimer = tagCompund.getInt("healTimer");
|
this.healTimer = tagCompund.getInt("healTimer");
|
||||||
if(tagCompund.hasByteArray("Skin"))
|
if(tagCompund.hasByteArray("Skin"))
|
||||||
|
@ -3448,7 +3448,7 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
|
|
||||||
if(this.isPlayer()) {
|
if(this.isPlayer()) {
|
||||||
// this.entityUniqueID = getOfflineUUID(this.user);
|
// this.entityUniqueID = getOfflineUUID(this.user);
|
||||||
TagObjectList nbttaglist0 = tagCompund.getTagList("Inventory");
|
TagObjectList nbttaglist0 = tagCompund.getObjectList("Inventory");
|
||||||
this.inventory.readFromNBT(nbttaglist0);
|
this.inventory.readFromNBT(nbttaglist0);
|
||||||
this.inventory.currentItem = tagCompund.getInt("SelectedItemSlot");
|
this.inventory.currentItem = tagCompund.getInt("SelectedItemSlot");
|
||||||
// this.sleeping = tagCompund.getBoolean("Sleeping");
|
// this.sleeping = tagCompund.getBoolean("Sleeping");
|
||||||
|
@ -3495,9 +3495,9 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
// this.allowFlyingPersist = tagCompund.getBoolean("alwaysFly");
|
// this.allowFlyingPersist = tagCompund.getBoolean("alwaysFly");
|
||||||
this.noclip = tagCompund.getBool("noClip");
|
this.noclip = tagCompund.getBool("noClip");
|
||||||
|
|
||||||
if (tagCompund.hasTagList("WarpItems"))
|
if (tagCompund.hasObjectList("WarpItems"))
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist1 = tagCompund.getTagList("WarpItems");
|
TagObjectList nbttaglist1 = tagCompund.getObjectList("WarpItems");
|
||||||
this.warpChest.loadInventoryFromNBT(nbttaglist1);
|
this.warpChest.loadInventoryFromNBT(nbttaglist1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3546,7 +3546,7 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
nbttaglist0.add(nbttagcompound);
|
nbttaglist0.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("Equipment", nbttaglist0);
|
tagCompound.setObjectList("Equipment", nbttaglist0);
|
||||||
// tagCompound.setString("Species", this.getSpecies());
|
// tagCompound.setString("Species", this.getSpecies());
|
||||||
tagCompound.setString("Char", this.getChar());
|
tagCompound.setString("Char", this.getChar());
|
||||||
tagCompound.setString("Cape", this.getCape());
|
tagCompound.setString("Cape", this.getCape());
|
||||||
|
@ -3571,9 +3571,9 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("Items", nbttaglist);
|
tagCompound.setObjectList("Items", nbttaglist);
|
||||||
if(this.trades != null)
|
if(this.trades != null)
|
||||||
tagCompound.setTagList("Offers", this.trades.toNbt());
|
tagCompound.setObjectList("Offers", this.trades.toNbt());
|
||||||
tagCompound.setInt("healTimer", this.healTimer);
|
tagCompound.setInt("healTimer", this.healTimer);
|
||||||
if(this.skin != null)
|
if(this.skin != null)
|
||||||
tagCompound.setByteArray("Skin", this.skin);
|
tagCompound.setByteArray("Skin", this.skin);
|
||||||
|
@ -3587,7 +3587,7 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
this.getAttributeMap().applyAttributeModifiers(itemstack.getAttributeModifiers(2), z, itemstack.stackSize);
|
this.getAttributeMap().applyAttributeModifiers(itemstack.getAttributeModifiers(2), z, itemstack.stackSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tagCompound.setTagList("Inventory", this.inventory.writeToNBT(new TagObjectList()));
|
tagCompound.setObjectList("Inventory", this.inventory.writeToNBT(new TagObjectList()));
|
||||||
tagCompound.setInt("SelectedItemSlot", this.inventory.currentItem);
|
tagCompound.setInt("SelectedItemSlot", this.inventory.currentItem);
|
||||||
// tagCompound.setBoolean("Sleeping", this.sleeping);
|
// tagCompound.setBoolean("Sleeping", this.sleeping);
|
||||||
// tagCompound.setShort("SleepTimer", (short)this.sleepTimer);
|
// tagCompound.setShort("SleepTimer", (short)this.sleepTimer);
|
||||||
|
@ -3624,12 +3624,12 @@ public abstract class EntityNPC extends EntityLiving
|
||||||
// tagCompound.setBoolean("alwaysFly", this.allowFlyingPersist);
|
// tagCompound.setBoolean("alwaysFly", this.allowFlyingPersist);
|
||||||
tagCompound.setBool("noClip", this.noclip);
|
tagCompound.setBool("noClip", this.noclip);
|
||||||
|
|
||||||
tagCompound.setTagList("WarpItems", this.warpChest.saveInventoryToNBT());
|
tagCompound.setObjectList("WarpItems", this.warpChest.saveInventoryToNBT());
|
||||||
ItemStack itemstack = this.inventory.getCurrentItem();
|
ItemStack itemstack = this.inventory.getCurrentItem();
|
||||||
|
|
||||||
if (itemstack != null && itemstack.getItem() != null)
|
if (itemstack != null && itemstack.getItem() != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("SelectedItem", itemstack.writeToNBT(new TagObject()));
|
tagCompound.setObject("SelectedItem", itemstack.writeToNBT(new TagObject()));
|
||||||
}
|
}
|
||||||
|
|
||||||
// tagCompound.setString("Model", this.getModel().name);
|
// tagCompound.setString("Model", this.getModel().name);
|
||||||
|
|
|
@ -162,9 +162,9 @@ public class EntityPotion extends EntityThrowable implements IObjectData
|
||||||
{
|
{
|
||||||
super.readEntityFromNBT(tagCompund);
|
super.readEntityFromNBT(tagCompund);
|
||||||
|
|
||||||
if (tagCompund.hasTag("Potion"))
|
if (tagCompund.hasObject("Potion"))
|
||||||
{
|
{
|
||||||
this.potionDamage = ItemStack.loadItemStackFromNBT(tagCompund.getTag("Potion"));
|
this.potionDamage = ItemStack.loadItemStackFromNBT(tagCompund.getObject("Potion"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ public class EntityPotion extends EntityThrowable implements IObjectData
|
||||||
|
|
||||||
if (this.potionDamage != null)
|
if (this.potionDamage != null)
|
||||||
{
|
{
|
||||||
tagCompound.setTag("Potion", this.potionDamage.writeToNBT(new TagObject()));
|
tagCompound.setObject("Potion", this.potionDamage.writeToNBT(new TagObject()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -557,7 +557,7 @@ public abstract class EntityLiving extends Entity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("Attributes", Attributes.writeBaseAttributeMapToNBT(this.getAttributeMap()));
|
tagCompound.setObjectList("Attributes", Attributes.writeBaseAttributeMapToNBT(this.getAttributeMap()));
|
||||||
|
|
||||||
for (ItemStack itemstack1 : this.getInventory())
|
for (ItemStack itemstack1 : this.getInventory())
|
||||||
{
|
{
|
||||||
|
@ -576,7 +576,7 @@ public abstract class EntityLiving extends Entity
|
||||||
nbttaglist.add(potioneffect.toNbt());
|
nbttaglist.add(potioneffect.toNbt());
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTagList("ActiveEffects", nbttaglist);
|
tagCompound.setObjectList("ActiveEffects", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setBool("Leashed", this.leashed);
|
tagCompound.setBool("Leashed", this.leashed);
|
||||||
|
@ -595,7 +595,7 @@ public abstract class EntityLiving extends Entity
|
||||||
nbttagcompound1.setInt("Z", blockpos.getZ());
|
nbttagcompound1.setInt("Z", blockpos.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
tagCompound.setTag("Leash", nbttagcompound1);
|
tagCompound.setObject("Leash", nbttagcompound1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(this.isAIDisabled()) {
|
// if(this.isAIDisabled()) {
|
||||||
|
@ -613,14 +613,14 @@ public abstract class EntityLiving extends Entity
|
||||||
{
|
{
|
||||||
this.setAbsorptionAmount(tagCompund.getInt("Absorption"));
|
this.setAbsorptionAmount(tagCompund.getInt("Absorption"));
|
||||||
|
|
||||||
if (tagCompund.hasTagList("Attributes") && this.worldObj != null && !this.worldObj.client)
|
if (tagCompund.hasObjectList("Attributes") && this.worldObj != null && !this.worldObj.client)
|
||||||
{
|
{
|
||||||
Attributes.setAttributeModifiers(this.getAttributeMap(), tagCompund.getTagList("Attributes"));
|
Attributes.setAttributeModifiers(this.getAttributeMap(), tagCompund.getObjectList("Attributes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tagCompund.hasTagList("ActiveEffects"))
|
if (tagCompund.hasObjectList("ActiveEffects"))
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist = tagCompund.getTagList("ActiveEffects");
|
TagObjectList nbttaglist = tagCompund.getObjectList("ActiveEffects");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -664,8 +664,8 @@ public abstract class EntityLiving extends Entity
|
||||||
if(!(this.isPlayer())) {
|
if(!(this.isPlayer())) {
|
||||||
this.leashed = tagCompund.getBool("Leashed");
|
this.leashed = tagCompund.getBool("Leashed");
|
||||||
|
|
||||||
if(this.leashed && tagCompund.hasTag("Leash")) {
|
if(this.leashed && tagCompund.hasObject("Leash")) {
|
||||||
this.leashTag = tagCompund.getTag("Leash");
|
this.leashTag = tagCompund.getObject("Leash");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -619,14 +619,14 @@ public abstract class CraftingRegistry
|
||||||
TagObject nbttagcompound1 = itemstack.getSubCompound("BlockEntityTag", true);
|
TagObject nbttagcompound1 = itemstack.getSubCompound("BlockEntityTag", true);
|
||||||
TagObjectList nbttaglist = null;
|
TagObjectList nbttaglist = null;
|
||||||
|
|
||||||
if (nbttagcompound1.hasTagList("Patterns"))
|
if (nbttagcompound1.hasObjectList("Patterns"))
|
||||||
{
|
{
|
||||||
nbttaglist = nbttagcompound1.getTagList("Patterns");
|
nbttaglist = nbttagcompound1.getObjectList("Patterns");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nbttaglist = new TagObjectList();
|
nbttaglist = new TagObjectList();
|
||||||
nbttagcompound1.setTagList("Patterns", nbttaglist);
|
nbttagcompound1.setObjectList("Patterns", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
|
@ -977,15 +977,15 @@ public abstract class CraftingRegistry
|
||||||
{
|
{
|
||||||
ItemStack itemstack3 = inv.getStackInSlot(k2);
|
ItemStack itemstack3 = inv.getStackInSlot(k2);
|
||||||
|
|
||||||
if (itemstack3 != null && itemstack3.getItem() == Items.firework_charge && itemstack3.hasTagCompound() && itemstack3.getTagCompound().hasTag("Explosion"))
|
if (itemstack3 != null && itemstack3.getItem() == Items.firework_charge && itemstack3.hasTagCompound() && itemstack3.getTagCompound().hasObject("Explosion"))
|
||||||
{
|
{
|
||||||
nbttaglist.add(itemstack3.getTagCompound().getTag("Explosion"));
|
nbttaglist.add(itemstack3.getTagCompound().getObject("Explosion"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound3.setTagList("Explosions", nbttaglist);
|
nbttagcompound3.setObjectList("Explosions", nbttaglist);
|
||||||
nbttagcompound3.setByte("Flight", (byte)j);
|
nbttagcompound3.setByte("Flight", (byte)j);
|
||||||
nbttagcompound1.setTag("Fireworks", nbttagcompound3);
|
nbttagcompound1.setObject("Fireworks", nbttagcompound3);
|
||||||
this.field_92102_a.setTagCompound(nbttagcompound1);
|
this.field_92102_a.setTagCompound(nbttagcompound1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ public abstract class CraftingRegistry
|
||||||
|
|
||||||
nbttagcompound2.setIntArray("Colors", aint1);
|
nbttagcompound2.setIntArray("Colors", aint1);
|
||||||
nbttagcompound2.setByte("Type", b0);
|
nbttagcompound2.setByte("Type", b0);
|
||||||
nbttagcompound.setTag("Explosion", nbttagcompound2);
|
nbttagcompound.setObject("Explosion", nbttagcompound2);
|
||||||
this.field_92102_a.setTagCompound(nbttagcompound);
|
this.field_92102_a.setTagCompound(nbttagcompound);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1080,7 +1080,7 @@ public abstract class CraftingRegistry
|
||||||
|
|
||||||
if (this.field_92102_a != null && this.field_92102_a.hasTagCompound())
|
if (this.field_92102_a != null && this.field_92102_a.hasTagCompound())
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound4 = this.field_92102_a.getTagCompound().getTag("Explosion");
|
TagObject nbttagcompound4 = this.field_92102_a.getTagCompound().getObject("Explosion");
|
||||||
|
|
||||||
if (nbttagcompound4 == null)
|
if (nbttagcompound4 == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,14 +93,14 @@ public abstract class UniverseRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadNbt(TagObject tag) {
|
public static void loadNbt(TagObject tag) {
|
||||||
TagObjectList list = tag.getTagList("Dimensions");
|
TagObjectList list = tag.getObjectList("Dimensions");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
Dimension dim = Dimension.getByNbt(list.get(z));
|
Dimension dim = Dimension.getByNbt(list.get(z));
|
||||||
if(!REGISTRY.containsKey(dim.getDimensionId()) && !ALIASES.containsKey(dim.getDimensionName()))
|
if(!REGISTRY.containsKey(dim.getDimensionId()) && !ALIASES.containsKey(dim.getDimensionName()))
|
||||||
register(dim);
|
register(dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
list = tag.getTagList("Names");
|
list = tag.getObjectList("Names");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject data = list.get(z);
|
TagObject data = list.get(z);
|
||||||
String id = data.getString("ID");
|
String id = data.getString("ID");
|
||||||
|
@ -111,7 +111,7 @@ public abstract class UniverseRegistry {
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
list = tag.getTagList("Sectors");
|
list = tag.getObjectList("Sectors");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject data = list.get(z);
|
TagObject data = list.get(z);
|
||||||
String id = data.getString("ID");
|
String id = data.getString("ID");
|
||||||
|
@ -121,7 +121,7 @@ public abstract class UniverseRegistry {
|
||||||
sector.readNbt(data);
|
sector.readNbt(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
list = tag.getTagList("Galaxies");
|
list = tag.getObjectList("Galaxies");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject data = list.get(z);
|
TagObject data = list.get(z);
|
||||||
String id = data.getString("ID");
|
String id = data.getString("ID");
|
||||||
|
@ -131,7 +131,7 @@ public abstract class UniverseRegistry {
|
||||||
galaxy.readNbt(data);
|
galaxy.readNbt(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
list = tag.getTagList("Domains");
|
list = tag.getObjectList("Domains");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject data = list.get(z);
|
TagObject data = list.get(z);
|
||||||
String id = data.getString("ID");
|
String id = data.getString("ID");
|
||||||
|
@ -141,7 +141,7 @@ public abstract class UniverseRegistry {
|
||||||
domain.readNbt(data);
|
domain.readNbt(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
list = tag.getTagList("Barycenters");
|
list = tag.getObjectList("Barycenters");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject link = list.get(z);
|
TagObject link = list.get(z);
|
||||||
if(!assign(link.getString("Celestial"), link.getString("Center")))
|
if(!assign(link.getString("Celestial"), link.getString("Center")))
|
||||||
|
@ -158,7 +158,7 @@ public abstract class UniverseRegistry {
|
||||||
list.add(dim.toNbt());
|
list.add(dim.toNbt());
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Dimensions", list);
|
tag.setObjectList("Dimensions", list);
|
||||||
|
|
||||||
list = new TagObjectList();
|
list = new TagObjectList();
|
||||||
for(Dimension dim : DIMENSIONS) {
|
for(Dimension dim : DIMENSIONS) {
|
||||||
|
@ -172,7 +172,7 @@ public abstract class UniverseRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Names", list);
|
tag.setObjectList("Names", list);
|
||||||
|
|
||||||
list = new TagObjectList();
|
list = new TagObjectList();
|
||||||
for(Sector sector : SECTORS.values()) {
|
for(Sector sector : SECTORS.values()) {
|
||||||
|
@ -184,7 +184,7 @@ public abstract class UniverseRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Sectors", list);
|
tag.setObjectList("Sectors", list);
|
||||||
|
|
||||||
list = new TagObjectList();
|
list = new TagObjectList();
|
||||||
for(Galaxy galaxy : GALAXIES.values()) {
|
for(Galaxy galaxy : GALAXIES.values()) {
|
||||||
|
@ -196,7 +196,7 @@ public abstract class UniverseRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Galaxies", list);
|
tag.setObjectList("Galaxies", list);
|
||||||
|
|
||||||
list = new TagObjectList();
|
list = new TagObjectList();
|
||||||
for(Domain domain : DOMAINS.values()) {
|
for(Domain domain : DOMAINS.values()) {
|
||||||
|
@ -208,7 +208,7 @@ public abstract class UniverseRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Domains", list);
|
tag.setObjectList("Domains", list);
|
||||||
|
|
||||||
list = new TagObjectList();
|
list = new TagObjectList();
|
||||||
for(Entry<Moon, Planet> entry : MOON_MAP.entrySet()) {
|
for(Entry<Moon, Planet> entry : MOON_MAP.entrySet()) {
|
||||||
|
@ -252,7 +252,7 @@ public abstract class UniverseRegistry {
|
||||||
list.add(link);
|
list.add(link);
|
||||||
}
|
}
|
||||||
if(!list.isEmpty())
|
if(!list.isEmpty())
|
||||||
tag.setTagList("Barycenters", list);
|
tag.setObjectList("Barycenters", list);
|
||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,9 +98,9 @@ public class ItemBanner extends ItemBlock
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
||||||
|
|
||||||
if (nbttagcompound != null && nbttagcompound.hasTagList("Patterns"))
|
if (nbttagcompound != null && nbttagcompound.hasObjectList("Patterns"))
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist = nbttagcompound.getTagList("Patterns");
|
TagObjectList nbttaglist = nbttagcompound.getObjectList("Patterns");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size() && i < 6; ++i)
|
for (int i = 0; i < nbttaglist.size() && i < 6; ++i)
|
||||||
{
|
{
|
||||||
|
@ -140,7 +140,7 @@ public class ItemBanner extends ItemBlock
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
TileEntityBanner.setBaseColorAndPatterns(nbttagcompound, enumdyecolor.getDyeDamage(), null);
|
TileEntityBanner.setBaseColorAndPatterns(nbttagcompound, enumdyecolor.getDyeDamage(), null);
|
||||||
TagObject nbttagcompound1 = new TagObject();
|
TagObject nbttagcompound1 = new TagObject();
|
||||||
nbttagcompound1.setTag("BlockEntityTag", nbttagcompound);
|
nbttagcompound1.setObject("BlockEntityTag", nbttagcompound);
|
||||||
ItemStack itemstack = new ItemStack(itemIn, 1, enumdyecolor.getDyeDamage());
|
ItemStack itemstack = new ItemStack(itemIn, 1, enumdyecolor.getDyeDamage());
|
||||||
itemstack.setTagCompound(nbttagcompound1);
|
itemstack.setTagCompound(nbttagcompound1);
|
||||||
subItems.add(itemstack);
|
subItems.add(itemstack);
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class ItemBlock extends Item
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
if (p_179224_3_.hasTagCompound() && p_179224_3_.getTagCompound().hasTag("BlockEntityTag"))
|
if (p_179224_3_.hasTagCompound() && p_179224_3_.getTagCompound().hasObject("BlockEntityTag"))
|
||||||
{
|
{
|
||||||
TileEntity tileentity = worldIn.getTileEntity(stack);
|
TileEntity tileentity = worldIn.getTileEntity(stack);
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class ItemBlock extends Item
|
||||||
|
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
TagObject nbttagcompound1 = (TagObject)nbttagcompound.copy();
|
TagObject nbttagcompound1 = (TagObject)nbttagcompound.copy();
|
||||||
tileentity.writeToNBT(nbttagcompound);
|
tileentity.writeTags(nbttagcompound);
|
||||||
TagObject nbttagcompound2 = (TagObject)p_179224_3_.getTagCompound().get("BlockEntityTag");
|
TagObject nbttagcompound2 = (TagObject)p_179224_3_.getTagCompound().get("BlockEntityTag");
|
||||||
nbttagcompound.merge(nbttagcompound2);
|
nbttagcompound.merge(nbttagcompound2);
|
||||||
nbttagcompound.setInt("x", stack.getX());
|
nbttagcompound.setInt("x", stack.getX());
|
||||||
|
@ -129,7 +129,7 @@ public class ItemBlock extends Item
|
||||||
|
|
||||||
if (!nbttagcompound.equals(nbttagcompound1))
|
if (!nbttagcompound.equals(nbttagcompound1))
|
||||||
{
|
{
|
||||||
tileentity.readFromNBT(nbttagcompound);
|
tileentity.readTags(nbttagcompound);
|
||||||
tileentity.markDirty();
|
tileentity.markDirty();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class ItemEnchantedBook extends Item
|
||||||
public TagObjectList getEnchantments(ItemStack stack)
|
public TagObjectList getEnchantments(ItemStack stack)
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getTagCompound();
|
TagObject nbttagcompound = stack.getTagCompound();
|
||||||
return nbttagcompound != null && nbttagcompound.hasTagList("StoredEnchantments") ? nbttagcompound.getTagList("StoredEnchantments") : new TagObjectList();
|
return nbttagcompound != null && nbttagcompound.hasObjectList("StoredEnchantments") ? nbttagcompound.getObjectList("StoredEnchantments") : new TagObjectList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -114,7 +114,7 @@ public class ItemEnchantedBook extends Item
|
||||||
stack.setTagCompound(new TagObject());
|
stack.setTagCompound(new TagObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.getTagCompound().setTagList("StoredEnchantments", nbttaglist);
|
stack.getTagCompound().setObjectList("StoredEnchantments", nbttaglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class ItemFirework extends Item
|
||||||
{
|
{
|
||||||
if (stack.hasTagCompound())
|
if (stack.hasTagCompound())
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getTagCompound().getTag("Fireworks");
|
TagObject nbttagcompound = stack.getTagCompound().getObject("Fireworks");
|
||||||
|
|
||||||
if (nbttagcompound != null)
|
if (nbttagcompound != null)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ public class ItemFirework extends Item
|
||||||
tooltip.add("Flugdauer: " + nbttagcompound.getByte("Flight"));
|
tooltip.add("Flugdauer: " + nbttagcompound.getByte("Flight"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObjectList nbttaglist = nbttagcompound.getTagList("Explosions");
|
TagObjectList nbttaglist = nbttagcompound.getObjectList("Explosions");
|
||||||
|
|
||||||
if (nbttaglist != null && nbttaglist.size() > 0)
|
if (nbttaglist != null && nbttaglist.size() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class ItemFireworkCharge extends Item
|
||||||
{
|
{
|
||||||
if (stack.hasTagCompound())
|
if (stack.hasTagCompound())
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getTagCompound().getTag("Explosion");
|
TagObject nbttagcompound = stack.getTagCompound().getObject("Explosion");
|
||||||
|
|
||||||
if (nbttagcompound != null)
|
if (nbttagcompound != null)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ public class ItemFireworkCharge extends Item
|
||||||
{
|
{
|
||||||
if (stack.hasTagCompound())
|
if (stack.hasTagCompound())
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getTagCompound().getTag("Explosion");
|
TagObject nbttagcompound = stack.getTagCompound().getObject("Explosion");
|
||||||
|
|
||||||
if (nbttagcompound != null)
|
if (nbttagcompound != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -203,7 +203,7 @@ public final class ItemStack
|
||||||
|
|
||||||
if (this.stackTagCompound != null)
|
if (this.stackTagCompound != null)
|
||||||
{
|
{
|
||||||
nbt.setTag("tag", this.stackTagCompound);
|
nbt.setObject("tag", this.stackTagCompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nbt;
|
return nbt;
|
||||||
|
@ -231,9 +231,9 @@ public final class ItemStack
|
||||||
this.itemDamage = 0;
|
this.itemDamage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbt.hasTag("tag"))
|
if (nbt.hasObject("tag"))
|
||||||
{
|
{
|
||||||
this.stackTagCompound = nbt.getTag("tag");
|
this.stackTagCompound = nbt.getObject("tag");
|
||||||
|
|
||||||
if (this.item != null)
|
if (this.item != null)
|
||||||
{
|
{
|
||||||
|
@ -581,9 +581,9 @@ public final class ItemStack
|
||||||
*/
|
*/
|
||||||
public TagObject getSubCompound(String key, boolean create)
|
public TagObject getSubCompound(String key, boolean create)
|
||||||
{
|
{
|
||||||
if (this.stackTagCompound != null && this.stackTagCompound.hasTag(key))
|
if (this.stackTagCompound != null && this.stackTagCompound.hasObject(key))
|
||||||
{
|
{
|
||||||
return this.stackTagCompound.getTag(key);
|
return this.stackTagCompound.getObject(key);
|
||||||
}
|
}
|
||||||
else if (create)
|
else if (create)
|
||||||
{
|
{
|
||||||
|
@ -599,7 +599,7 @@ public final class ItemStack
|
||||||
|
|
||||||
public TagObjectList getEnchantmentTagList()
|
public TagObjectList getEnchantmentTagList()
|
||||||
{
|
{
|
||||||
return this.stackTagCompound == null ? null : this.stackTagCompound.getTagList("ench");
|
return this.stackTagCompound == null ? null : this.stackTagCompound.getObjectList("ench");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1036,12 +1036,12 @@ public final class ItemStack
|
||||||
this.setTagCompound(new TagObject());
|
this.setTagCompound(new TagObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.stackTagCompound.hasTagList("ench"))
|
if (!this.stackTagCompound.hasObjectList("ench"))
|
||||||
{
|
{
|
||||||
this.stackTagCompound.setTagList("ench", new TagObjectList());
|
this.stackTagCompound.setObjectList("ench", new TagObjectList());
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObjectList nbttaglist = this.stackTagCompound.getTagList("ench");
|
TagObjectList nbttaglist = this.stackTagCompound.getObjectList("ench");
|
||||||
TagObject nbttagcompound = new TagObject();
|
TagObject nbttagcompound = new TagObject();
|
||||||
nbttagcompound.setShort("id", (short)ench.effectId);
|
nbttagcompound.setShort("id", (short)ench.effectId);
|
||||||
nbttagcompound.setShort("lvl", (short)(/* (byte) */ level));
|
nbttagcompound.setShort("lvl", (short)(/* (byte) */ level));
|
||||||
|
@ -1055,10 +1055,10 @@ public final class ItemStack
|
||||||
if(this.stackTagCompound == null) {
|
if(this.stackTagCompound == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!this.stackTagCompound.hasTagList("ench")) {
|
if(!this.stackTagCompound.hasObjectList("ench")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TagObjectList oldEnch = this.stackTagCompound.getTagList("ench");
|
TagObjectList oldEnch = this.stackTagCompound.getObjectList("ench");
|
||||||
TagObjectList newEnch = new TagObjectList();
|
TagObjectList newEnch = new TagObjectList();
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
TagObject tag;
|
TagObject tag;
|
||||||
|
@ -1081,7 +1081,7 @@ public final class ItemStack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.stackTagCompound.setTagList("ench", newEnch);
|
this.stackTagCompound.setObjectList("ench", newEnch);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1093,7 +1093,7 @@ public final class ItemStack
|
||||||
if(this.stackTagCompound == null) {
|
if(this.stackTagCompound == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!this.stackTagCompound.hasTagList("ench")) {
|
if(!this.stackTagCompound.hasObjectList("ench")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.stackTagCompound.remove("ench");
|
this.stackTagCompound.remove("ench");
|
||||||
|
@ -1108,7 +1108,7 @@ public final class ItemStack
|
||||||
*/
|
*/
|
||||||
public boolean isItemEnchanted()
|
public boolean isItemEnchanted()
|
||||||
{
|
{
|
||||||
return this.stackTagCompound != null && this.stackTagCompound.hasTagList("ench");
|
return this.stackTagCompound != null && this.stackTagCompound.hasObjectList("ench");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTagInfo(String key, Tag value)
|
public void setTagInfo(String key, Tag value)
|
||||||
|
|
|
@ -32,7 +32,7 @@ import common.packet.SPacketSignEditorOpen;
|
||||||
import common.packet.SPacketPlayerListItem;
|
import common.packet.SPacketPlayerListItem;
|
||||||
import common.packet.SPacketPlayerAbilities;
|
import common.packet.SPacketPlayerAbilities;
|
||||||
import common.packet.SPacketTabComplete;
|
import common.packet.SPacketTabComplete;
|
||||||
import common.packet.SPacketUpdateEntityNBT;
|
import common.packet.SPacketUpdateEntityTags;
|
||||||
import common.packet.SPacketAnimation;
|
import common.packet.SPacketAnimation;
|
||||||
import common.packet.SPacketBiome;
|
import common.packet.SPacketBiome;
|
||||||
import common.packet.SPacketBlockAction;
|
import common.packet.SPacketBlockAction;
|
||||||
|
@ -140,7 +140,7 @@ public interface IClientPlayer {
|
||||||
void handlePlayerAbilities(SPacketPlayerAbilities packet);
|
void handlePlayerAbilities(SPacketPlayerAbilities packet);
|
||||||
void handleTabComplete(SPacketTabComplete packet);
|
void handleTabComplete(SPacketTabComplete packet);
|
||||||
void handleSoundEffect(SPacketSoundEffect packet);
|
void handleSoundEffect(SPacketSoundEffect packet);
|
||||||
void handleEntityNBT(SPacketUpdateEntityNBT packet);
|
void handleEntityNBT(SPacketUpdateEntityTags packet);
|
||||||
void handleParticles(SPacketParticles packet);
|
void handleParticles(SPacketParticles packet);
|
||||||
void handleEntityProperties(SPacketEntityProperties packet);
|
void handleEntityProperties(SPacketEntityProperties packet);
|
||||||
void handleSkin(SPacketSkin packet);
|
void handleSkin(SPacketSkin packet);
|
||||||
|
|
|
@ -58,7 +58,7 @@ import common.packet.SPacketSignEditorOpen;
|
||||||
import common.packet.SPacketPlayerListItem;
|
import common.packet.SPacketPlayerListItem;
|
||||||
import common.packet.SPacketPlayerAbilities;
|
import common.packet.SPacketPlayerAbilities;
|
||||||
import common.packet.SPacketTabComplete;
|
import common.packet.SPacketTabComplete;
|
||||||
import common.packet.SPacketUpdateEntityNBT;
|
import common.packet.SPacketUpdateEntityTags;
|
||||||
import common.packet.SPacketAnimation;
|
import common.packet.SPacketAnimation;
|
||||||
import common.packet.SPacketBiome;
|
import common.packet.SPacketBiome;
|
||||||
import common.packet.SPacketBlockAction;
|
import common.packet.SPacketBlockAction;
|
||||||
|
@ -166,7 +166,7 @@ public enum PacketRegistry {
|
||||||
this.server(SPacketWorld.class);
|
this.server(SPacketWorld.class);
|
||||||
this.server(SPacketCamera.class);
|
this.server(SPacketCamera.class);
|
||||||
this.server(SPacketBiome.class);
|
this.server(SPacketBiome.class);
|
||||||
this.server(SPacketUpdateEntityNBT.class);
|
this.server(SPacketUpdateEntityTags.class);
|
||||||
this.server(SPacketTrades.class);
|
this.server(SPacketTrades.class);
|
||||||
this.server(SPacketDimensionName.class);
|
this.server(SPacketDimensionName.class);
|
||||||
this.server(SPacketCharacterList.class);
|
this.server(SPacketCharacterList.class);
|
||||||
|
|
|
@ -9,16 +9,16 @@ import common.network.PacketBuffer;
|
||||||
import common.tags.TagObject;
|
import common.tags.TagObject;
|
||||||
import common.world.World;
|
import common.world.World;
|
||||||
|
|
||||||
public class SPacketUpdateEntityNBT implements Packet<IClientPlayer>
|
public class SPacketUpdateEntityTags implements Packet<IClientPlayer>
|
||||||
{
|
{
|
||||||
private int entityId;
|
private int entityId;
|
||||||
private TagObject tagCompound;
|
private TagObject tagCompound;
|
||||||
|
|
||||||
public SPacketUpdateEntityNBT()
|
public SPacketUpdateEntityTags()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public SPacketUpdateEntityNBT(int entityIdIn, TagObject tagCompoundIn)
|
public SPacketUpdateEntityTags(int entityIdIn, TagObject tagCompoundIn)
|
||||||
{
|
{
|
||||||
this.entityId = entityIdIn;
|
this.entityId = entityIdIn;
|
||||||
this.tagCompound = tagCompoundIn;
|
this.tagCompound = tagCompoundIn;
|
|
@ -24,7 +24,7 @@ public class SPacketUpdateTileEntity implements Packet<IClientPlayer>
|
||||||
{
|
{
|
||||||
this.blockPos = tile.getPos();
|
this.blockPos = tile.getPos();
|
||||||
this.type = TileRegistry.CLASS_TO_ID.get(tile.getClass());
|
this.type = TileRegistry.CLASS_TO_ID.get(tile.getClass());
|
||||||
tile.writeToNBT(this.nbt = new TagObject());
|
tile.writeTags(this.nbt = new TagObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class TagObject extends Tag {
|
||||||
this.tags.put(key, value);
|
this.tags.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTag(String key, TagObject value) {
|
public void setObject(String key, TagObject value) {
|
||||||
this.tags.put(key, value);
|
this.tags.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class TagObject extends Tag {
|
||||||
this.tags.put(key, value);
|
this.tags.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTagList(String key, TagObjectList value) {
|
public void setObjectList(String key, TagObjectList value) {
|
||||||
this.tags.put(key, value);
|
this.tags.put(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ public class TagObject extends Tag {
|
||||||
return this.has(key, 11);
|
return this.has(key, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasTag(String key) {
|
public boolean hasObject(String key) {
|
||||||
return this.has(key, 10);
|
return this.has(key, 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ public class TagObject extends Tag {
|
||||||
return this.has(key, 15);
|
return this.has(key, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasTagList(String key) {
|
public boolean hasObjectList(String key) {
|
||||||
return this.has(key, 12);
|
return this.has(key, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ public class TagObject extends Tag {
|
||||||
return !this.has(key, 11) ? new int[0] : ((TagIntArray)this.tags.get(key)).getIntArray();
|
return !this.has(key, 11) ? new int[0] : ((TagIntArray)this.tags.get(key)).getIntArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TagObject getTag(String key) {
|
public TagObject getObject(String key) {
|
||||||
return !this.has(key, 10) ? new TagObject() : (TagObject)this.tags.get(key);
|
return !this.has(key, 10) ? new TagObject() : (TagObject)this.tags.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ public class TagObject extends Tag {
|
||||||
return !this.has(key, 15) ? new TagIntArrayList() : (TagIntArrayList)this.tags.get(key);
|
return !this.has(key, 15) ? new TagIntArrayList() : (TagIntArrayList)this.tags.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TagObjectList getTagList(String key) {
|
public TagObjectList getObjectList(String key) {
|
||||||
return !this.has(key, 12) ? new TagObjectList() : (TagObjectList)this.tags.get(key);
|
return !this.has(key, 12) ? new TagObjectList() : (TagObjectList)this.tags.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ public class TagObject extends Tag {
|
||||||
Tag tag = other.tags.get(key);
|
Tag tag = other.tags.get(key);
|
||||||
if(tag.getId() == 10) {
|
if(tag.getId() == 10) {
|
||||||
if(this.has(key, 10)) {
|
if(this.has(key, 10)) {
|
||||||
TagObject comp = this.getTag(key);
|
TagObject comp = this.getObject(key);
|
||||||
comp.merge((TagObject)tag);
|
comp.merge((TagObject)tag);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -53,12 +53,12 @@ public abstract class TileEntity
|
||||||
return this.worldObj != null;
|
return this.worldObj != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
this.pos = new BlockPos(compound.getInt("x"), compound.getInt("y"), compound.getInt("z"));
|
this.pos = new BlockPos(compound.getInt("x"), compound.getInt("y"), compound.getInt("z"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
String s = (String)TileRegistry.CLASS_TO_NAME.get(this.getClass());
|
String s = (String)TileRegistry.CLASS_TO_NAME.get(this.getClass());
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public abstract class TileEntity
|
||||||
|
|
||||||
if (tileentity != null)
|
if (tileentity != null)
|
||||||
{
|
{
|
||||||
tileentity.readFromNBT(nbt);
|
tileentity.readTags(nbt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,13 +32,13 @@ public class TileEntityBanner extends TileEntity
|
||||||
{
|
{
|
||||||
this.patterns = null;
|
this.patterns = null;
|
||||||
|
|
||||||
if (stack.hasTagCompound() && stack.getTagCompound().hasTag("BlockEntityTag"))
|
if (stack.hasTagCompound() && stack.getTagCompound().hasObject("BlockEntityTag"))
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getTagCompound().getTag("BlockEntityTag");
|
TagObject nbttagcompound = stack.getTagCompound().getObject("BlockEntityTag");
|
||||||
|
|
||||||
if (nbttagcompound.hasTagList("Patterns"))
|
if (nbttagcompound.hasObjectList("Patterns"))
|
||||||
{
|
{
|
||||||
this.patterns = (TagObjectList)nbttagcompound.getTagList("Patterns").copy();
|
this.patterns = (TagObjectList)nbttagcompound.getObjectList("Patterns").copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbttagcompound.hasInt("Base"))
|
if (nbttagcompound.hasInt("Base"))
|
||||||
|
@ -61,9 +61,9 @@ public class TileEntityBanner extends TileEntity
|
||||||
this.field_175119_g = true;
|
this.field_175119_g = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
setBaseColorAndPatterns(compound, this.baseColor, this.patterns);
|
setBaseColorAndPatterns(compound, this.baseColor, this.patterns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,15 +73,15 @@ public class TileEntityBanner extends TileEntity
|
||||||
|
|
||||||
if (patternsIn != null)
|
if (patternsIn != null)
|
||||||
{
|
{
|
||||||
compound.setTagList("Patterns", patternsIn);
|
compound.setObjectList("Patterns", patternsIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.baseColor = compound.getInt("Base");
|
this.baseColor = compound.getInt("Base");
|
||||||
this.patterns = compound.getTagList("Patterns");
|
this.patterns = compound.getObjectList("Patterns");
|
||||||
this.patternList = null;
|
this.patternList = null;
|
||||||
this.colorList = null;
|
this.colorList = null;
|
||||||
this.patternResourceLocation = null;
|
this.patternResourceLocation = null;
|
||||||
|
@ -114,7 +114,7 @@ public class TileEntityBanner extends TileEntity
|
||||||
public static int getPatterns(ItemStack stack)
|
public static int getPatterns(ItemStack stack)
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
||||||
return nbttagcompound != null && nbttagcompound.hasTagList("Patterns") ? nbttagcompound.getTagList("Patterns").size() : 0;
|
return nbttagcompound != null && nbttagcompound.hasObjectList("Patterns") ? nbttagcompound.getObjectList("Patterns").size() : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<TileEntityBanner.EnumBannerPattern> getPatternList()
|
public List<TileEntityBanner.EnumBannerPattern> getPatternList()
|
||||||
|
@ -191,9 +191,9 @@ public class TileEntityBanner extends TileEntity
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
TagObject nbttagcompound = stack.getSubCompound("BlockEntityTag", false);
|
||||||
|
|
||||||
if (nbttagcompound != null && nbttagcompound.hasTagList("Patterns"))
|
if (nbttagcompound != null && nbttagcompound.hasObjectList("Patterns"))
|
||||||
{
|
{
|
||||||
TagObjectList nbttaglist = nbttagcompound.getTagList("Patterns");
|
TagObjectList nbttaglist = nbttagcompound.getObjectList("Patterns");
|
||||||
|
|
||||||
if (nbttaglist.size() > 0)
|
if (nbttaglist.size() > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -301,9 +301,9 @@ public class TileEntityBeacon extends TileEntity implements ITickable
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.primaryEffect = compound.hasString("Primary") ? this.getEffect(compound.getString("Primary")) : null;
|
this.primaryEffect = compound.hasString("Primary") ? this.getEffect(compound.getString("Primary")) : null;
|
||||||
this.secondaryEffect = compound.hasString("Secondary") ? this.getEffect(compound.getString("Secondary")) : null;
|
this.secondaryEffect = compound.hasString("Secondary") ? this.getEffect(compound.getString("Secondary")) : null;
|
||||||
this.levels = compound.getInt("Levels");
|
this.levels = compound.getInt("Levels");
|
||||||
|
@ -315,9 +315,9 @@ public class TileEntityBeacon extends TileEntity implements ITickable
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
if(this.primaryEffect != null)
|
if(this.primaryEffect != null)
|
||||||
compound.setString("Primary", this.primaryEffect.getName());
|
compound.setString("Primary", this.primaryEffect.getName());
|
||||||
if(this.secondaryEffect != null)
|
if(this.secondaryEffect != null)
|
||||||
|
|
|
@ -227,10 +227,10 @@ public class TileEntityBrewingStand extends TileEntityLockable implements ITicka
|
||||||
return stack == null ? meta : (stack.getItem().isPotionIngredient(stack) ? PotionHelper.applyIngredient(meta, stack.getItem().getPotionEffect(stack)) : meta);
|
return stack == null ? meta : (stack.getItem().isPotionIngredient(stack) ? PotionHelper.applyIngredient(meta, stack.getItem().getPotionEffect(stack)) : meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.brewingItemStacks = new ItemStack[this.getSizeInventory()];
|
this.brewingItemStacks = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
|
@ -252,9 +252,9 @@ public class TileEntityBrewingStand extends TileEntityLockable implements ITicka
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setShort("BrewTime", (short)this.brewTime);
|
compound.setShort("BrewTime", (short)this.brewTime);
|
||||||
TagObjectList nbttaglist = new TagObjectList();
|
TagObjectList nbttaglist = new TagObjectList();
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ public class TileEntityBrewingStand extends TileEntityLockable implements ITicka
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
{
|
{
|
||||||
|
|
|
@ -161,10 +161,10 @@ public class TileEntityChest extends TileEntityLockable implements ITickable, II
|
||||||
this.customName = name;
|
this.customName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.chestContents = new ItemStack[this.getSizeInventory()];
|
this.chestContents = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
if (compound.hasString("CustomName"))
|
if (compound.hasString("CustomName"))
|
||||||
|
@ -184,9 +184,9 @@ public class TileEntityChest extends TileEntityLockable implements ITickable, II
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
TagObjectList nbttaglist = new TagObjectList();
|
TagObjectList nbttaglist = new TagObjectList();
|
||||||
|
|
||||||
for (int i = 0; i < this.chestContents.length; ++i)
|
for (int i = 0; i < this.chestContents.length; ++i)
|
||||||
|
@ -200,7 +200,7 @@ public class TileEntityChest extends TileEntityLockable implements ITickable, II
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,15 +6,15 @@ public class TileEntityComparator extends TileEntity
|
||||||
{
|
{
|
||||||
private int outputSignal;
|
private int outputSignal;
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setInt("OutputSignal", this.outputSignal);
|
compound.setInt("OutputSignal", this.outputSignal);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.outputSignal = compound.getInt("OutputSignal");
|
this.outputSignal = compound.getInt("OutputSignal");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,10 +152,10 @@ public class TileEntityDispenser extends TileEntityLockable implements IInventor
|
||||||
return this.customName != null;
|
return this.customName != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.stacks = new ItemStack[this.getSizeInventory()];
|
this.stacks = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
|
@ -175,9 +175,9 @@ public class TileEntityDispenser extends TileEntityLockable implements IInventor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
TagObjectList nbttaglist = new TagObjectList();
|
TagObjectList nbttaglist = new TagObjectList();
|
||||||
|
|
||||||
for (int i = 0; i < this.stacks.length; ++i)
|
for (int i = 0; i < this.stacks.length; ++i)
|
||||||
|
@ -191,7 +191,7 @@ public class TileEntityDispenser extends TileEntityLockable implements IInventor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,9 +23,9 @@ public class TileEntityEnchantmentTable extends TileEntity implements ITickable,
|
||||||
private static Random rand = new Random();
|
private static Random rand = new Random();
|
||||||
private String customName;
|
private String customName;
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
{
|
{
|
||||||
|
@ -33,9 +33,9 @@ public class TileEntityEnchantmentTable extends TileEntity implements ITickable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
|
|
||||||
if (compound.hasString("CustomName"))
|
if (compound.hasString("CustomName"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -156,10 +156,10 @@ public class TileEntityFurnace extends TileEntityLockable implements ITickable,
|
||||||
this.furnaceCustomName = p_145951_1_;
|
this.furnaceCustomName = p_145951_1_;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];
|
this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
|
@ -184,9 +184,9 @@ public class TileEntityFurnace extends TileEntityLockable implements ITickable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setShort("BurnTime", (short)this.furnaceBurnTime);
|
compound.setShort("BurnTime", (short)this.furnaceBurnTime);
|
||||||
compound.setShort("CookTime", (short)this.cookTime);
|
compound.setShort("CookTime", (short)this.cookTime);
|
||||||
compound.setShort("CookTimeTotal", (short)this.totalCookTime);
|
compound.setShort("CookTimeTotal", (short)this.totalCookTime);
|
||||||
|
@ -203,7 +203,7 @@ public class TileEntityFurnace extends TileEntityLockable implements ITickable,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,10 +30,10 @@ public class TileEntityHopper extends TileEntityLockable implements IHopper, ITi
|
||||||
private String customName;
|
private String customName;
|
||||||
private int transferCooldown = -1;
|
private int transferCooldown = -1;
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.inventory = new ItemStack[this.getSizeInventory()];
|
this.inventory = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
if (compound.hasString("CustomName"))
|
if (compound.hasString("CustomName"))
|
||||||
|
@ -55,9 +55,9 @@ public class TileEntityHopper extends TileEntityLockable implements IHopper, ITi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
TagObjectList nbttaglist = new TagObjectList();
|
TagObjectList nbttaglist = new TagObjectList();
|
||||||
|
|
||||||
for (int i = 0; i < this.inventory.length; ++i)
|
for (int i = 0; i < this.inventory.length; ++i)
|
||||||
|
@ -71,7 +71,7 @@ public class TileEntityHopper extends TileEntityLockable implements IHopper, ITi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
compound.setInt("TransferCooldown", this.transferCooldown);
|
compound.setInt("TransferCooldown", this.transferCooldown);
|
||||||
|
|
||||||
if (this.hasCustomName())
|
if (this.hasCustomName())
|
||||||
|
|
|
@ -6,15 +6,15 @@ public abstract class TileEntityLockable extends TileEntity implements IInteract
|
||||||
{
|
{
|
||||||
private LockCode code = LockCode.EMPTY_CODE;
|
private LockCode code = LockCode.EMPTY_CODE;
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.code = LockCode.fromNBT(compound);
|
this.code = LockCode.fromNBT(compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
|
|
||||||
if (this.code != null)
|
if (this.code != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,10 +79,10 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound) {
|
public void readTags(TagObject compound) {
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
|
|
||||||
TagObjectList nbttaglist = compound.getTagList("Items");
|
TagObjectList nbttaglist = compound.getObjectList("Items");
|
||||||
this.clear();
|
this.clear();
|
||||||
for(int i = 0; i < nbttaglist.size(); ++i) {
|
for(int i = 0; i < nbttaglist.size(); ++i) {
|
||||||
TagObject nbttagcompound = nbttaglist.get(i);
|
TagObject nbttagcompound = nbttaglist.get(i);
|
||||||
|
@ -93,7 +93,7 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttaglist = compound.getTagList("Resources");
|
nbttaglist = compound.getObjectList("Resources");
|
||||||
for(MachineResource res : this.resources) {
|
for(MachineResource res : this.resources) {
|
||||||
res.reset();
|
res.reset();
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
|
||||||
this.status = Status.values()[(int)compound.getByte("Status") % Status.values().length];
|
this.status = Status.values()[(int)compound.getByte("Status") % Status.values().length];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound) {
|
public void writeTags(TagObject compound) {
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
|
|
||||||
TagObjectList nbttaglist = new TagObjectList();
|
TagObjectList nbttaglist = new TagObjectList();
|
||||||
for(int i = 0; i < this.inventory.length; ++i) {
|
for(int i = 0; i < this.inventory.length; ++i) {
|
||||||
|
@ -118,7 +118,7 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
|
||||||
nbttaglist.add(nbttagcompound);
|
nbttaglist.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compound.setTagList("Items", nbttaglist);
|
compound.setObjectList("Items", nbttaglist);
|
||||||
|
|
||||||
nbttaglist = new TagObjectList();
|
nbttaglist = new TagObjectList();
|
||||||
for(int z = 0; z < this.resources.length; z++) {
|
for(int z = 0; z < this.resources.length; z++) {
|
||||||
|
@ -126,7 +126,7 @@ public abstract class TileEntityMachine extends TileEntityLockable implements IH
|
||||||
this.resources[z].writeToNbt(res);
|
this.resources[z].writeToNbt(res);
|
||||||
nbttaglist.add(res);
|
nbttaglist.add(res);
|
||||||
}
|
}
|
||||||
compound.setTagList("Resources", nbttaglist);
|
compound.setObjectList("Resources", nbttaglist);
|
||||||
|
|
||||||
// compound.setBoolean("Creative", this.isCreative);
|
// compound.setBoolean("Creative", this.isCreative);
|
||||||
compound.setInt("Temperature", this.temperature);
|
compound.setInt("Temperature", this.temperature);
|
||||||
|
|
|
@ -162,9 +162,9 @@ public class TileEntityMobSpawner extends TileEntity implements ITickable
|
||||||
this.worldObj.addBlockEvent(TileEntityMobSpawner.this.pos, Blocks.mob_spawner, 1, 0);
|
this.worldObj.addBlockEvent(TileEntityMobSpawner.this.pos, Blocks.mob_spawner, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject nbt)
|
public void readTags(TagObject nbt)
|
||||||
{
|
{
|
||||||
super.readFromNBT(nbt);
|
super.readTags(nbt);
|
||||||
this.mobID = nbt.getString("EntityId");
|
this.mobID = nbt.getString("EntityId");
|
||||||
this.spawnDelay = nbt.getShort("Delay");
|
this.spawnDelay = nbt.getShort("Delay");
|
||||||
|
|
||||||
|
@ -192,9 +192,9 @@ public class TileEntityMobSpawner extends TileEntity implements ITickable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject nbt)
|
public void writeTags(TagObject nbt)
|
||||||
{
|
{
|
||||||
super.writeToNBT(nbt);
|
super.writeTags(nbt);
|
||||||
String s = this.mobID;
|
String s = this.mobID;
|
||||||
|
|
||||||
if (s != null && !s.isEmpty())
|
if (s != null && !s.isEmpty())
|
||||||
|
|
|
@ -14,15 +14,15 @@ public class TileEntityNote extends TileEntity
|
||||||
/** stores the latest redstone state */
|
/** stores the latest redstone state */
|
||||||
public boolean previousRedstoneState;
|
public boolean previousRedstoneState;
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setByte("note", this.note);
|
compound.setByte("note", this.note);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.note = compound.getByte("note");
|
this.note = compound.getByte("note");
|
||||||
this.note = (byte)ExtMath.clampi(this.note, 0, 24);
|
this.note = (byte)ExtMath.clampi(this.note, 0, 24);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,18 +198,18 @@ public class TileEntityPiston extends TileEntity implements ITickable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.pistonState = BlockRegistry.getBlockById(compound.getInt("blockId")).getStateFromMeta(compound.getInt("blockData"));
|
this.pistonState = BlockRegistry.getBlockById(compound.getInt("blockId")).getStateFromMeta(compound.getInt("blockData"));
|
||||||
this.pistonFacing = Facing.getFront(compound.getInt("facing"));
|
this.pistonFacing = Facing.getFront(compound.getInt("facing"));
|
||||||
this.lastProgress = this.progress = compound.getFloat("progress");
|
this.lastProgress = this.progress = compound.getFloat("progress");
|
||||||
this.extending = compound.getBool("extending");
|
this.extending = compound.getBool("extending");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setInt("blockId", BlockRegistry.getIdFromBlock(this.pistonState.getBlock()));
|
compound.setInt("blockId", BlockRegistry.getIdFromBlock(this.pistonState.getBlock()));
|
||||||
compound.setInt("blockData", this.pistonState.getBlock().getMetaFromState(this.pistonState));
|
compound.setInt("blockData", this.pistonState.getBlock().getMetaFromState(this.pistonState));
|
||||||
compound.setInt("facing", this.pistonFacing.getIndex());
|
compound.setInt("facing", this.pistonFacing.getIndex());
|
||||||
|
|
|
@ -19,8 +19,8 @@ public class TileEntitySign extends TileEntity {
|
||||||
private EntityNPC player;
|
private EntityNPC player;
|
||||||
// private boolean oldFormat;
|
// private boolean oldFormat;
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound) {
|
public void writeTags(TagObject compound) {
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
|
|
||||||
for(int i = 0; i < 4; ++i) {
|
for(int i = 0; i < 4; ++i) {
|
||||||
compound.setString("Text" + (i + 1), this.signText[i]);
|
compound.setString("Text" + (i + 1), this.signText[i]);
|
||||||
|
@ -30,9 +30,9 @@ public class TileEntitySign extends TileEntity {
|
||||||
// compound.setString("Command", this.command);
|
// compound.setString("Command", this.command);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound) {
|
public void readTags(TagObject compound) {
|
||||||
// this.isEditable = false;
|
// this.isEditable = false;
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
|
|
||||||
for(int i = 0; i < 4; ++i) {
|
for(int i = 0; i < 4; ++i) {
|
||||||
this.signText[i] = compound.getString("Text" + (i + 1));
|
this.signText[i] = compound.getString("Text" + (i + 1));
|
||||||
|
|
|
@ -9,17 +9,17 @@ public class TileEntitySkull extends TileEntity
|
||||||
private int skullRotation;
|
private int skullRotation;
|
||||||
// private String user = null;
|
// private String user = null;
|
||||||
|
|
||||||
public void writeToNBT(TagObject compound)
|
public void writeTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeTags(compound);
|
||||||
compound.setByte("Rot", (byte)(this.skullRotation & 255));
|
compound.setByte("Rot", (byte)(this.skullRotation & 255));
|
||||||
// if(this.user != null)
|
// if(this.user != null)
|
||||||
// compound.setString("Owner", this.user);
|
// compound.setString("Owner", this.user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readFromNBT(TagObject compound)
|
public void readTags(TagObject compound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(compound);
|
super.readTags(compound);
|
||||||
this.skullRotation = compound.getByte("Rot");
|
this.skullRotation = compound.getByte("Rot");
|
||||||
// if(compound.hasString("Owner"))
|
// if(compound.hasString("Owner"))
|
||||||
// this.user = compound.getString("Owner");
|
// this.user = compound.getString("Owner");
|
||||||
|
|
|
@ -10,9 +10,9 @@ public class MerchantRecipe {
|
||||||
private final ItemStack selling;
|
private final ItemStack selling;
|
||||||
|
|
||||||
public MerchantRecipe(TagObject tag) {
|
public MerchantRecipe(TagObject tag) {
|
||||||
this.buying = ItemStack.loadItemStackFromNBT(tag.getTag("buy"));
|
this.buying = ItemStack.loadItemStackFromNBT(tag.getObject("buy"));
|
||||||
this.selling = ItemStack.loadItemStackFromNBT(tag.getTag("sell"));
|
this.selling = ItemStack.loadItemStackFromNBT(tag.getObject("sell"));
|
||||||
this.buySecond = tag.hasTag("buyB") ? ItemStack.loadItemStackFromNBT(tag.getTag("buyB")) : null;
|
this.buySecond = tag.hasObject("buyB") ? ItemStack.loadItemStackFromNBT(tag.getObject("buyB")) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MerchantRecipe(ItemStack buy1, ItemStack buy2, ItemStack sell) {
|
public MerchantRecipe(ItemStack buy1, ItemStack buy2, ItemStack sell) {
|
||||||
|
@ -47,10 +47,10 @@ public class MerchantRecipe {
|
||||||
|
|
||||||
public TagObject toNbt() {
|
public TagObject toNbt() {
|
||||||
TagObject tag = new TagObject();
|
TagObject tag = new TagObject();
|
||||||
tag.setTag("buy", this.buying.writeToNBT(new TagObject()));
|
tag.setObject("buy", this.buying.writeToNBT(new TagObject()));
|
||||||
tag.setTag("sell", this.selling.writeToNBT(new TagObject()));
|
tag.setObject("sell", this.selling.writeToNBT(new TagObject()));
|
||||||
if(this.buySecond != null)
|
if(this.buySecond != null)
|
||||||
tag.setTag("buyB", this.buySecond.writeToNBT(new TagObject()));
|
tag.setObject("buyB", this.buySecond.writeToNBT(new TagObject()));
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@ public class Village
|
||||||
// this.noBreedTicks = compound.getInteger("MTick");
|
// this.noBreedTicks = compound.getInteger("MTick");
|
||||||
this.center = new BlockPos(compound.getInt("CX"), compound.getInt("CY"), compound.getInt("CZ"));
|
this.center = new BlockPos(compound.getInt("CX"), compound.getInt("CY"), compound.getInt("CZ"));
|
||||||
this.doorRange = new BlockPos(compound.getInt("ACX"), compound.getInt("ACY"), compound.getInt("ACZ"));
|
this.doorRange = new BlockPos(compound.getInt("ACX"), compound.getInt("ACY"), compound.getInt("ACZ"));
|
||||||
TagObjectList nbttaglist = compound.getTagList("Doors");
|
TagObjectList nbttaglist = compound.getObjectList("Doors");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -255,6 +255,6 @@ public class Village
|
||||||
nbttaglist.add(nbttagcompound);
|
nbttaglist.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTagList("Doors", nbttaglist);
|
compound.setObjectList("Doors", nbttaglist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,8 +183,8 @@ public final class Server implements IThreadListener {
|
||||||
if(!value.noDef || !value.def.equals(value.getValue()))
|
if(!value.noDef || !value.def.equals(value.getValue()))
|
||||||
cfg.setString(cvar, value.getValue());
|
cfg.setString(cvar, value.getValue());
|
||||||
}
|
}
|
||||||
data.setTag("Config", cfg);
|
data.setObject("Config", cfg);
|
||||||
data.setTag("Universe", UniverseRegistry.saveNbt());
|
data.setObject("Universe", UniverseRegistry.saveNbt());
|
||||||
File nfile = new File("server.nbt.tmp");
|
File nfile = new File("server.nbt.tmp");
|
||||||
File lfile = new File("server.nbt");
|
File lfile = new File("server.nbt");
|
||||||
try {
|
try {
|
||||||
|
@ -207,11 +207,11 @@ public final class Server implements IThreadListener {
|
||||||
if(file.exists()) {
|
if(file.exists()) {
|
||||||
try {
|
try {
|
||||||
TagObject tag = TagLoader.readGZip(file);
|
TagObject tag = TagLoader.readGZip(file);
|
||||||
TagObject cfg = tag.getTag("Config");
|
TagObject cfg = tag.getObject("Config");
|
||||||
for(String key : cfg.getKeySet()) {
|
for(String key : cfg.getKeySet()) {
|
||||||
Config.set(key, cfg.getString(key), false);
|
Config.set(key, cfg.getString(key), false);
|
||||||
}
|
}
|
||||||
UniverseRegistry.loadNbt(tag.getTag("Universe"));
|
UniverseRegistry.loadNbt(tag.getObject("Universe"));
|
||||||
long lastPlayed = tag.getLong("LastAccess");
|
long lastPlayed = tag.getLong("LastAccess");
|
||||||
String version = tag.hasString("Version") ? tag.getString("Version") : null;
|
String version = tag.hasString("Version") ? tag.getString("Version") : null;
|
||||||
version = version != null && version.isEmpty() ? "<unbekannt>" : version;
|
version = version != null && version.isEmpty() ? "<unbekannt>" : version;
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class ClipboardBlock {
|
||||||
public ClipboardBlock(State data, TileEntity tile) {
|
public ClipboardBlock(State data, TileEntity tile) {
|
||||||
this(data);
|
this(data);
|
||||||
TagObject tag = new TagObject();
|
TagObject tag = new TagObject();
|
||||||
tile.writeToNBT(tag);
|
tile.writeTags(tag);
|
||||||
this.nbt = tag;
|
this.nbt = tag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class CommandBlock extends Command {
|
||||||
TileEntity tile = world.getTileEntity(position);
|
TileEntity tile = world.getTileEntity(position);
|
||||||
if(tile != null) {
|
if(tile != null) {
|
||||||
TagObject te = new TagObject();
|
TagObject te = new TagObject();
|
||||||
tile.writeToNBT(te);
|
tile.writeTags(te);
|
||||||
tag.setString("id", te.getString("id"));
|
tag.setString("id", te.getString("id"));
|
||||||
tag.setInt("x", position.getX());
|
tag.setInt("x", position.getX());
|
||||||
tag.setInt("y", position.getY());
|
tag.setInt("y", position.getY());
|
||||||
|
|
|
@ -622,7 +622,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
||||||
if(tag.hasString("password"))
|
if(tag.hasString("password"))
|
||||||
this.password = tag.getString("password");
|
this.password = tag.getString("password");
|
||||||
this.selected = tag.getInt("selected");
|
this.selected = tag.getInt("selected");
|
||||||
TagObjectList list = tag.getTagList("characters");
|
TagObjectList list = tag.getObjectList("characters");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
this.characters.add(list.get(z));
|
this.characters.add(list.get(z));
|
||||||
}
|
}
|
||||||
|
@ -653,7 +653,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
||||||
for(TagObject etag : this.characters) {
|
for(TagObject etag : this.characters) {
|
||||||
list.add(etag);
|
list.add(etag);
|
||||||
}
|
}
|
||||||
tag.setTagList("characters", list);
|
tag.setObjectList("characters", list);
|
||||||
}
|
}
|
||||||
// NBTTagCompound stats = new NBTTagCompound();
|
// NBTTagCompound stats = new NBTTagCompound();
|
||||||
// for(Entry<StatBase, Integer> entry : this.stats.entrySet()) {
|
// for(Entry<StatBase, Integer> entry : this.stats.entrySet()) {
|
||||||
|
@ -2988,14 +2988,14 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
||||||
// changed = true;
|
// changed = true;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (itemstack.hasTagCompound() && itemstack.getTagCompound().hasTag("BlockEntityTag"))
|
if (itemstack.hasTagCompound() && itemstack.getTagCompound().hasObject("BlockEntityTag"))
|
||||||
{
|
{
|
||||||
// if(!itemstack.getTagCompound().hasTag("BlockEntityTag")) {
|
// if(!itemstack.getTagCompound().hasTag("BlockEntityTag")) {
|
||||||
// changed = true;
|
// changed = true;
|
||||||
// itemstack.setTagCompound(null);
|
// itemstack.setTagCompound(null);
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
TagObject nbttagcompound = itemstack.getTagCompound().getTag("BlockEntityTag");
|
TagObject nbttagcompound = itemstack.getTagCompound().getObject("BlockEntityTag");
|
||||||
|
|
||||||
if (nbttagcompound.hasInt("x") && nbttagcompound.hasInt("y") && nbttagcompound.hasInt("z"))
|
if (nbttagcompound.hasInt("x") && nbttagcompound.hasInt("y") && nbttagcompound.hasInt("z"))
|
||||||
{
|
{
|
||||||
|
@ -3005,7 +3005,7 @@ public class Player extends NetHandler implements ICrafting, Executor, IPlayer
|
||||||
if (tileentity != null)
|
if (tileentity != null)
|
||||||
{
|
{
|
||||||
TagObject nbttagcompound1 = new TagObject();
|
TagObject nbttagcompound1 = new TagObject();
|
||||||
tileentity.writeToNBT(nbttagcompound1);
|
tileentity.writeTags(nbttagcompound1);
|
||||||
nbttagcompound1.remove("x");
|
nbttagcompound1.remove("x");
|
||||||
nbttagcompound1.remove("y");
|
nbttagcompound1.remove("y");
|
||||||
nbttagcompound1.remove("z");
|
nbttagcompound1.remove("z");
|
||||||
|
|
|
@ -26,7 +26,7 @@ public class VillageCollection
|
||||||
public VillageCollection(TagObject nbt) {
|
public VillageCollection(TagObject nbt) {
|
||||||
if(nbt != null) {
|
if(nbt != null) {
|
||||||
this.tickCounter = nbt.getInt("Tick");
|
this.tickCounter = nbt.getInt("Tick");
|
||||||
TagObjectList nbttaglist = nbt.getTagList("Villages");
|
TagObjectList nbttaglist = nbt.getObjectList("Villages");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ public class VillageCollection
|
||||||
nbttaglist.add(nbttagcompound);
|
nbttaglist.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
|
|
||||||
nbt.setTagList("Villages", nbttaglist);
|
nbt.setObjectList("Villages", nbttaglist);
|
||||||
this.dirty = false;
|
this.dirty = false;
|
||||||
return nbt;
|
return nbt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1068,7 +1068,7 @@ public abstract class Converter {
|
||||||
sections.add(section);
|
sections.add(section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ntag.setTagList("Sections", sections);
|
ntag.setObjectList("Sections", sections);
|
||||||
byte[] biomes = new byte[256];
|
byte[] biomes = new byte[256];
|
||||||
Arrays.fill(biomes, (byte)(Biome.DEF_BIOME.id & 255));
|
Arrays.fill(biomes, (byte)(Biome.DEF_BIOME.id & 255));
|
||||||
ntag.setByteArray("Biomes", biomes);
|
ntag.setByteArray("Biomes", biomes);
|
||||||
|
@ -1101,7 +1101,7 @@ public abstract class Converter {
|
||||||
entities.add(nent);
|
entities.add(nent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ntag.setTagList("Entities", entities);
|
ntag.setObjectList("Entities", entities);
|
||||||
|
|
||||||
ents = tag.getTagList("TileEntities");
|
ents = tag.getTagList("TileEntities");
|
||||||
entities = new TagObjectList();
|
entities = new TagObjectList();
|
||||||
|
@ -1117,7 +1117,7 @@ public abstract class Converter {
|
||||||
entities.add(nent);
|
entities.add(nent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ntag.setTagList("TileEntities", entities);
|
ntag.setObjectList("TileEntities", entities);
|
||||||
|
|
||||||
OldNbtTag[] sects = tag.getTagList("Sections");
|
OldNbtTag[] sects = tag.getTagList("Sections");
|
||||||
entities = new TagObjectList();
|
entities = new TagObjectList();
|
||||||
|
@ -1163,7 +1163,7 @@ public abstract class Converter {
|
||||||
nsect.setByteArray("Add", adddata.getData());
|
nsect.setByteArray("Add", adddata.getData());
|
||||||
entities.add(nsect);
|
entities.add(nsect);
|
||||||
}
|
}
|
||||||
ntag.setTagList("Sections", entities);
|
ntag.setObjectList("Sections", entities);
|
||||||
return ntag;
|
return ntag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,7 @@ public class Region {
|
||||||
// return null;
|
// return null;
|
||||||
// }
|
// }
|
||||||
// tag = tag.getCompoundTag("Level");
|
// tag = tag.getCompoundTag("Level");
|
||||||
if(!tag.hasTagList("Sections")) {
|
if(!tag.hasObjectList("Sections")) {
|
||||||
Log.IO.warn("Chunk-Datei bei " + x + "," + z + " hat keine Block-Daten, überspringe");
|
Log.IO.warn("Chunk-Datei bei " + x + "," + z + " hat keine Block-Daten, überspringe");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -375,7 +375,7 @@ public class Region {
|
||||||
chunk.setTerrainPopulated(tag.getBool("TerrainPopulated"));
|
chunk.setTerrainPopulated(tag.getBool("TerrainPopulated"));
|
||||||
chunk.setLightPopulated(tag.getBool("LightPopulated"));
|
chunk.setLightPopulated(tag.getBool("LightPopulated"));
|
||||||
chunk.setInhabited(tag.getLong("InhabitedTime"));
|
chunk.setInhabited(tag.getLong("InhabitedTime"));
|
||||||
TagObjectList sects = tag.getTagList("Sections");
|
TagObjectList sects = tag.getObjectList("Sections");
|
||||||
BlockArray[] sections = new BlockArray[sects.size()];
|
BlockArray[] sections = new BlockArray[sects.size()];
|
||||||
boolean light = !world.dimension.hasNoLight();
|
boolean light = !world.dimension.hasNoLight();
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ public class Region {
|
||||||
chunk.setBiomes(tag.getByteArray("Biomes"));
|
chunk.setBiomes(tag.getByteArray("Biomes"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObjectList entities = tag.getTagList("Entities");
|
TagObjectList entities = tag.getObjectList("Entities");
|
||||||
|
|
||||||
if(entities != null) {
|
if(entities != null) {
|
||||||
for(int n = 0; n < entities.size(); ++n) {
|
for(int n = 0; n < entities.size(); ++n) {
|
||||||
|
@ -425,8 +425,8 @@ public class Region {
|
||||||
chunk.addEntity(entity);
|
chunk.addEntity(entity);
|
||||||
Entity rider = entity;
|
Entity rider = entity;
|
||||||
|
|
||||||
for(TagObject ride = ent; ride.hasTag("Riding"); ride = ride.getTag("Riding")) {
|
for(TagObject ride = ent; ride.hasObject("Riding"); ride = ride.getObject("Riding")) {
|
||||||
Entity pass = EntityRegistry.createEntityFromNBT(ride.getTag("Riding"), world);
|
Entity pass = EntityRegistry.createEntityFromNBT(ride.getObject("Riding"), world);
|
||||||
|
|
||||||
if(pass != null) {
|
if(pass != null) {
|
||||||
chunk.addEntity(pass);
|
chunk.addEntity(pass);
|
||||||
|
@ -439,7 +439,7 @@ public class Region {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObjectList tiles = tag.getTagList("TileEntities");
|
TagObjectList tiles = tag.getObjectList("TileEntities");
|
||||||
|
|
||||||
if(tiles != null) {
|
if(tiles != null) {
|
||||||
for(int n = 0; n < tiles.size(); ++n) {
|
for(int n = 0; n < tiles.size(); ++n) {
|
||||||
|
@ -452,8 +452,8 @@ public class Region {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tag.hasTagList("TileTicks")) {
|
if(tag.hasObjectList("TileTicks")) {
|
||||||
TagObjectList ticks = tag.getTagList("TileTicks");
|
TagObjectList ticks = tag.getObjectList("TileTicks");
|
||||||
|
|
||||||
if(ticks != null) {
|
if(ticks != null) {
|
||||||
int invalid = 0;
|
int invalid = 0;
|
||||||
|
@ -544,7 +544,7 @@ public class Region {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTagList("Sections", sects);
|
tag.setObjectList("Sections", sects);
|
||||||
tag.setByteArray("Biomes", chunk.getBiomes());
|
tag.setByteArray("Biomes", chunk.getBiomes());
|
||||||
chunk.setHasEntities(false);
|
chunk.setHasEntities(false);
|
||||||
TagObjectList entities = new TagObjectList();
|
TagObjectList entities = new TagObjectList();
|
||||||
|
@ -560,16 +560,16 @@ public class Region {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTagList("Entities", entities);
|
tag.setObjectList("Entities", entities);
|
||||||
TagObjectList tiles = new TagObjectList();
|
TagObjectList tiles = new TagObjectList();
|
||||||
|
|
||||||
for(TileEntity tileentity : chunk.getTiles().values()) {
|
for(TileEntity tileentity : chunk.getTiles().values()) {
|
||||||
TagObject tile = new TagObject();
|
TagObject tile = new TagObject();
|
||||||
tileentity.writeToNBT(tile);
|
tileentity.writeTags(tile);
|
||||||
tiles.add(tile);
|
tiles.add(tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTagList("TileEntities", tiles);
|
tag.setObjectList("TileEntities", tiles);
|
||||||
List<NextTickListEntry> tics = world.getPendingBlockUpdates(chunk);
|
List<NextTickListEntry> tics = world.getPendingBlockUpdates(chunk);
|
||||||
|
|
||||||
if(tics != null) {
|
if(tics != null) {
|
||||||
|
@ -588,7 +588,7 @@ public class Region {
|
||||||
ticks.add(tick);
|
ticks.add(tick);
|
||||||
}
|
}
|
||||||
|
|
||||||
tag.setTagList("TileTicks", ticks);
|
tag.setObjectList("TileTicks", ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
|
|
|
@ -309,8 +309,8 @@ public final class WorldServer extends AWorldServer {
|
||||||
if(tag != null) {
|
if(tag != null) {
|
||||||
this.exterminated = tag.getBool("Exterminated");
|
this.exterminated = tag.getBool("Exterminated");
|
||||||
this.time = tag.getLong("Time");
|
this.time = tag.getLong("Time");
|
||||||
if(tag.hasTag("Generator")) {
|
if(tag.hasObject("Generator")) {
|
||||||
this.dimension.fromNbt(tag.getTag("Generator"));
|
this.dimension.fromNbt(tag.getObject("Generator"));
|
||||||
if(this.dimension.getType().weather && !this.exterminated)
|
if(this.dimension.getType().weather && !this.exterminated)
|
||||||
this.weather = this.dimension.getWeather();
|
this.weather = this.dimension.getWeather();
|
||||||
this.seed = this.dimension.getSeed();
|
this.seed = this.dimension.getSeed();
|
||||||
|
@ -448,8 +448,8 @@ public final class WorldServer extends AWorldServer {
|
||||||
catch(Exception e) {
|
catch(Exception e) {
|
||||||
Log.IO.error(e, "Konnte Ladeliste nicht laden");
|
Log.IO.error(e, "Konnte Ladeliste nicht laden");
|
||||||
}
|
}
|
||||||
if(tag != null && tag.hasTagList("Loaders")) {
|
if(tag != null && tag.hasObjectList("Loaders")) {
|
||||||
TagObjectList list = tag.getTagList("Loaders");
|
TagObjectList list = tag.getObjectList("Loaders");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject pos = list.get(z);
|
TagObject pos = list.get(z);
|
||||||
this.addLoader(new BlockPos(pos.getInt("X"), pos.getInt("Y"), pos.getInt("Z")));
|
this.addLoader(new BlockPos(pos.getInt("X"), pos.getInt("Y"), pos.getInt("Z")));
|
||||||
|
@ -937,7 +937,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
catch(Exception e) {
|
catch(Exception e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return tag != null && tag.hasTagList("Loaders") && !tag.getTagList("Loaders").isEmpty();
|
return tag != null && tag.hasObjectList("Loaders") && !tag.getObjectList("Loaders").isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadWarps(Dimension dim, Map<String, Position> warps) {
|
public static void loadWarps(Dimension dim, Map<String, Position> warps) {
|
||||||
|
@ -951,8 +951,8 @@ public final class WorldServer extends AWorldServer {
|
||||||
Log.IO.error(e, "Konnte Warpliste nicht laden");
|
Log.IO.error(e, "Konnte Warpliste nicht laden");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(tag != null && tag.hasTagList("Warps")) {
|
if(tag != null && tag.hasObjectList("Warps")) {
|
||||||
TagObjectList list = tag.getTagList("Warps");
|
TagObjectList list = tag.getObjectList("Warps");
|
||||||
for(int z = 0; z < list.size(); z++) {
|
for(int z = 0; z < list.size(); z++) {
|
||||||
TagObject pos = list.get(z);
|
TagObject pos = list.get(z);
|
||||||
warps.put(pos.getString("Name"), new Position(pos.getDouble("X"), pos.getDouble("Y"), pos.getDouble("Z"),
|
warps.put(pos.getString("Name"), new Position(pos.getDouble("X"), pos.getDouble("Y"), pos.getDouble("Z"),
|
||||||
|
@ -987,7 +987,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TagObject tag = new TagObject();
|
TagObject tag = new TagObject();
|
||||||
tag.setTagList("Warps", list);
|
tag.setObjectList("Warps", list);
|
||||||
try {
|
try {
|
||||||
TagLoader.writeGZip(tag, file);
|
TagLoader.writeGZip(tag, file);
|
||||||
}
|
}
|
||||||
|
@ -1039,7 +1039,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
loader.setInt("Z", pos.getZ());
|
loader.setInt("Z", pos.getZ());
|
||||||
list.add(loader);
|
list.add(loader);
|
||||||
}
|
}
|
||||||
loaders.setTagList("Loaders", list);
|
loaders.setObjectList("Loaders", list);
|
||||||
File file = new File(this.chunkDir, "loaders.nbt");
|
File file = new File(this.chunkDir, "loaders.nbt");
|
||||||
if(list.isEmpty()) {
|
if(list.isEmpty()) {
|
||||||
file.delete();
|
file.delete();
|
||||||
|
@ -1060,7 +1060,7 @@ public final class WorldServer extends AWorldServer {
|
||||||
// this.dataModified = false;
|
// this.dataModified = false;
|
||||||
TagObject data = new TagObject();
|
TagObject data = new TagObject();
|
||||||
// data.setLong("Seed", this.seed);
|
// data.setLong("Seed", this.seed);
|
||||||
data.setTag("Generator", this.dimension.toNbt(true));
|
data.setObject("Generator", this.dimension.toNbt(true));
|
||||||
data.setLong("Time", this.time);
|
data.setLong("Time", this.time);
|
||||||
data.setBool("Exterminated", this.exterminated);
|
data.setBool("Exterminated", this.exterminated);
|
||||||
data.setString("Weather", this.weather.getName());
|
data.setString("Weather", this.weather.getName());
|
||||||
|
|
|
@ -232,7 +232,7 @@ public abstract class MapGenStructure extends MapGenBase
|
||||||
|
|
||||||
private void setStructureStart(int chunkX, int chunkZ, StructureStart start)
|
private void setStructureStart(int chunkX, int chunkZ, StructureStart start)
|
||||||
{
|
{
|
||||||
this.structureData.tag.setTag("[" + chunkX + "," + chunkZ + "]", start.writeStructureComponentsToNBT(chunkX, chunkZ));
|
this.structureData.tag.setObject("[" + chunkX + "," + chunkZ + "]", start.writeStructureComponentsToNBT(chunkX, chunkZ));
|
||||||
this.structureData.dirty = true;
|
this.structureData.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public abstract class StructureStart
|
||||||
nbttaglist.add(structurecomponent.createStructureBaseNBT());
|
nbttaglist.add(structurecomponent.createStructureBaseNBT());
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound.setTagList("Children", nbttaglist);
|
nbttagcompound.setObjectList("Children", nbttaglist);
|
||||||
this.writeToNBT(nbttagcompound);
|
this.writeToNBT(nbttagcompound);
|
||||||
return nbttagcompound;
|
return nbttagcompound;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ public abstract class StructureStart
|
||||||
this.boundingBox = new StructureBoundingBox(tagCompound.getIntArray("BB"));
|
this.boundingBox = new StructureBoundingBox(tagCompound.getIntArray("BB"));
|
||||||
}
|
}
|
||||||
|
|
||||||
TagObjectList nbttaglist = tagCompound.getTagList("Children");
|
TagObjectList nbttaglist = tagCompound.getObjectList("Children");
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i)
|
for (int i = 0; i < nbttaglist.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue