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();