Search in sources :

Example 1 with PipeTransportLogistics

use of logisticspipes.transport.PipeTransportLogistics in project LogisticsPipes by RS485.

the class LogisticsRenderPipe method renderTileEntityAt.

@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partialTickTime) {
    double distance = Math.pow(Minecraft.getMinecraft().thePlayer.lastTickPosX - tileentity.xCoord, 2) + Math.pow(Minecraft.getMinecraft().thePlayer.lastTickPosY - tileentity.yCoord, 2) + Math.pow(Minecraft.getMinecraft().thePlayer.lastTickPosZ - tileentity.zCoord, 2);
    if (tileentity instanceof LogisticsTileGenericPipe) {
        LogisticsTileGenericPipe pipe = ((LogisticsTileGenericPipe) tileentity);
        if (pipe.pipe == null) {
            return;
        }
        if (pipe.pipe instanceof CoreRoutedPipe) {
            renderPipeSigns((CoreRoutedPipe) pipe.pipe, x, y, z, partialTickTime);
        }
        if (LogisticsRenderPipe.config.isUseNewRenderer()) {
            LogisticsRenderPipe.secondRenderer.renderTileEntityAt((LogisticsTileGenericPipe) tileentity, x, y, z, partialTickTime, distance);
        }
        if (LogisticsRenderPipe.config.getRenderPipeContentDistance() * LogisticsRenderPipe.config.getRenderPipeContentDistance() < distance) {
            return;
        }
        bcRenderer.renderWires(pipe, x, y, z);
        // dynamically render pluggables (like gates)
        bcRenderer.dynamicRenderPluggables(pipe, x, y, z);
        if (!pipe.isOpaque()) {
            if (pipe.pipe.transport instanceof PipeFluidTransportLogistics) {
                renderFluids(pipe.pipe, x, y, z);
            }
            if (pipe.pipe.transport instanceof PipeTransportLogistics) {
                renderSolids(pipe.pipe, x, y, z, partialTickTime);
            }
        }
    }
}
Also used : PipeFluidTransportLogistics(logisticspipes.transport.PipeFluidTransportLogistics) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) CoreRoutedPipe(logisticspipes.pipes.basic.CoreRoutedPipe) PipeTransportLogistics(logisticspipes.transport.PipeTransportLogistics)

Aggregations

CoreRoutedPipe (logisticspipes.pipes.basic.CoreRoutedPipe)1 LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)1 PipeFluidTransportLogistics (logisticspipes.transport.PipeFluidTransportLogistics)1 PipeTransportLogistics (logisticspipes.transport.PipeTransportLogistics)1