public void displayGUIBrewingStand(TileEntityBrewingStand tileentitybrewingstand) {
   getNextWidowId();
   playerNetServerHandler.sendPacket(
       new Packet100OpenWindow(
           currentWindowId,
           5,
           tileentitybrewingstand.getInvName(),
           tileentitybrewingstand.getSizeInventory()));
   currentCraftingInventory = new ContainerBrewingStand(inventory, tileentitybrewingstand);
   currentCraftingInventory.windowId = currentWindowId;
   currentCraftingInventory.onCraftGuiOpened(this);
 }
  /** Updates crafting matrix; called from onCraftMatrixChanged. Args: none */
  public void updateCraftingResults() {
    super.updateCraftingResults();

    for (int i = 0; i < crafters.size(); i++) {
      ICrafting icrafting = (ICrafting) crafters.get(i);

      if (brewTime != tileBrewingStand.getBrewTime()) {
        icrafting.updateCraftingInventoryInfo(this, 0, tileBrewingStand.getBrewTime());
      }
    }

    brewTime = tileBrewingStand.getBrewTime();
  }
Ejemplo n.º 3
0
 /** Displays the GUI for interacting with a brewing stand. */
 public void displayGUIBrewingStand(TileEntityBrewingStand par1TileEntityBrewingStand) {
   this.incrementWindowID();
   this.playerNetServerHandler.sendPacketToPlayer(
       new Packet100OpenWindow(
           this.currentWindowId,
           5,
           par1TileEntityBrewingStand.getInvName(),
           par1TileEntityBrewingStand.getSizeInventory(),
           par1TileEntityBrewingStand.isInvNameLocalized()));
   this.openContainer = new ContainerBrewingStand(this.inventory, par1TileEntityBrewingStand);
   this.openContainer.windowId = this.currentWindowId;
   this.openContainer.addCraftingToCrafters(this);
 }
 public boolean canInteractWith(EntityPlayer par1EntityPlayer) {
   return tileBrewingStand.isUseableByPlayer(par1EntityPlayer);
 }
 public void updateProgressBar(int par1, int par2) {
   if (par1 == 0) {
     tileBrewingStand.setBrewTime(par2);
   }
 }