use of cofh.repack.codechicken.lib.render.uv.IconTransformation in project LogisticsPipes by RS485.
the class ThermalDynamicsProxy method renderPipeConnections.
@Override
@SideOnly(Side.CLIENT)
public void renderPipeConnections(LogisticsTileGenericPipe pipeTile, RenderBlocks renderer) {
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
if (pipeTile.renderState.pipeConnectionMatrix.isTDConnected(dir)) {
IconTransformation texture = connectionTextureBasic;
if (pipeTile.renderState.textureMatrix.isRouted()) {
if (pipeTile.renderState.textureMatrix.isRoutedInDir(dir)) {
texture = connectionTextureActive;
} else {
texture = connectionTextureInactive;
}
}
double move = 0.25;
Translation localTranslation = new Translation(pipeTile.xCoord + 0.5D + dir.offsetX * move, pipeTile.yCoord + 0.5D + dir.offsetY * move, pipeTile.zCoord + 0.5D + dir.offsetZ * move);
RenderDuct.modelConnection[2][dir.ordinal()].render(new CCRenderState.IVertexOperation[] { localTranslation, texture });
}
}
}
use of cofh.repack.codechicken.lib.render.uv.IconTransformation in project LogisticsPipes by RS485.
the class ThermalDynamicsProxy method registerTextures.
@Override
public void registerTextures(IIconRegister iconRegister) {
if (connectionTextureBasic == null) {
connectionTextureBasic = new IconTransformation(iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Basic"));
connectionTextureActive = new IconTransformation(iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Active"));
connectionTextureInactive = new IconTransformation(iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Inactive"));
} else {
connectionTextureBasic.icon = iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Basic");
connectionTextureActive.icon = iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Active");
connectionTextureInactive.icon = iconRegister.registerIcon("logisticspipes:" + "pipes/ThermalDynamicsConnection-Inactive");
}
}
Aggregations