Package thaumic.tinkerer.common.block.tile

Examples of thaumic.tinkerer.common.block.tile.TileEnchanter


    return true;
  }

  @Override
  public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {
    TileEnchanter enchanter = (TileEnchanter) par1World.getTileEntity(par2, par3, par4);

    if (enchanter != null) {
      for (int j1 = 0; j1 < enchanter.getSizeInventory(); ++j1) {
        ItemStack itemstack = enchanter.getStackInSlot(j1);

        if (itemstack != null) {
          float f = random.nextFloat() * 0.8F + 0.1F;
          float f1 = random.nextFloat() * 0.8F + 0.1F;
          EntityItem entityitem;
View Full Code Here


    return false;
  }

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

  ItemWandRenderer wandRenderer = new ItemWandRenderer();

  @Override
  public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float partTicks) {
    TileEnchanter enchanter = (TileEnchanter) tileentity;

    GL11.glPushMatrix();
    GL11.glTranslated(d0, d1 + 0.75, d2);

    ItemStack item = enchanter.getStackInSlot(0);
    if (item != null) {
      GL11.glPushMatrix();
      GL11.glRotatef(90F, 1F, 0F, 0F);
      final float scale = 0.7F;
      GL11.glScalef(scale, scale, scale);
      GL11.glTranslatef(0.6F, -0.2F, 0F);
      GL11.glRotatef(30F, 0F, 0F, 1F);

      ClientHelper.minecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);

      int renderPass = 0;
      do {
        IIcon icon = item.getItem().getIcon(item, renderPass);
        if (icon != null) {
          Color color = new Color(item.getItem().getColorFromItemStack(item, renderPass));
          GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
          float f = icon.getMinU();
          float f1 = icon.getMaxU();
          float f2 = icon.getMinV();
          float f3 = icon.getMaxV();
          ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
          GL11.glColor3f(1F, 1F, 1F);
        }
        renderPass++;
      } while (renderPass < item.getItem().getRenderPasses(item.getItemDamage()));
      GL11.glPopMatrix();
    }

    item = enchanter.getStackInSlot(1);
    if (item != null) {
      GL11.glPushMatrix();
      GL11.glRotatef(90F, 1F, 0F, 0F);
      final float scale = 0.5F;
      GL11.glScalef(scale, scale, scale);
View Full Code Here

TOP

Related Classes of thaumic.tinkerer.common.block.tile.TileEnchanter

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.