SendItem() public method

Sends the item.
public SendItem ( BigEndianStream stream, int version ) : void
stream Pdelvo.Minecraft.Network.BigEndianStream The stream.
version int The version.
return void
コード例 #1
0
 /// <summary>
 ///   Writes the packet.
 /// </summary>
 /// <param name="stream"> The stream. </param>
 /// <param name="packet"> The packet. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 public static void WritePacket(this BigEndianStream stream, Packet packet, int version)
 {
     if (packet == null)
         throw new ArgumentNullException("packet");
     packet.SendItem(stream, version);
 }
コード例 #2
0
 /// <summary>
 ///   Sends the packet.
 /// </summary>
 /// <param name="packet"> The packet. </param>
 /// <param name="stream"> The stream. </param>
 /// <param name="version"> The version. </param>
 /// <param name="requiredVersion"> The required version. </param>
 /// <param name="lastSupportedVersion"> The last supported version. </param>
 /// <param name="throwOnRequired"> if set to <c>true</c> [throw on required]. </param>
 /// <param name="throwOnLast"> if set to <c>true</c> [throw on last]. </param>
 /// <remarks>
 /// </remarks>
 public static void SendPacket(Packet packet, BigEndianStream stream,
                               int version, int requiredVersion, int lastSupportedVersion, bool throwOnRequired,
                               bool throwOnLast)
 {
     bool supported = CheckPacket(packet, version, requiredVersion, lastSupportedVersion, throwOnRequired,
                                  throwOnLast);
     if (!supported)
         return;
     packet.SendItem(stream, version);
 }