writeShort() public method

public writeShort ( int arg0 ) : void
arg0 int
return void
Exemplo n.º 1
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeShort(motionX);
     dataoutputstream.writeShort(motionY);
     dataoutputstream.writeShort(motionZ);
 }
Exemplo n.º 2
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeShort(itemID);
     dataoutputstream.writeByte(count);
     dataoutputstream.writeShort(itemDamage);
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeInt(yPosition);
     dataoutputstream.writeInt(zPosition);
     dataoutputstream.writeByte(rotation);
     dataoutputstream.writeByte(pitch);
     dataoutputstream.writeByte(roll);
 }
Exemplo n.º 3
0
        public override void writePacketData(DataOutputStream dataoutputstream)
        {
            dataoutputstream.writeInt(xPosition);
            dataoutputstream.writeInt(zPosition);
            dataoutputstream.writeShort((short) size);
            for (int i = 0; i < size; i++)
            {
                dataoutputstream.writeShort(coordinateArray[i]);
            }

            dataoutputstream.write(typeArray);
            dataoutputstream.write(metadataArray);
        }
Exemplo n.º 4
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(window_Id);
     dataoutputstream.writeShort(inventorySlot);
     dataoutputstream.writeByte(mouseClick);
     dataoutputstream.writeShort(action);
     if (itemStack == null)
     {
         dataoutputstream.writeShort(-1);
     }
     else
     {
         dataoutputstream.writeShort(itemStack.itemID);
         dataoutputstream.writeByte(itemStack.stackSize);
         dataoutputstream.writeShort(itemStack.getItemDamage());
     }
 }
Exemplo n.º 5
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.write(yPosition);
     dataoutputstream.writeInt(zPosition);
     dataoutputstream.write(direction);
     if (itemStack == null)
     {
         dataoutputstream.writeShort(-1);
     }
     else
     {
         dataoutputstream.writeShort(itemStack.itemID);
         dataoutputstream.writeByte(itemStack.stackSize);
         dataoutputstream.writeShort(itemStack.getItemDamage());
     }
 }
Exemplo n.º 6
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(xLocation);
     dataoutputstream.writeShort(yLocation);
     dataoutputstream.writeInt(zLocation);
     dataoutputstream.write(instrumentType);
     dataoutputstream.write(pitch);
 }
Exemplo n.º 7
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(itemStack.Length);
     for (int i = 0; i < itemStack.Length; i++)
     {
         if (itemStack[i] == null)
         {
             dataoutputstream.writeShort(-1);
         }
         else
         {
             dataoutputstream.writeShort((short) itemStack[i].itemID);
             dataoutputstream.writeByte((byte) itemStack[i].stackSize);
             dataoutputstream.writeShort((short) itemStack[i].getItemDamage());
         }
     }
 }
Exemplo n.º 8
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeShort(yPosition);
     dataoutputstream.writeInt(zPosition);
     for (int i = 0; i < 4; i++)
     {
         dataoutputstream.writeUTF(signLines[i]);
     }
 }
Exemplo n.º 9
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeUTF(name);
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeInt(yPosition);
     dataoutputstream.writeInt(zPosition);
     dataoutputstream.writeByte(rotation);
     dataoutputstream.writeByte(pitch);
     dataoutputstream.writeShort(currentItem);
 }
Exemplo n.º 10
0
        private static void writeWatchableObject(DataOutputStream dataoutputstream, WatchableObject watchableobject)
        {
            int i = (watchableobject.getObjectType() << 5 | watchableobject.getDataValueId() & 0x1f) & 0xff;
            dataoutputstream.writeByte(i);
            switch (watchableobject.getObjectType())
            {
                case 0: // '\0'
                    try
                    {
                        dataoutputstream.writeByte(((Byte) watchableobject.getObject()).byteValue());
                    }
                    catch
                    {
                        dataoutputstream.writeByte((sbyte) (watchableobject.getObject()));
                    }
                    break;

                case 1: // '\001'
                    dataoutputstream.writeShort(((Short) watchableobject.getObject()).shortValue());
                    break;

                case 2: // '\002'
                    dataoutputstream.writeInt(((Integer) watchableobject.getObject()).intValue());
                    break;

                case 3: // '\003'
                    dataoutputstream.writeFloat(((Float) watchableobject.getObject()).floatValue());
                    break;

                case 4: // '\004'
                    dataoutputstream.writeUTF((string) watchableobject.getObject());
                    break;

                case 5: // '\005'
                    var itemstack = (ItemStack) watchableobject.getObject();
                    dataoutputstream.writeShort(itemstack.getItem().shiftedIndex);
                    dataoutputstream.writeByte(itemstack.stackSize);
                    dataoutputstream.writeShort(itemstack.getItemDamage());
                    // fall through (cant.. c# ...)
                    var chunkcoordinates2 = (ChunkCoordinates) watchableobject.getObject();
                    dataoutputstream.writeInt(chunkcoordinates2.posX);
                    dataoutputstream.writeInt(chunkcoordinates2.posY);
                    dataoutputstream.writeInt(chunkcoordinates2.posZ);

                    break;
                case 6: // '\006'
                    var chunkcoordinates = (ChunkCoordinates) watchableobject.getObject();
                    dataoutputstream.writeInt(chunkcoordinates.posX);
                    dataoutputstream.writeInt(chunkcoordinates.posY);
                    dataoutputstream.writeInt(chunkcoordinates.posZ);
                    break;
            }
        }
Exemplo n.º 11
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeShort(id);
 }
Exemplo n.º 12
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(progressBar);
     dataoutputstream.writeShort(progressBarValue);
 }
Exemplo n.º 13
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(shortWindowId);
     dataoutputstream.writeByte(field_20035_c ? 1 : 0);
 }