Пример #1
0
 /**
  * To be called on each tick when a menu is open. Handles the GUI additions and the middle
  * clicking.
  *
  * @param guiScreen
  */
 public void onTickInGUI(apn guiScreen) {
   synchronized (this) {
     handleMiddleClick(guiScreen); // Called before the rest to be able to trigger config reload
     if (!onTick()) {
       return;
     }
     if (isTimeForPolling()) {
       unlockKeysIfNecessary();
     }
     handleGUILayout(guiScreen);
     handleShortcuts(guiScreen);
   }
 }
Пример #2
0
  /**
   * To be called on each tick when a menu is open. Handles the GUI additions and the middle
   * clicking.
   *
   * @param aue
   */
  public void onTickInGUI(aue guiScreen) {
    synchronized (this) {
      handleMiddleClick(guiScreen); // Called before the rest to be able to trigger config reload
      if (!onTick()) {
        return;
      }
      if (isTimeForPolling()) {
        unlockKeysIfNecessary();
      }
      handleGUILayout(guiScreen);
      handleShortcuts(guiScreen);

      // Copy some info about current selected stack for auto-refill
      um currentStack = getFocusedStack();
      storedStackId = (currentStack == null) ? 0 : getItemID(currentStack);
      storedStackDamage = (currentStack == null) ? 0 : getItemDamage(currentStack);
    }
  }