示例#1
0
  @Override
  public void onGuiClosed() {
    super.onGuiClosed();

    for (GuiComponent guiComponent : getGuiComponents()) {
      guiComponent.onClose();
    }
  }
  /** Called when the screen is unloaded. Used to disable keyboard repeat events */
  public void onGuiClosed() {
    super.onGuiClosed();

    if (this.mc.thePlayer != null && this.mc.thePlayer.inventory != null) {
      this.mc.thePlayer.inventoryContainer.removeCraftingFromCrafters(this.field_147059_E);
    }

    Keyboard.enableRepeatEvents(false);
  }
  public void onGuiClosed() {

    super.onGuiClosed();

    if (this.mc.thePlayer != null) {
      for (ItemStack itemStack : this.mc.thePlayer.inventory.mainInventory) {
        if (itemStack != null) {
          if (NBTHelper.hasTag(itemStack, Strings.NBT_ITEM_TRANS_GUI_OPEN)) {
            NBTHelper.removeTag(itemStack, Strings.NBT_ITEM_TRANS_GUI_OPEN);
          }
        }
      }
    }
  }
示例#4
0
  @Override
  public void onGuiClosed() {
    super.onGuiClosed();

    if (mc.thePlayer != null) {
      for (ItemStack itemStack : mc.thePlayer.inventory.mainInventory) {
        if (itemStack != null) {
          if (NBTHelper.hasTag(itemStack, Ref.NBT.QRD_GUI_OPEN)) {
            NBTHelper.removeTag(itemStack, Ref.NBT.QRD_GUI_OPEN);
          }
        }
      }
    }
  }
  /** Called when the screen is unloaded. Used to disable keyboard repeat events */
  @Override
  public void onGuiClosed() {
    boolean madeTrade = false;

    // Check if a trade was made
    ContainerRecordTrading auxContainer = (ContainerRecordTrading) this.inventorySlots;
    if (auxContainer != null) {
      madeTrade = auxContainer.madeAnyTrade();
    }

    super.onGuiClosed();

    // Spawns particles if a trade was made.
    // TODO: better particle effects
    if (this.mc.thePlayer != null) {
      Entity auxVillager = (Entity) this.theIMerchant;
      if (auxVillager != null && madeTrade) {
        CustomRecordHelper.spawnTradeParticles(this.mc.thePlayer.worldObj, auxVillager, this.rand);
      }
    }
  }
示例#6
0
  @Override
  public void onGuiClosed() {
    super.onGuiClosed();

    Keyboard.enableRepeatEvents(false);
  }
 public void onGuiClosed ()
 {
     super.onGuiClosed();
 }
示例#8
0
 @Override
 public void onGuiClosed() {
   super.onGuiClosed();
 }
 @Override
 public void onGuiClosed() {
   updateHeat(0);
   super.onGuiClosed();
 }
 @Override
 public void onGuiClosed() {
   super.onGuiClosed();
   this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
 }
示例#11
0
 @Overridepublic
 void onGuiClosed() {
   super.onGuiClosed();
   inventorySlots.onContainerClosed(player);
 }
示例#12
0
 /** Called when the screen is unloaded. Used to disable keyboard repeat events */
 public void onGuiClosed() {
   super.onGuiClosed();
   Keyboard.enableRepeatEvents(false);
   this.container.removeCrafter(this);
 }
示例#13
0
 @Override
 public void onGuiClosed() {
   super.onGuiClosed();
   inv.learnFlag = 0;
   inv.unlearnFlag = 0;
 }