Exemplo n.º 1
0
  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);
                }
              }));
    }
  }