@Override
protected void renderTileEntity(@Nonnull TilePowerMonitor te, @Nonnull IBlockState blockState, float partialTicks, int destroyStage) {
boolean isPainted = te.getPaintSource() != null;
VertexRotationFacing xform = new VertexRotationFacing(te.getFacing());
xform.setCenter(new Vector3d(0.5, 0.5, 0.5));
xform.setRotation(EnumFacing.SOUTH);
te.bindTexture();
Helper helper = threadLocalHelper.get();
BufferBuilder tes = Tessellator.getInstance().getBuffer();
tes.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL);
if (isPainted) {
helper.setupVertices(bb2, xform);
helper.renderSingleFace(tes, EnumFacing.SOUTH, 0 * px, 14 * px, 0 * px, 14 * px, xform, Helper.stdBrightness, false);
} else {
helper.setupVertices(bb1, xform);
helper.renderSingleFace(tes, EnumFacing.SOUTH, 1 * px, 15 * px, 1 * px, 15 * px, xform, Helper.stdBrightness, false);
}
Tessellator.getInstance().draw();
}