Search in sources :

Example 1 with CPacketCustomPayload

use of net.minecraft.network.play.client.CPacketCustomPayload in project Railcraft by Railcraft.

the class GuiAnvil method func_135015_g.

private void func_135015_g() {
    String s = itemNameField.getText();
    Slot slot = repairContainer.getSlot(0);
    if (slot != null && slot.getHasStack() && !slot.getStack().hasDisplayName() && s.equals(slot.getStack().getDisplayName()))
        s = "";
    repairContainer.updateItemName(s);
    mc.thePlayer.connection.sendPacket(new CPacketCustomPayload("MC|ItemName", (new PacketBuffer(Unpooled.buffer())).writeString(s)));
}
Also used : CPacketCustomPayload(net.minecraft.network.play.client.CPacketCustomPayload) PacketBuffer(net.minecraft.network.PacketBuffer)

Aggregations

PacketBuffer (net.minecraft.network.PacketBuffer)1 CPacketCustomPayload (net.minecraft.network.play.client.CPacketCustomPayload)1