Search in sources :

Example 1 with TileEntityItemPipe

use of gregtech.common.pipelike.itempipe.tile.TileEntityItemPipe in project GregTech by GregTechCEu.

the class CoverConveyor method setTransferRate.

protected void setTransferRate(int transferRate) {
    this.transferRate = transferRate;
    coverHolder.markDirty();
    if (coverHolder.getWorld() != null && coverHolder.getWorld().isRemote) {
        // tile at cover holder pos
        TileEntity te = coverHolder.getWorld().getTileEntity(coverHolder.getPos());
        if (te instanceof TileEntityItemPipe) {
            ((TileEntityItemPipe) te).resetTransferred();
        }
        // tile neighbour to holder pos at attached side
        te = coverHolder.getWorld().getTileEntity(coverHolder.getPos().offset(attachedSide));
        if (te instanceof TileEntityItemPipe) {
            ((TileEntityItemPipe) te).resetTransferred();
        }
    }
}
Also used : MetaTileEntity(gregtech.api.metatileentity.MetaTileEntity) TileEntity(net.minecraft.tileentity.TileEntity) TileEntityItemPipe(gregtech.common.pipelike.itempipe.tile.TileEntityItemPipe)

Aggregations

MetaTileEntity (gregtech.api.metatileentity.MetaTileEntity)1 TileEntityItemPipe (gregtech.common.pipelike.itempipe.tile.TileEntityItemPipe)1 TileEntity (net.minecraft.tileentity.TileEntity)1