Examples of Packet250CustomPayload


Examples of deobf.Packet250CustomPayload

    public static byte[] getBytesFromPacket(Packet250CustomPayload packet) {
        return packet.c;
    }

    public static Packet250CustomPayload newPayloadPacket(String name, int len, byte[] data) {
        Packet250CustomPayload packet = new Packet250CustomPayload();
        packet.a = name;
        packet.b = len;
        packet.c = data;
        return packet;
    }
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

    catch (IOException e)
    {
      e.printStackTrace();
    }

    Packet250CustomPayload packet = new Packet250CustomPayload();
    packet.channel = channel;
    packet.data = bytes.toByteArray();
    packet.length = packet.data.length;

    return packet;
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

  public static void sendItemToServer(NetClientHandler sendQueue, byte slotID, ItemStack item) {
    if( sendQueue == null )
      return;

    try {
      Packet250CustomPayload packet = new CustomPacket( (byte) 0x03 ).add( slotID, item ).toPacket();
      sendQueue.addToSendQueue( packet );
    } catch ( IOException ioe ) {
      Utils.logException( "ICG-Custom Packet: Sending item to server. (0x03)", ioe, false );
    }
  }
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

    }
    return this;
  }

  public Packet250CustomPayload toPacket() {
    Packet250CustomPayload packet = new Packet250CustomPayload();
    packet.channel = "xact_channel";
    packet.data = byteArray.toByteArray();
    packet.length = packet.data.length;
    return packet;
  }
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

            outputStream.writeInt(randomInt2);
        } catch (Exception ex) {
            ex.printStackTrace();
        }

        Packet250CustomPayload packet = new Packet250CustomPayload();
        packet.channel = "XPdec";
        packet.data = bos.toByteArray();
        packet.length = bos.size();

        Side side = FMLCommonHandler.instance().getEffectiveSide();
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

    {
      FMLLog.getLogger().info(Info.TITLE_LOG + "Client failed to create packet. (Details: " + e.toString() + ")");
      return;
    }

    AdvancedPowerManagement.proxy.sendPacketToServer(new Packet250CustomPayload(Info.PACKET_CHANNEL, bytes.toByteArray()));
  }
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

    catch (IOException e)
    {
      FMLLog.getLogger().info(Info.TITLE_LOG + "Server failed to create description packet. (Details: " + e.toString() + ")");
    }

    Packet250CustomPayload packet = new Packet250CustomPayload(Info.PACKET_CHANNEL, bytes.toByteArray());
    packet.isChunkDataPacket = true;
    return packet;
  }
View Full Code Here

Examples of net.minecraft.network.packet.Packet250CustomPayload

      return;
    }
    String id;
    int size;
    if (packet instanceof Packet250CustomPayload) {
      Packet250CustomPayload packet250CustomPayload = (Packet250CustomPayload) packet;
      byte[] data = packet250CustomPayload.data;
      size = data == null ? 0 : data.length;
      id = packet250CustomPayload.channel + (size > 0 ? Byte.toString(data[0]) : Byte.MIN_VALUE);
    } else {
      id = String.valueOf(packet.getPacketId());
View Full Code Here

Examples of net.minecraft.src.Packet250CustomPayload

   *
   * @param channel the channel name
   * @param data the data array
   */
  public void sendCustomPacket(String channel, byte[] data) {
    sendPacket(new Packet250CustomPayload(channel, data));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.