mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
Mechanical Pipe rendering adjustments. Couldn't be bothered to make 100 different models in blender. Maybe I'll write a python script to do it for me. Might make a bigger version of the shaped in/out model to better fit the mechanical pipe.
This commit is contained in:
1 parent
4ab61c856f
commit
a05afb68e9
1 file changed
+14
-3
@@ -293,7 +293,7 @@ public class RenderPartTransmitter implements IIconRegister
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
{
|
||||
if(pipe.getConnectionType(side) != ConnectionType.NONE && PartTransmitter.connectionMapContainsSide(pipe.getAllCurrentConnections(), side))
|
||||
if(pipe.getConnectionType(side) == ConnectionType.NORMAL)
|
||||
{
|
||||
DisplayInteger[] displayLists = getListAndRender(side, fluid);
|
||||
|
||||
@@ -309,6 +309,13 @@ public class RenderPartTransmitter implements IIconRegister
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(pipe.getConnectionType(side) != ConnectionType.NONE) {
|
||||
GL11.glCullFace(GL11.GL_FRONT);
|
||||
CCRenderState.startDrawing(7);
|
||||
renderFluidInOut(side, pipe);
|
||||
CCRenderState.draw();
|
||||
GL11.glCullFace(GL11.GL_BACK);
|
||||
}
|
||||
}
|
||||
|
||||
DisplayInteger[] displayLists = getListAndRender(ForgeDirection.UNKNOWN, fluid);
|
||||
@@ -528,14 +535,18 @@ public class RenderPartTransmitter implements IIconRegister
|
||||
public void renderEnergySide(ForgeDirection side, PartUniversalCable cable)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
boolean connected = PartTransmitter.connectionMapContainsSide(cable.getAllCurrentConnections(), side);
|
||||
renderTransparency(MekanismRenderer.energyIcon, cable.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, cable.currentPower));
|
||||
}
|
||||
|
||||
public void renderFluidInOut(ForgeDirection side, PartMechanicalPipe pipe)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(pipe.getTransmitterNetwork().refFluid.getIcon(), pipe.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, pipe.currentScale));
|
||||
}
|
||||
|
||||
public void renderGasSide(ForgeDirection side, PartPressurizedTube tube)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
boolean connected = PartTransmitter.connectionMapContainsSide(tube.getAllCurrentConnections(), side);
|
||||
renderTransparency(tube.getTransmitterNetwork().refGas.getIcon(), tube.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, tube.currentScale));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user