Package vazkii.botania.common.block.tile

Examples of vazkii.botania.common.block.tile.TileBrewery


  public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
    GL11.glPushMatrix();
    GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
    GL11.glScalef(1.2F, 1.2F, 1.2F);
    RenderTileBrewery.rotate = false;
    TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileBrewery(), 0.0D, 0.0D, 0.0D, 0.0F);
    RenderTileBrewery.rotate = true;
    GL11.glPopMatrix();
  }
View Full Code Here


    return Blocks.cobblestone.getIcon(side, meta);
  }
 
  @Override
  public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
    TileBrewery brew = (TileBrewery) par1World.getTileEntity(par2, par3, par4);
   
    if(par5EntityPlayer.isSneaking()) {
      if(brew.recipe == null && par1World.getBlockMetadata(par2, par3, par4) == 0)
        for(int i = brew.getSizeInventory() - 1; i >= 0; i--) {
          ItemStack stackAt = brew.getStackInSlot(i);
          if(stackAt != null) {
            ItemStack copy = stackAt.copy();
            if(!par5EntityPlayer.inventory.addItemStackToInventory(copy))
              par5EntityPlayer.dropPlayerItemWithRandomChoice(copy, false);
            brew.setInventorySlotContents(i, null);
            par1World.func_147453_f(par2, par3, par4, this);
            break;
          }
        }
    } else {
      ItemStack stack = par5EntityPlayer.getCurrentEquippedItem();
      if(stack != null)
        return brew.addItem(par5EntityPlayer, stack);
    }
    return false;
  }
View Full Code Here

    return false;
  }
 
  @Override
  public TileEntity createNewTileEntity(World world, int meta) {
    return new TileBrewery();
  }
View Full Code Here

TOP

Related Classes of vazkii.botania.common.block.tile.TileBrewery

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.