Package crazypants.render

Examples of crazypants.render.CustomRenderBlocks


    Tessellator.instance.startDrawingQuads();
    Tessellator.instance.setColorOpaque_F(f, f, f);
   

    RenderUtil.bindBlockTexture();
    CustomRenderBlocks rb = new CustomRenderBlocks(te.getWorldObj());
    double scale = 0.88;
    BoundingBox pushPullBounds = BoundingBox.UNIT_CUBE.scale(scale, scale, scale);
    BoundingBox disabledBounds = BoundingBox.UNIT_CUBE.scale(1.01, 1.01, 1.01);
   
    for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      IoMode mode = trans.getIoMode(dir);
      if(mode != null) {
        if(mode == IoMode.DISABLED) {
          rb.setRenderBounds(disabledBounds.minX, disabledBounds.minY, disabledBounds.minZ,
              disabledBounds.maxX, disabledBounds.maxY, disabledBounds.maxZ);
        } else {
          rb.setRenderBounds(pushPullBounds.minX, pushPullBounds.minY, pushPullBounds.minZ,
              pushPullBounds.maxX, pushPullBounds.maxY, pushPullBounds.maxZ);     
        }
        IIcon icon = EnderIO.blockTransceiver.getOverlayIconForMode(mode);
        if(icon != null) {         
          rb.doDefaultRenderFace(dir, EnderIO.blockTransceiver, 0, 0, 0, icon);
        }
      }
    }

    Tessellator.instance.draw();
View Full Code Here

TOP

Related Classes of crazypants.render.CustomRenderBlocks

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.