/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteShort(field_28052_a); dataoutputstream.WriteShort(field_28051_b); dataoutputstream.WriteByte(field_28053_c.Length); dataoutputstream.Write(field_28053_c); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(entityID); dataoutputstream.WriteShort(slot); dataoutputstream.WriteShort(itemID); dataoutputstream.WriteShort(itemDamage); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(entityId); dataoutputstream.WriteShort(motionX); dataoutputstream.WriteShort(motionY); dataoutputstream.WriteShort(motionZ); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.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); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.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); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(entityId); dataoutputstream.WriteByte(type); dataoutputstream.WriteInt(xPosition); dataoutputstream.WriteInt(yPosition); dataoutputstream.WriteInt(zPosition); dataoutputstream.WriteInt(ownerId); if (ownerId > 0) { dataoutputstream.WriteShort(motionX); dataoutputstream.WriteShort(motionY); dataoutputstream.WriteShort(motionZ); } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteByte(windowId); dataoutputstream.WriteShort(itemSlot); if (myItemStack == null) { dataoutputstream.WriteShort(-1); } else { dataoutputstream.WriteShort(myItemStack.itemID); dataoutputstream.WriteByte(myItemStack.stackSize); dataoutputstream.WriteShort(myItemStack.GetItemDamage()); } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.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()); } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(xLocation); dataoutputstream.WriteShort(yLocation); dataoutputstream.WriteInt(zLocation); dataoutputstream.Write(instrumentType); dataoutputstream.Write(pitch); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteByte(window_Id); dataoutputstream.WriteShort(inventorySlot); dataoutputstream.WriteByte(mouseClick); dataoutputstream.WriteShort(action); dataoutputstream.WriteBoolean(field_27039_f); if (itemStack == null) { dataoutputstream.WriteShort(-1); } else { dataoutputstream.WriteShort(itemStack.itemID); dataoutputstream.WriteByte(itemStack.stackSize); dataoutputstream.WriteShort(itemStack.GetItemDamage()); } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.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(unchecked ((byte)itemStack[i].stackSize)); dataoutputstream.WriteShort((short)itemStack[i].GetItemDamage()); } } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(xPosition); dataoutputstream.WriteShort(yPosition); dataoutputstream.WriteInt(zPosition); for (int i = 0; i < 4; i++) { WriteString(signLines[i], dataoutputstream); } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(entityId); WriteString(name, dataoutputstream); dataoutputstream.WriteInt(xPosition); dataoutputstream.WriteInt(yPosition); dataoutputstream.WriteInt(zPosition); dataoutputstream.WriteByte(rotation); dataoutputstream.WriteByte(pitch); dataoutputstream.WriteShort(currentItem); }
//public override void ReadPacketData(java.io.DataInputStream datainputstream) //{ // xPosition = datainputstream.ReadInt(); // yPosition = datainputstream.ReadShort(); // zPosition = datainputstream.ReadInt(); // xSize = datainputstream.Read() + 1; // ySize = datainputstream.Read() + 1; // zSize = datainputstream.Read() + 1; // chunkSize = datainputstream.ReadInt(); // byte[] abyte0 = new byte[chunkSize]; // datainputstream.ReadFully(abyte0); // using (MemoryStream ms = new MemoryStream(abyte0)) // using (MemoryStream output = new MemoryStream()) // using (InflaterInputStream ds = new InflaterInputStream(ms)) // { // ds.CopyTo(output); // ds.Flush(); // chunk = output.ToArray(); // } // //chunk = new byte[(xSize * ySize * zSize * 5) / 2]; // //java.util.zip.Inflater inflater = new java.util.zip.Inflater(); // //inflater.SetInput(abyte0); // //try // //{ // // inflater.Inflate(chunk); // //} // //catch (java.util.zip.DataFormatException) // //{ // // throw new System.IO.IOException("Bad compressed data format"); // //} // //finally // //{ // // inflater.End(); // //} //} /// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteInt(xPosition); dataoutputstream.WriteShort(yPosition); dataoutputstream.WriteInt(zPosition); dataoutputstream.Write(xSize - 1); dataoutputstream.Write(ySize - 1); dataoutputstream.Write(zSize - 1); dataoutputstream.WriteInt(chunkSize); dataoutputstream.Write(chunk.Span);//, 0, chunkSize); }
/// <exception cref="System.IO.IOException"/> public static void WriteString(string s, java.io.DataOutputStream dataoutputstream ) { if (s.Length > 32767) { throw new System.IO.IOException("String too big"); } else { dataoutputstream.WriteShort(s.Length); dataoutputstream.WriteChars(s); return; } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteByte(windowId); dataoutputstream.WriteShort(progressBar); dataoutputstream.WriteShort(progressBarValue); }
/// <exception cref="System.IO.IOException"/> private static void WriteWatchableObject(java.io.DataOutputStream dataoutputstream, net.minecraft.src.WatchableObject watchableobject) { int i = (watchableobject.GetObjectType() << 5 | watchableobject.GetDataValueId() & 0x1f) & 0xff; dataoutputstream.WriteByte(i); switch (watchableobject.GetObjectType()) { case 0: { // '\0' dataoutputstream.WriteByte(((byte)watchableobject.GetObject())); break; } case 1: { // '\001' dataoutputstream.WriteShort(((short)watchableobject.GetObject())); break; } case 2: { // '\002' dataoutputstream.WriteInt(((int)watchableobject.GetObject())); break; } case 3: { // '\003' dataoutputstream.WriteFloat(((float)watchableobject.GetObject())); break; } case 4: { // '\004' net.minecraft.src.Packet.WriteString((string)watchableobject.GetObject(), dataoutputstream ); break; } case 5: { // '\005' net.minecraft.src.ItemStack itemstack = (net.minecraft.src.ItemStack)watchableobject .GetObject(); dataoutputstream.WriteShort(itemstack.GetItem().ID); dataoutputstream.WriteByte(itemstack.stackSize); dataoutputstream.WriteShort(itemstack.GetItemDamage()); break; } case 6: { // '\006' net.minecraft.src.ChunkCoordinates chunkcoordinates = (net.minecraft.src.ChunkCoordinates )watchableobject.GetObject(); dataoutputstream.WriteInt(chunkcoordinates.posX); dataoutputstream.WriteInt(chunkcoordinates.posY); dataoutputstream.WriteInt(chunkcoordinates.posZ); break; } } }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteByte(windowId); dataoutputstream.WriteShort(shortWindowId); dataoutputstream.WriteByte(field_20035_c ? 1 : 0); }
/// <exception cref="System.IO.IOException"/> public override void WritePacketData(java.io.DataOutputStream dataoutputstream) { dataoutputstream.WriteShort(healthMP); }