Search in sources :

Example 1 with LPItemDuct

use of logisticspipes.proxy.td.LPItemDuct in project LogisticsPipes by RS485.

the class TDPart method getInternalDuctForSide.

@Override
public TileEntity getInternalDuctForSide(ForgeDirection opposite) {
    if (opposite.ordinal() < 6) {
        LPItemDuct duct = thermalDynamicsDucts[opposite.ordinal()];
        if (duct == null) {
            duct = thermalDynamicsDucts[opposite.ordinal()] = new LPItemDuct(pipe, opposite);
            if (MainProxy.isServer(pipe.getWorldObj())) {
                TickHandler.addMultiBlockToCalculate(duct);
            }
            duct.setWorldObj(pipe.getWorldObj());
            duct.xCoord = pipe.xCoord;
            duct.yCoord = pipe.yCoord;
            duct.zCoord = pipe.zCoord;
            duct.validate();
            DoubleCoordinates pos = CoordinateUtils.add(new DoubleCoordinates((TileEntity) pipe), opposite);
            duct.onNeighborTileChange(pos.getXInt(), pos.getYInt(), pos.getZInt());
        }
        return duct;
    }
    return null;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) LPItemDuct(logisticspipes.proxy.td.LPItemDuct) DoubleCoordinates(network.rs485.logisticspipes.world.DoubleCoordinates)

Aggregations

LPItemDuct (logisticspipes.proxy.td.LPItemDuct)1 TileEntity (net.minecraft.tileentity.TileEntity)1 DoubleCoordinates (network.rs485.logisticspipes.world.DoubleCoordinates)1