public virtual void ReadCapabilitiesFromNBT(NBTTagCompound par1NBTTagCompound)
 {
     if (par1NBTTagCompound.HasKey("abilities"))
     {
         NBTTagCompound nbttagcompound = par1NBTTagCompound.GetCompoundTag("abilities");
         DisableDamage  = nbttagcompound.Getbool("invulnerable");
         IsFlying       = nbttagcompound.Getbool("flying");
         AllowFlying    = nbttagcompound.Getbool("mayfly");
         IsCreativeMode = nbttagcompound.Getbool("instabuild");
     }
 }
Пример #2
0
        public static AnvilConverterData Load(NBTTagCompound par0NBTTagCompound)
        {
            int i = par0NBTTagCompound.GetInteger("xPos");
            int j = par0NBTTagCompound.GetInteger("zPos");
            AnvilConverterData anvilconverterdata = new AnvilConverterData(i, j);

            anvilconverterdata.Blocks           = par0NBTTagCompound.GetByteArray("Blocks");
            anvilconverterdata.Data             = new NibbleArrayReader(par0NBTTagCompound.GetByteArray("Data"), 7);
            anvilconverterdata.SkyLight         = new NibbleArrayReader(par0NBTTagCompound.GetByteArray("SkyLight"), 7);
            anvilconverterdata.BlockLight       = new NibbleArrayReader(par0NBTTagCompound.GetByteArray("BlockLight"), 7);
            anvilconverterdata.Heightmap        = par0NBTTagCompound.GetByteArray("HeightMap");
            anvilconverterdata.TerrainPopulated = par0NBTTagCompound.Getbool("TerrainPopulated");
            anvilconverterdata.Entities         = par0NBTTagCompound.GetTagList("Entities");
            anvilconverterdata.TileEntities     = par0NBTTagCompound.GetTagList("TileEntities");
            anvilconverterdata.TileTicks        = par0NBTTagCompound.GetTagList("TileTicks");

            //try
            {
                anvilconverterdata.LastUpdated = par0NBTTagCompound.GetLong("LastUpdate");
            }            /*
                          * catch (ClassCastException classcastexception)
                          * {
                          *     anvilconverterdata.LastUpdated = par0NBTTagCompound.GetInteger("LastUpdate");
                          * }*/

            return(anvilconverterdata);
        }