예제 #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);
                }
              }));
    }
  }
예제 #2
0
 @Override
 public boolean setName(ItemStack stack, String name) {
   saveLabel(stack, name);
   return true;
 }