Exemple #1
0
 public override void WriteToNBT(net.minecraft.src.NBTTagCompound nbttagcompound)
 {
     base.WriteToNBT(nbttagcompound);
     nbttagcompound.SetInteger("blockId", storedBlockID);
     nbttagcompound.SetInteger("blockData", storedMetadata);
     nbttagcompound.SetInteger("facing", storedOrientation);
     nbttagcompound.SetFloat("progress", lastProgress);
     nbttagcompound.SetBoolean("extending", isExtending);
 }
Exemple #2
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);
        }