add render passes to Pipe Pluggable rendering
This commit is contained in:
parent
9b857eaba7
commit
d4a060223d
3 changed files with 16 additions and 11 deletions
|
@ -19,7 +19,11 @@ public class PlugPluggable extends PipePluggable {
|
|||
private float zFightOffset = 1 / 4096.0F;
|
||||
|
||||
@Override
|
||||
public void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, ITextureStates blockStateMachine, int x, int y, int z) {
|
||||
public void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, ITextureStates blockStateMachine, int renderPass, int x, int y, int z) {
|
||||
if (renderPass != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
float[][] zeroState = new float[3][2];
|
||||
|
||||
// X START - END
|
||||
|
|
|
@ -65,7 +65,11 @@ public class RobotStationPluggable extends PipePluggable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, ITextureStates blockStateMachine, int x, int y, int z) {
|
||||
public void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, ITextureStates blockStateMachine, int renderPass, int x, int y, int z) {
|
||||
if (renderPass != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
RobotStationState state = ((RobotStationPluggable) pipePluggable).renderState;
|
||||
|
||||
//float width = 0.075F;
|
||||
|
|
|
@ -109,15 +109,12 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler {
|
|||
pipeFacadeRenderer(renderblocks, fakeBlock, state, x, y, z);
|
||||
//block.setRenderAllSides();//Start fresh
|
||||
|
||||
// Force other opaque renders into pass 0
|
||||
if (renderPass == 0) {
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (tile.hasPipePluggable(dir)) {
|
||||
PipePluggable p = tile.getPipePluggable(dir);
|
||||
IPipePluggableRenderer r = p.getRenderer();
|
||||
if (r != null) {
|
||||
r.renderPluggable(renderblocks, tile.getPipe(), dir, p, fakeBlock, x, y, z);
|
||||
}
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (tile.hasPipePluggable(dir)) {
|
||||
PipePluggable p = tile.getPipePluggable(dir);
|
||||
IPipePluggableRenderer r = p.getRenderer();
|
||||
if (r != null) {
|
||||
r.renderPluggable(renderblocks, tile.getPipe(), dir, p, fakeBlock, renderPass, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue