More fixes for projector
parent
3cf364e9ce
commit
44be1ac9cb
|
@ -30,8 +30,13 @@ public class BlockProjectorRenderer implements IBlockRenderer<BlockProjector> {
|
|||
|
||||
@Override
|
||||
public void renderInventoryBlock(BlockProjector block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
// Block.getRenderBlockPass causes this be false, but only in some codepaths
|
||||
final boolean depthMaskState = GL11.glGetBoolean(GL11.GL_DEPTH_WRITEMASK);
|
||||
if (!depthMaskState)
|
||||
GL11.glDepthMask(true);
|
||||
|
||||
RenderUtils.renderInventoryBlock(renderer, block, 0);
|
||||
|
||||
if (block.shouldRenderTesrInInventory()) {
|
||||
|
@ -41,6 +46,8 @@ public class BlockProjectorRenderer implements IBlockRenderer<BlockProjector> {
|
|||
TileEntityRendererDispatcher.instance.renderTileEntityAt(renderTe, -0.5, -0.5, -0.5, 0.0F);
|
||||
}
|
||||
|
||||
if (!depthMaskState)
|
||||
GL11.glDepthMask(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,4 +77,9 @@ public class BlockProjector extends OpenBlock {
|
|||
public boolean canRenderInPass(int pass) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue