writeByte() public méthode

public writeByte ( int arg0 ) : void
arg0 int
Résultat void
Exemple #1
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeByte(inventoryType);
     dataoutputstream.writeUTF(windowTitle);
     dataoutputstream.writeByte(slotsCount);
 }
Exemple #2
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(field_22041_a);
     dataoutputstream.writeByte(field_22042_e);
     dataoutputstream.writeInt(field_22040_b);
     dataoutputstream.writeByte(field_22044_c);
     dataoutputstream.writeInt(field_22043_d);
 }
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     base.writePacketData(dataoutputstream);
     dataoutputstream.writeByte(xPosition);
     dataoutputstream.writeByte(yPosition);
     dataoutputstream.writeByte(zPosition);
     dataoutputstream.writeByte(yaw);
     dataoutputstream.writeByte(pitch);
 }
Exemple #4
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeByte(type);
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeInt(yPosition);
     dataoutputstream.writeInt(zPosition);
     dataoutputstream.writeByte(yaw);
     dataoutputstream.writeByte(pitch);
     metaData.writeWatchableObjects(dataoutputstream);
 }
 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);
 }
 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);
 }
 public override void sendValue(object obj, DataOutputStream dos)
 {
   if (obj is object[])
   {
     object[] objArray = (object[]) obj;
     if (objArray.Length > (int) byte.MaxValue)
     {
       string str = new StringBuilder().append("Cannot write ").append(obj).append(" as ").append(this.__\u003C\u003Ename).append(". Arrays have a max length of 255 values").toString();
       Throwable.__\u003CsuppressFillInStackTrace\u003E();
       throw new IOException(str);
     }
     else
     {
       dos.writeByte(objArray.Length);
       for (int index = 0; index < objArray.Length; ++index)
         this.elementType.sendValue(objArray[index], dos);
     }
   }
   else
   {
     string str = new StringBuilder().append("Cannot write ").append(obj).append(" as ").append(this.__\u003C\u003Ename).toString();
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IOException(str);
   }
 }
Exemple #8
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(protocolVersion);
     dataoutputstream.writeUTF(username);
     dataoutputstream.writeUTF(password);
     dataoutputstream.writeLong(mapSeed);
     dataoutputstream.writeByte(dimension);
 }
Exemple #9
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());
     }
 }
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeByte(type);
     dataoutputstream.writeInt(xPosition);
     dataoutputstream.writeInt(yPosition);
     dataoutputstream.writeInt(zPosition);
 }
Exemple #11
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());
         }
     }
 }
Exemple #12
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());
     }
 }
Exemple #13
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeDouble(explosionX);
     dataoutputstream.writeDouble(explosionY);
     dataoutputstream.writeDouble(explosionZ);
     dataoutputstream.writeFloat(explosionSize);
     dataoutputstream.writeInt(destroyedBlockPositions.size());
     var i = (int) explosionX;
     var j = (int) explosionY;
     var k = (int) explosionZ;
     int j1;
     for (Iterator iterator = destroyedBlockPositions.iterator();
          iterator.hasNext();
          dataoutputstream.writeByte(j1))
     {
         var chunkposition = (ChunkPosition) iterator.next();
         int l = chunkposition.x - i;
         int i1 = chunkposition.y - j;
         j1 = chunkposition.z - k;
         dataoutputstream.writeByte(l);
         dataoutputstream.writeByte(i1);
     }
 }
Exemple #14
0
        public void writeWatchableObjects(DataOutputStream dataoutputstream)
        {
            WatchableObject watchableobject;
            for (Iterator iterator = watchedObjects.values().iterator();
                 iterator.hasNext();
                 writeWatchableObject(dataoutputstream, watchableobject))
            {
                watchableobject = (WatchableObject) iterator.next();
            }

            dataoutputstream.writeByte(127);
        }
Exemple #15
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(entityId);
     dataoutputstream.writeByte(entityStatus);
 }
Exemple #16
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeInt(playerEntityId);
     dataoutputstream.writeInt(targetEntity);
     dataoutputstream.writeByte(isLeftClick);
 }
Exemple #17
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(shortWindowId);
     dataoutputstream.writeByte(field_20035_c ? 1 : 0);
 }
Exemple #18
0
 public static void writeObjectsInListToStream(List list, DataOutputStream dataoutputstream)
 {
     if (list != null)
     {
         WatchableObject watchableobject;
         for (Iterator iterator = list.iterator();
              iterator.hasNext();
              writeWatchableObject(dataoutputstream, watchableobject))
         {
             watchableobject = (WatchableObject) iterator.next();
         }
     }
     dataoutputstream.writeByte(127);
 }
Exemple #19
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
     dataoutputstream.writeShort(progressBar);
     dataoutputstream.writeShort(progressBarValue);
 }
Exemple #20
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;
            }
        }
Exemple #21
0
 public override void writePacketData(DataOutputStream dataoutputstream)
 {
     dataoutputstream.writeByte(windowId);
 }