Search in sources :

Example 1 with ILogicControllerTile

use of logisticspipes.logic.interfaces.ILogicControllerTile in project LogisticsPipes by RS485.

the class LogicControllerPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ILogicControllerTile tile = this.getTile(player.getEntityWorld(), ILogicControllerTile.class);
    if (tile == null) {
        return;
    }
    NewGuiHandler.getGui(LogicControllerGuiProvider.class).setTilePos((TileEntity) tile).open(player);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) ILogicControllerTile(logisticspipes.logic.interfaces.ILogicControllerTile)

Example 2 with ILogicControllerTile

use of logisticspipes.logic.interfaces.ILogicControllerTile in project LogisticsPipes by RS485.

the class LogicControllerGuiProvider method getContainer.

@Override
public Container getContainer(EntityPlayer player) {
    TileEntity pipe = this.getTile(player.getEntityWorld(), TileEntity.class);
    if (pipe instanceof ILogicControllerTile) {
        LogicController controller = ((ILogicControllerTile) pipe).getLogicController();
        DummyContainer dummy = new DummyContainer(player.inventory, null);
        dummy.addNormalSlotsForPlayerInventory(50, 190);
        return dummy;
    }
    return null;
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) DummyContainer(logisticspipes.utils.gui.DummyContainer) ILogicControllerTile(logisticspipes.logic.interfaces.ILogicControllerTile) LogicController(logisticspipes.logic.LogicController)

Aggregations

ILogicControllerTile (logisticspipes.logic.interfaces.ILogicControllerTile)2 TileEntity (net.minecraft.tileentity.TileEntity)2 LogicController (logisticspipes.logic.LogicController)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1