private void UpdateTagCompound(NBTTagCompound par1NBTTagCompound, NBTTagCompound par2NBTTagCompound) { par1NBTTagCompound.SetLong("RandomSeed", RandomSeed); par1NBTTagCompound.SetString("generatorName", TerrainType.Func_48628_a()); par1NBTTagCompound.SetInteger("generatorVersion", TerrainType.GetGeneratorVersion()); par1NBTTagCompound.SetInteger("GameType", GameType); par1NBTTagCompound.Setbool("MapFeatures", MapFeaturesEnabled); par1NBTTagCompound.SetInteger("SpawnX", SpawnX); par1NBTTagCompound.SetInteger("SpawnY", SpawnY); par1NBTTagCompound.SetInteger("SpawnZ", SpawnZ); par1NBTTagCompound.SetLong("Time", WorldTime); par1NBTTagCompound.SetLong("SizeOnDisk", SizeOnDisk); par1NBTTagCompound.SetLong("LastPlayed", JavaHelper.CurrentTimeMillis()); par1NBTTagCompound.SetString("LevelName", LevelName); par1NBTTagCompound.SetInteger("version", SaveVersion); par1NBTTagCompound.SetInteger("rainTime", RainTime); par1NBTTagCompound.Setbool("raining", Raining); par1NBTTagCompound.SetInteger("thunderTime", ThunderTime); par1NBTTagCompound.Setbool("thundering", Thundering); par1NBTTagCompound.Setbool("hardcore", Hardcore); if (par2NBTTagCompound != null) { par1NBTTagCompound.SetCompoundTag("Player", par2NBTTagCompound); } }
/// <summary> /// Writes a tile entity to NBT. /// </summary> public override void WriteToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteToNBT(par1NBTTagCompound); par1NBTTagCompound.SetInteger("blockId", StoredBlockID); par1NBTTagCompound.SetInteger("blockData", StoredMetadata); par1NBTTagCompound.SetInteger("facing", StoredOrientation); par1NBTTagCompound.SetFloat("progress", LastProgress); par1NBTTagCompound.Setbool("extending", Extending); }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); if (DataWatcher.GetWatchableObjectByte(17) == 1) { par1NBTTagCompound.Setbool("powered", true); } }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.SetShort("xTile", (short)XTile); par1NBTTagCompound.SetShort("yTile", (short)YTile); par1NBTTagCompound.SetShort("zTile", (short)ZTile); par1NBTTagCompound.SetByte("inTile", (byte)InTile); par1NBTTagCompound.SetByte("inData", (byte)InData); par1NBTTagCompound.SetByte("shake", (byte)ArrowShake); par1NBTTagCompound.SetByte("inGround", (byte)(InGround ? 1 : 0)); par1NBTTagCompound.Setbool("player", DoesArrowBelongToPlayer); par1NBTTagCompound.SetDouble("damage", Damage); }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); if (GetOwnerName() == null) { par1NBTTagCompound.SetString("Owner", ""); } else { par1NBTTagCompound.SetString("Owner", GetOwnerName()); } par1NBTTagCompound.Setbool("Sitting", IsSitting()); }
private void Func_48445_a(Chunk par1Chunk, World par2World, NBTTagCompound par3NBTTagCompound) { par2World.CheckSessionLock(); par3NBTTagCompound.SetInteger("xPos", par1Chunk.XPosition); par3NBTTagCompound.SetInteger("zPos", par1Chunk.ZPosition); par3NBTTagCompound.SetLong("LastUpdate", par2World.GetWorldTime()); par3NBTTagCompound.Func_48183_a("HeightMap", par1Chunk.HeightMap); par3NBTTagCompound.Setbool("TerrainPopulated", par1Chunk.IsTerrainPopulated); ExtendedBlockStorage[] aextendedblockstorage = par1Chunk.GetBlockStorageArray(); NBTTagList nbttaglist = new NBTTagList("Sections"); ExtendedBlockStorage[] aextendedblockstorage1 = aextendedblockstorage; int i = aextendedblockstorage1.Length; for (int k = 0; k < i; k++) { ExtendedBlockStorage extendedblockstorage = aextendedblockstorage1[k]; if (extendedblockstorage == null || extendedblockstorage.Func_48700_f() == 0) { continue; } NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.SetByte("Y", (byte)(extendedblockstorage.GetYLocation() >> 4 & 0xff)); nbttagcompound.SetByteArray("Blocks", extendedblockstorage.Func_48692_g()); if (extendedblockstorage.GetBlockMSBArray() != null) { nbttagcompound.SetByteArray("Add", extendedblockstorage.GetBlockMSBArray().Data); } nbttagcompound.SetByteArray("Data", extendedblockstorage.Func_48697_j().Data); nbttagcompound.SetByteArray("SkyLight", extendedblockstorage.GetSkylightArray().Data); nbttagcompound.SetByteArray("BlockLight", extendedblockstorage.GetBlocklightArray().Data); nbttaglist.AppendTag(nbttagcompound); } par3NBTTagCompound.SetTag("Sections", nbttaglist); par3NBTTagCompound.SetByteArray("Biomes", par1Chunk.GetBiomeArray()); par1Chunk.HasEntities = false; NBTTagList nbttaglist1 = new NBTTagList(); label0: for (int j = 0; j < par1Chunk.EntityLists.Length; j++) { IEnumerator <Entity> iterator = par1Chunk.EntityLists[j].GetEnumerator(); do { if (!iterator.MoveNext()) { goto label0; } Entity entity = iterator.Current; par1Chunk.HasEntities = true; NBTTagCompound nbttagcompound1 = new NBTTagCompound(); if (entity.AddEntityID(nbttagcompound1)) { nbttaglist1.AppendTag(nbttagcompound1); } }while (true); } par3NBTTagCompound.SetTag("Entities", nbttaglist1); NBTTagList nbttaglist2 = new NBTTagList(); NBTTagCompound nbttagcompound2; for (IEnumerator <TileEntity> iterator1 = par1Chunk.ChunkTileEntityMap.Values.GetEnumerator(); iterator1.MoveNext(); nbttaglist2.AppendTag(nbttagcompound2)) { TileEntity tileentity = iterator1.Current; nbttagcompound2 = new NBTTagCompound(); tileentity.WriteToNBT(nbttagcompound2); } par3NBTTagCompound.SetTag("TileEntities", nbttaglist2); List <NextTickListEntry> list = par2World.GetPendingBlockUpdates(par1Chunk, false); if (list != null) { long l = par2World.GetWorldTime(); NBTTagList nbttaglist3 = new NBTTagList(); NBTTagCompound nbttagcompound3; for (IEnumerator <NextTickListEntry> iterator2 = list.GetEnumerator(); iterator2.MoveNext(); nbttaglist3.AppendTag(nbttagcompound3)) { NextTickListEntry nextticklistentry = iterator2.Current; nbttagcompound3 = new NBTTagCompound(); nbttagcompound3.SetInteger("i", nextticklistentry.BlockID); nbttagcompound3.SetInteger("x", nextticklistentry.XCoord); nbttagcompound3.SetInteger("y", nextticklistentry.YCoord); nbttagcompound3.SetInteger("z", nextticklistentry.ZCoord); nbttagcompound3.SetInteger("t", (int)(nextticklistentry.ScheduledTime - l)); } par3NBTTagCompound.SetTag("TileTicks", nbttaglist3); } }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.Setbool("Saddle", GetSaddled()); }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.Setbool("PlayerCreated", Func_48112_E_()); }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.Setbool("Angry", IsAngry()); }
/// <summary> /// (abstract) Protected helper method to write subclass entity data to NBT. /// </summary> public override void WriteEntityToNBT(NBTTagCompound par1NBTTagCompound) { base.WriteEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.Setbool("Sheared", GetSheared()); par1NBTTagCompound.SetByte("Color", (byte)GetFleeceColor()); }