public void setLabel(final String text) { ItemList.saveLabel(player.getCurrentEquippedItem(), text); if (player.worldObj.isRemote) { BuildCraftCore.instance.sendToServer( new PacketCommand( this, "setLabel", new CommandWriter() { public void write(ByteBuf data) { NetworkUtils.writeUTF(data, text); } })); } }
@Override public boolean setName(ItemStack stack, String name) { saveLabel(stack, name); return true; }