Package net.minecraft.network.play.client

Examples of net.minecraft.network.play.client.C17PacketCustomPayload


         WECUI_CHANNEL.register(new WECUIPacketHandler());
    }

    @SubscribeEvent
    public void onPacketData(ServerCustomPacketEvent event) {
        C17PacketCustomPayload rawPacket = (C17PacketCustomPayload) event.packet.toC17Packet();
        if (event.packet.channel().equals(ForgeWorldEdit.CUI_PLUGIN_CHANNEL)) {
            EntityPlayerMP player = getPlayerFromEvent(event);
            LocalSession session = ForgeWorldEdit.inst.getSession((EntityPlayerMP) player);

            if (session.hasCUISupport()) {
                return;
            }
       
            String text = new String(rawPacket.func_149558_e(), UTF_8_CHARSET);
            session.handleCUIInitializationMessage(text);
        }
    }
View Full Code Here


  protected void keyTyped(char c, int i)
  {
    if(itemNameField.textboxKeyTyped(c, i))
    {
      repairContainer.updateItemName(itemNameField.getText());
      mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("MC|ItemName", itemNameField.getText().getBytes()));
    }
    else {
      super.keyTyped(c, i);
    }
  }
View Full Code Here

      itemNameField.setEnabled(itemstack != null);

      if(itemstack != null)
      {
        repairContainer.updateItemName(itemNameField.getText());
        mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("MC|ItemName", itemNameField.getText().getBytes(Charsets.UTF_8)));
      }
    }
  }
View Full Code Here

        if (slot != null && slot.getHasStack() && !slot.getStack().hasDisplayName() && s.equals(slot.getStack().getDisplayName()))
            s = "";

        this.repairContainer.updateItemName(s);
        this.mc.thePlayer.sendQueue.addToSendQueue(new C17PacketCustomPayload("MC|ItemName", s.getBytes()));
    }
View Full Code Here

    {
        return netHandler;
    }
    public Packet toC17Packet()
    {
        return new C17PacketCustomPayload(channel, payload.array());
    }
View Full Code Here

TOP

Related Classes of net.minecraft.network.play.client.C17PacketCustomPayload

Copyright © 2018 www.massapicom. 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.