Exemplo n.º 1
0
  private void renderPassWorld(
      int pass,
      BlockBuildCraft block,
      int meta,
      RenderBlocks renderer,
      IBlockAccess world,
      int x,
      int y,
      int z) {
    if (block.isRotatable()) {
      renderer.uvRotateTop = Y_ROTATE[block.getFrontSide(meta) - 2];
      renderer.uvRotateBottom = Y_ROTATE[block.getFrontSide(meta) - 2];
    }

    double pDouble = (pass > 0 ? 1 : 0) / 512.0;
    renderer.setRenderBounds(
        block.getBlockBoundsMinX() - pDouble,
        block.getBlockBoundsMinY() - pDouble,
        block.getBlockBoundsMinZ() - pDouble,
        block.getBlockBoundsMaxX() + pDouble,
        block.getBlockBoundsMaxY() + pDouble,
        block.getBlockBoundsMaxZ() + pDouble);

    renderer.renderStandardBlock(block, x, y, z);

    renderer.uvRotateTop = 0;
    renderer.uvRotateBottom = 0;
  }
Exemplo n.º 2
0
  private void renderPassInventory(
      int pass, BlockBuildCraft block, int meta, RenderBlocks renderer) {
    if (block.isRotatable()) {
      renderer.uvRotateTop = Y_ROTATE[block.getFrontSide(meta) - 2];
      renderer.uvRotateBottom = Y_ROTATE[block.getFrontSide(meta) - 2];
    }

    RenderUtils.drawBlockItem(renderer, Tessellator.instance, block, meta);

    renderer.uvRotateTop = 0;
    renderer.uvRotateBottom = 0;
  }