Search in sources :

Example 6 with LPDataInput

use of network.rs485.logisticspipes.util.LPDataInput in project LogisticsPipes by RS485.

the class ExitRoute method readRouter.

@SideOnly(Side.CLIENT)
private IRouter readRouter(LPDataInput input) {
    DoubleCoordinates pos = new DoubleCoordinates(input);
    TileEntity tile = pos.getTileEntity(MainProxy.getClientMainWorld());
    if (tile instanceof LogisticsTileGenericPipe && ((LogisticsTileGenericPipe) tile).pipe instanceof CoreRoutedPipe) {
        return ((CoreRoutedPipe) ((LogisticsTileGenericPipe) tile).pipe).getRouter();
    }
    return null;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) CoreRoutedPipe(logisticspipes.pipes.basic.CoreRoutedPipe) DoubleCoordinates(network.rs485.logisticspipes.world.DoubleCoordinates) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

List (java.util.List)3 LPDataInput (network.rs485.logisticspipes.util.LPDataInput)3 DoubleCoordinates (network.rs485.logisticspipes.world.DoubleCoordinates)3 SideOnly (cpw.mods.fml.relauncher.SideOnly)2 ArrayList (java.util.ArrayList)2 LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)2 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 Container (net.minecraft.inventory.Container)2 TileEntity (net.minecraft.tileentity.TileEntity)2 LPDataOutput (network.rs485.logisticspipes.util.LPDataOutput)2 Side (cpw.mods.fml.relauncher.Side)1 InputStream (java.io.InputStream)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Locale (java.util.Locale)1 Map (java.util.Map)1 LPConstants (logisticspipes.LPConstants)1 LogisticsWrapperHandler (logisticspipes.asm.wrapper.LogisticsWrapperHandler)1 LogisticsSolidTileEntity (logisticspipes.blocks.LogisticsSolidTileEntity)1 LogisticsStatisticsTileEntity (logisticspipes.blocks.stats.LogisticsStatisticsTileEntity)1