Search in sources :

Example 96 with LogisticsTileGenericPipe

use of logisticspipes.pipes.basic.LogisticsTileGenericPipe in project LogisticsPipes by RS485.

the class HUDStartWatchingPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.world);
    if (pipe == null) {
        return;
    }
    if (pipe.pipe instanceof IWatchingHandler) {
        IWatchingHandler handler = (IWatchingHandler) pipe.pipe;
        handler.playerStartWatching(player, getInteger());
    }
}
Also used : LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) IWatchingHandler(logisticspipes.interfaces.IWatchingHandler)

Example 97 with LogisticsTileGenericPipe

use of logisticspipes.pipes.basic.LogisticsTileGenericPipe in project LogisticsPipes by RS485.

the class PipeSolidSideCheck method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = this.getPipe(player.world, LTGPCompletionCheck.PIPE);
    pipe.renderState.checkForRenderUpdate(player.world, pipe.getPos());
}
Also used : LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe)

Example 98 with LogisticsTileGenericPipe

use of logisticspipes.pipes.basic.LogisticsTileGenericPipe in project LogisticsPipes by RS485.

the class PipeDebugLogResponse method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe tile = this.getPipe(player.getEntityWorld());
    if (tile != null) {
        ((CoreRoutedPipe) tile.pipe).debug.openForPlayer(player);
        player.sendMessage(new TextComponentString("Debug log enabled."));
    }
}
Also used : LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) TextComponentString(net.minecraft.util.text.TextComponentString)

Example 99 with LogisticsTileGenericPipe

use of logisticspipes.pipes.basic.LogisticsTileGenericPipe in project LogisticsPipes by RS485.

the class InvSysConResistance method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    if (MainProxy.isClient(player.world)) {
        final LogisticsTileGenericPipe pipe = this.getPipe(player.world);
        if (pipe == null) {
            return;
        }
        if (pipe.pipe instanceof PipeItemsInvSysConnector) {
            PipeItemsInvSysConnector invCon = (PipeItemsInvSysConnector) pipe.pipe;
            invCon.resistance = getInteger();
        }
    } else {
        final LogisticsTileGenericPipe pipe = this.getPipe(player.world);
        if (pipe == null) {
            return;
        }
        if (pipe.pipe instanceof PipeItemsInvSysConnector) {
            PipeItemsInvSysConnector invCon = (PipeItemsInvSysConnector) pipe.pipe;
            invCon.resistance = getInteger();
            invCon.getRouter().update(true, invCon);
        }
    }
}
Also used : PipeItemsInvSysConnector(logisticspipes.pipes.PipeItemsInvSysConnector) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe)

Example 100 with LogisticsTileGenericPipe

use of logisticspipes.pipes.basic.LogisticsTileGenericPipe in project LogisticsPipes by RS485.

the class ItemAmountSignUpdatePacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
    if (pipe == null || !pipe.isInitialized()) {
        return;
    }
    IPipeSign sign = ((CoreRoutedPipe) pipe.pipe).getPipeSign(EnumFacing.getFront(getInteger()));
    if (sign == null) {
        return;
    }
    ((ItemAmountPipeSign) sign).amount = getInteger2();
    ((ItemAmountPipeSign) sign).itemTypeInv.setInventorySlotContents(0, stack);
}
Also used : IPipeSign(logisticspipes.pipes.signs.IPipeSign) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) CoreRoutedPipe(logisticspipes.pipes.basic.CoreRoutedPipe)

Aggregations

LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)115 CoreRoutedPipe (logisticspipes.pipes.basic.CoreRoutedPipe)47 TileEntity (net.minecraft.tileentity.TileEntity)45 DoubleCoordinates (network.rs485.logisticspipes.world.DoubleCoordinates)21 EnumFacing (net.minecraft.util.EnumFacing)15 ArrayList (java.util.ArrayList)14 List (java.util.List)12 EntityPlayer (net.minecraft.entity.player.EntityPlayer)10 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)10 BlockPos (net.minecraft.util.math.BlockPos)10 World (net.minecraft.world.World)9 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)9 HashMap (java.util.HashMap)8 LinkedList (java.util.LinkedList)8 PipeBlockRequestTable (logisticspipes.pipes.PipeBlockRequestTable)8 LogisticsPowerJunctionTileEntity (logisticspipes.blocks.powertile.LogisticsPowerJunctionTileEntity)7 MainProxy (logisticspipes.proxy.MainProxy)7 ExitRoute (logisticspipes.routing.ExitRoute)7 PipeLogisticsChassi (logisticspipes.pipes.PipeLogisticsChassi)6 SimpleServiceLocator (logisticspipes.proxy.SimpleServiceLocator)6