float worldLight) {
super.renderEntity(conduitBundleRenderer, te, conduit, x, y, z, partialTick, worldLight);
IItemConduit pc = (IItemConduit) conduit;
for (ForgeDirection dir : conduit.getExternalConnections()) {
DyeColor inChannel = null;
DyeColor outChannel = null;
IIcon inTex = null;
IIcon outTex = null;
boolean render = true;
if(conduit.getConnectionMode(dir) == ConnectionMode.INPUT) {
inTex = pc.getTextureForInputMode();
inChannel = pc.getInputColor(dir);
} else if(conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) {
outTex = pc.getTextureForOutputMode();
outChannel = pc.getOutputColor(dir);
} else if(conduit.getConnectionMode(dir) == ConnectionMode.IN_OUT) {
inTex = pc.getTextureForInOutMode(true);
outTex = pc.getTextureForInOutMode(false);
inChannel = pc.getInputColor(dir);
outChannel = pc.getOutputColor(dir);
} else {
render = false;
}
if(render) {
Offset offset = te.getOffset(IItemConduit.class, dir);
ConnectionModeGeometry.renderModeConnector(dir, offset, pc.getTextureForInOutBackground(), true);
if(inChannel != null) {
Tessellator.instance.setColorOpaque_I(inChannel.getColor());
ConnectionModeGeometry.renderModeConnector(dir, offset, inTex, false);
}
if(outChannel != null) {
Tessellator.instance.setColorOpaque_I(outChannel.getColor());
ConnectionModeGeometry.renderModeConnector(dir, offset, outTex, false);
}
Tessellator.instance.setColorOpaque_F(1f, 1f, 1f);
}
}