Search in sources :

Example 6 with ModuleProvider

use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.

the class ProviderModuleGuiProvider method getClientGui.

@Override
public Object getClientGui(EntityPlayer player) {
    ModuleProvider module = this.getLogisticsModule(player.getEntityWorld(), ModuleProvider.class);
    if (module == null) {
        return null;
    }
    module.setFilterExcluded(exclude);
    module.setExtractionMode(extractorMode);
    module.setSneakyDirection(sneakyOrientation);
    module.setIsActive(isActive);
    return new logisticspipes.gui.modules.GuiProvider(player.inventory, module);
}
Also used : ModuleCoordinatesGuiProvider(logisticspipes.network.abstractguis.ModuleCoordinatesGuiProvider) GuiProvider(logisticspipes.network.abstractguis.GuiProvider) ModuleProvider(logisticspipes.modules.ModuleProvider)

Example 7 with ModuleProvider

use of logisticspipes.modules.ModuleProvider in project LogisticsPipes by RS485.

the class ProviderModuleNextModePacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    final ModuleProvider module = this.getLogisticsModule(player, ModuleProvider.class);
    if (module == null) {
        return;
    }
    module.nextExtractionMode();
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(ProviderModuleMode.class).setMode(module.getExtractionMode().ordinal()).setModulePos(module), player);
}
Also used : ProviderModuleMode(logisticspipes.network.packets.modules.ProviderModuleMode) ModuleProvider(logisticspipes.modules.ModuleProvider)

Aggregations

ModuleProvider (logisticspipes.modules.ModuleProvider)7 GuiProvider (logisticspipes.network.abstractguis.GuiProvider)1 ModuleCoordinatesGuiProvider (logisticspipes.network.abstractguis.ModuleCoordinatesGuiProvider)1 ProviderModuleInclude (logisticspipes.network.packets.modules.ProviderModuleInclude)1 ProviderModuleMode (logisticspipes.network.packets.modules.ProviderModuleMode)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1