예제 #1
0
 @Overridepublic
 void updateScreen() {
   super.updateScreen();
   ItemStack held = player.getCurrentEquippedItem();
   if (held == null || !(held.getItem() instanceof IChiselItem)) {
     player.closeScreen();
   }
   boolean flag = false;
   /**
    * for(int c = 0; c < container.inventory.activeVariations; c++) {ItemStack stack =
    * container.inventory.getStackInSlot(c);if(stack.getItem() != null) {if (stack.getItem()
    * instanceof ItemCarvable) {BlockCarvable block = (BlockCarvable)
    * Block.getBlockFromItem(stack.getItem());if
    * (block.carverHelper.getVariation(stack.getItemDamage()).getType().equals(TextureType.CTMH)||
    * block.carverHelper.getVariation(stack.getItemDamage()).getType().equals(TextureType.CTMX)||
    * block.carverHelper.getVariation(stack.getItemDamage()).getType().equals(TextureType.CTMV))
    * {flag = true;}} else if(stack.getItem() instanceof ICarvable) {ICarvable block = (ICarvable)
    * Block.getBlockFromItem(stack.getItem());if
    * (block.getManager(stack.getItemDamage()).getType().equals(TextureType.CTMH)||
    * block.getManager(stack.getItemDamage()).getType().equals(TextureType.CTMX)||
    * block.getManager(stack.getItemDamage()).getType().equals(TextureType.CTMV)) {flag = true;}}if
    * (flag) {GuiDraw.drawTexturedModalRect(container.getSlot(c).xDisplayPosition,
    * container.getSlot(c).yDisplayPosition, 48, 202, 18, 18);}}}
    */
 }
예제 #2
0
 public void updateScreen() {
   super.updateScreen();
   Minecraft mc = Minecraft.getMinecraft();
   MerchantRecipeList merchantrecipelist = this.theIMerchant.getRecipes(mc.thePlayer);
   if (merchantrecipelist != null) {
     this.nextRecipeButtonIndex.enabled = this.currentRecipeIndex < merchantrecipelist.size() - 1;
     this.previousRecipeButtonIndex.enabled = this.currentRecipeIndex > 0;
   }
 }
예제 #3
0
  /** Called from the main game loop to update the screen. */
  @Override
  public void updateScreen() {
    super.updateScreen();
    MerchantRecipeList var1 = this.recordList;

    if (var1 != null) {
      this.nextRecipeButtonIndex.enabled = this.currentRecipeIndex < var1.size() - 1;
      this.previousRecipeButtonIndex.enabled = this.currentRecipeIndex > 0;
    }
  }
  @Override
  public void updateScreen() {
    super.updateScreen();

    MerchantRecipeList merchantrecipelist = this.villager.getRecipes(this.mc.thePlayer);
    if (merchantrecipelist != null) {
      this.nextRecipeButtonIndex.enabled =
          this.currentRecipeIndex < (merchantrecipelist.size() - 1);
      this.previousRecipeButtonIndex.enabled = this.currentRecipeIndex > 0;
    }
    this.currentRecipeIndex = this.villager.getTradeIndex();
  }
예제 #5
0
  @Override
  public void updateScreen() {
    super.updateScreen();

    prevButton.visible = nextButton.visible = container.isRecipes();
  }
예제 #6
0
 @Override
 public void updateScreen() {
   super.updateScreen();
   if (textboxHeat != null) textboxHeat.updateCursorCounter();
 }
예제 #7
0
 @Override
 public void updateScreen() {
   super.updateScreen();
   this.initSetActiveSeedButtons();
   this.initSeedSlots();
 }
예제 #8
0
 @Override
 public void updateScreen() {
   super.updateScreen();
   this.textBoxFilter.updateCursorCounter();
 }
예제 #9
0
 /** Called from the main game loop to update the screen. */
 @Override
 public void updateScreen() {
   super.updateScreen();
   func_147068_g();
 }
예제 #10
0
  /** Called from the main game loop to update the screen. */
  public void updateScreen() {
    super.updateScreen();

    if (this.field_147027_y && this.field_147024_w.func_145998_l() >= 0) {
      this.field_147027_y = false;
      int var2;
      int var3;
      int var4;
      int var5;
      GuiBeacon.PowerButton var6;

      for (int var1 = 0; var1 <= 2; ++var1) {
        var2 = TileEntityBeacon.field_146009_a[var1].length;
        var3 = var2 * 22 + (var2 - 1) * 2;

        for (var4 = 0; var4 < var2; ++var4) {
          var5 = TileEntityBeacon.field_146009_a[var1][var4].id;
          var6 =
              new GuiBeacon.PowerButton(
                  var1 << 8 | var5,
                  this.field_147003_i + 76 + var4 * 24 - var3 / 2,
                  this.field_147009_r + 22 + var1 * 25,
                  var5,
                  var1);
          this.buttonList.add(var6);

          if (var1 >= this.field_147024_w.func_145998_l()) {
            var6.enabled = false;
          } else if (var5 == this.field_147024_w.func_146007_j()) {
            var6.func_146140_b(true);
          }
        }
      }

      byte var7 = 3;
      var2 = TileEntityBeacon.field_146009_a[var7].length + 1;
      var3 = var2 * 22 + (var2 - 1) * 2;

      for (var4 = 0; var4 < var2 - 1; ++var4) {
        var5 = TileEntityBeacon.field_146009_a[var7][var4].id;
        var6 =
            new GuiBeacon.PowerButton(
                var7 << 8 | var5,
                this.field_147003_i + 167 + var4 * 24 - var3 / 2,
                this.field_147009_r + 47,
                var5,
                var7);
        this.buttonList.add(var6);

        if (var7 >= this.field_147024_w.func_145998_l()) {
          var6.enabled = false;
        } else if (var5 == this.field_147024_w.func_146006_k()) {
          var6.func_146140_b(true);
        }
      }

      if (this.field_147024_w.func_146007_j() > 0) {
        GuiBeacon.PowerButton var8 =
            new GuiBeacon.PowerButton(
                var7 << 8 | this.field_147024_w.func_146007_j(),
                this.field_147003_i + 167 + (var2 - 1) * 24 - var3 / 2,
                this.field_147009_r + 47,
                this.field_147024_w.func_146007_j(),
                var7);
        this.buttonList.add(var8);

        if (var7 >= this.field_147024_w.func_145998_l()) {
          var8.enabled = false;
        } else if (this.field_147024_w.func_146007_j() == this.field_147024_w.func_146006_k()) {
          var8.func_146140_b(true);
        }
      }
    }

    this.field_147028_x.enabled =
        this.field_147024_w.getStackInSlot(0) != null && this.field_147024_w.func_146007_j() > 0;
  }