Example #1
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     nbttagcompound.SetShort("Health", unchecked ((byte)health));
     nbttagcompound.SetShort("Age", (short)age);
     nbttagcompound.SetCompoundTag("Item", item.WriteToNBT(new net.minecraft.src.NBTTagCompound()));
 }
Example #2
0
 public net.minecraft.src.NBTTagCompound WriteToNBT(net.minecraft.src.NBTTagCompound
                                                    nbttagcompound)
 {
     nbttagcompound.SetShort("id", (short)itemID);
     nbttagcompound.SetByte("Count", unchecked ((byte)stackSize));
     nbttagcompound.SetShort("Damage", (short)itemDamage);
     return(nbttagcompound);
 }
Example #3
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     nbttagcompound.SetShort("Health", (short)health);
     nbttagcompound.SetShort("HurtTime", (short)hurtTime);
     nbttagcompound.SetShort("DeathTime", (short)deathTime);
     nbttagcompound.SetShort("AttackTime", (short)attackTime);
 }
Example #4
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     nbttagcompound.SetShort("xTile", (short)xTileSnowball);
     nbttagcompound.SetShort("yTile", (short)yTileSnowball);
     nbttagcompound.SetShort("zTile", (short)zTileSnowball);
     nbttagcompound.SetByte("inTile", unchecked ((byte)inTileSnowball));
     nbttagcompound.SetByte("shake", unchecked ((byte)shakeSnowball));
     nbttagcompound.SetByte("inGround", unchecked ((byte)(inGroundSnowball ? 1 : 0)));
 }
Example #5
0
 public override void Func_28147_b(net.minecraft.src.NBTTagCompound nbttagcompound
                                   )
 {
     nbttagcompound.SetByte("dimension", field_28162_d);
     nbttagcompound.SetInteger("xCenter", field_28164_b);
     nbttagcompound.SetInteger("zCenter", field_28163_c);
     nbttagcompound.SetByte("scale", field_28161_e);
     nbttagcompound.SetShort("width", (short)128);
     nbttagcompound.SetShort("height", (short)128);
     nbttagcompound.SetByteArray("colors", field_28160_f);
 }
Example #6
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     nbttagcompound.SetShort("xTile", (short)xTile);
     nbttagcompound.SetShort("yTile", (short)yTile);
     nbttagcompound.SetShort("zTile", (short)zTile);
     nbttagcompound.SetByte("inTile", unchecked ((byte)inTile));
     nbttagcompound.SetByte("inData", unchecked ((byte)field_28011_h));
     nbttagcompound.SetByte("shake", unchecked ((byte)arrowShake));
     nbttagcompound.SetByte("inGround", unchecked ((byte)(inGround ? 1 : 0)));
     nbttagcompound.SetBoolean("player", field_28012_a);
 }
Example #7
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     nbttagcompound.SetInteger("Type", minecartType);
     if (minecartType == 2)
     {
         nbttagcompound.SetDouble("PushX", pushX);
         nbttagcompound.SetDouble("PushZ", pushZ);
         nbttagcompound.SetShort("Fuel", (short)fuel);
     }
     else
     {
         if (minecartType == 1)
         {
             net.minecraft.src.NBTTagList nbttaglist = new net.minecraft.src.NBTTagList();
             for (int i = 0; i < cargoItems.Length; i++)
             {
                 if (cargoItems[i] != null)
                 {
                     net.minecraft.src.NBTTagCompound nbttagcompound1 = new net.minecraft.src.NBTTagCompound
                                                                            ();
                     nbttagcompound1.SetByte("Slot", unchecked ((byte)i));
                     cargoItems[i].WriteToNBT(nbttagcompound1);
                     nbttaglist.SetTag(nbttagcompound1);
                 }
             }
             nbttagcompound.SetTag("Items", nbttaglist);
         }
     }
 }
Example #8
0
 public override void WriteToNBT(net.minecraft.src.NBTTagCompound nbttagcompound)
 {
     base.WriteToNBT(nbttagcompound);
     nbttagcompound.SetShort("BurnTime", (short)furnaceBurnTime);
     nbttagcompound.SetShort("CookTime", (short)furnaceCookTime);
     net.minecraft.src.NBTTagList nbttaglist = new net.minecraft.src.NBTTagList();
     for (int i = 0; i < furnaceItemStacks.Length; i++)
     {
         if (furnaceItemStacks[i] != null)
         {
             net.minecraft.src.NBTTagCompound nbttagcompound1 = new net.minecraft.src.NBTTagCompound
                                                                    ();
             nbttagcompound1.SetByte("Slot", unchecked ((byte)i));
             furnaceItemStacks[i].WriteToNBT(nbttagcompound1);
             nbttaglist.SetTag(nbttagcompound1);
         }
     }
     nbttagcompound.SetTag("Items", nbttaglist);
 }
Example #9
0
        public virtual void WriteToNBT(net.minecraft.src.NBTTagCompound nbttagcompound)
        {
            // CRAFTBUKKIT start
            if (float.IsNaN(rotationYaw))
            {
                rotationYaw = 0;
            }
            if (float.IsNaN(rotationPitch))
            {
                rotationPitch = 0;
            }
            // CRAFTBUKKIT end

            nbttagcompound.SetTag("Pos", NewDoubleNBTList(new double[] { posX, posY + (double)ySize, posZ }));
            nbttagcompound.SetTag("Motion", NewDoubleNBTList(new double[] { motionX, motionY, motionZ }));
            nbttagcompound.SetTag("Rotation", NewFloatNBTList(new float[] { rotationYaw, rotationPitch }));
            nbttagcompound.SetFloat("FallDistance", fallDistance);
            nbttagcompound.SetShort("Fire", (short)fire);
            nbttagcompound.SetShort("Air", (short)air);
            nbttagcompound.SetBoolean("OnGround", onGround);
            WriteEntityToNBT(nbttagcompound);
        }
Example #10
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     base.WriteEntityToNBT(nbttagcompound);
     nbttagcompound.SetTag("Inventory", inventory.WriteToNBT(new net.minecraft.src.NBTTagList
                                                                 ()));
     nbttagcompound.SetInteger("Dimension", dimension);
     nbttagcompound.SetBoolean("Sleeping", sleeping);
     nbttagcompound.SetShort("SleepTimer", (short)sleepTimer);
     if (spawnChunk != null)
     {
         nbttagcompound.SetInteger("SpawnX", spawnChunk.posX);
         nbttagcompound.SetInteger("SpawnY", spawnChunk.posY);
         nbttagcompound.SetInteger("SpawnZ", spawnChunk.posZ);
     }
 }
Example #11
0
        public virtual int Func_28173_a(string s)
        {
            short short1 = (short)field_28181_d[s];

            if (short1 == null)
            {
                short1 = (short)0;
            }
            else
            {
                short short2 = short1;
                short short3 = short1 = (short)(short1 + 1);
                short _tmp   = short2;
            }
            field_28181_d[s] = short1;
            if (field_28180_a == null)
            {
                return(short1);
            }
            try
            {
                string file = field_28180_a.Func_28111_b("idcounts");
                if (file != null)
                {
                    net.minecraft.src.NBTTagCompound nbttagcompound = new net.minecraft.src.NBTTagCompound
                                                                          ();
                    string s1;
                    short  word0;
                    for (System.Collections.IEnumerator iterator = field_28181_d.Keys.GetEnumerator()
                         ; iterator.MoveNext(); nbttagcompound.SetShort(s1, word0))
                    {
                        s1    = (string)iterator.Current;
                        word0 = ((short)field_28181_d[s1]);
                    }
                    java.io.DataOutputStream dataoutputstream = new java.io.DataOutputStream(File.OpenWrite(file));
                    net.minecraft.src.CompressedStreamTools.Func_771_a(nbttagcompound, dataoutputstream);
                    dataoutputstream.Close();
                }
            }
            catch (System.Exception exception)
            {
                Sharpen.Runtime.PrintStackTrace(exception);
            }
            return(short1);
        }
Example #12
0
 public override void WriteToNBT(net.minecraft.src.NBTTagCompound nbttagcompound)
 {
     base.WriteToNBT(nbttagcompound);
     nbttagcompound.SetString("EntityId", mobName);
     nbttagcompound.SetShort("Delay", (short)spawnDelay);
 }
Example #13
0
 protected internal override void WriteEntityToNBT(net.minecraft.src.NBTTagCompound
                                                   nbttagcompound)
 {
     base.WriteEntityToNBT(nbttagcompound);
     nbttagcompound.SetShort("Anger", (short)angerLevel);
 }