コード例 #1
0
ファイル: Item.java プロジェクト: Illarion-eV/Illarion-Java
  /**
   * Set number of stacked items.
   *
   * @param newCount the number of items on this stack, in case its more then one a text is
   *     displayed next to the item that shown how many items are on the stack
   */
  public void setCount(@Nullable ItemCount newCount) {
    count = newCount;

    // write number to text for display
    if (ItemCount.isGreaterOne(count)) {
      number = new TextTag(count.getShortText(Lang.getInstance().getLocale()), Color.YELLOW);
    } else {
      number = null;
    }
  }