Search in sources :

Example 1 with DummyWorldProvider

use of logisticspipes.utils.DummyWorldProvider in project LogisticsPipes by RS485.

the class ModuleInHandGuiProvider method getLogisticsModule.

public final LogisticsModule getLogisticsModule(EntityPlayer player) {
    ItemStack item = player.inventory.mainInventory[invSlot];
    if (item == null) {
        return null;
    }
    LogisticsModule module = LogisticsPipes.ModuleItem.getModuleForItem(item, null, new DummyWorldProvider(player.getEntityWorld()), null);
    module.registerPosition(ModulePositionType.IN_HAND, invSlot);
    ItemModuleInformationManager.readInformation(item, module);
    return module;
}
Also used : DummyWorldProvider(logisticspipes.utils.DummyWorldProvider) LogisticsModule(logisticspipes.modules.abstractmodules.LogisticsModule) ItemStack(net.minecraft.item.ItemStack)

Aggregations

LogisticsModule (logisticspipes.modules.abstractmodules.LogisticsModule)1 DummyWorldProvider (logisticspipes.utils.DummyWorldProvider)1 ItemStack (net.minecraft.item.ItemStack)1