Search in sources :

Example 1 with ModuleContainer

use of binnie.core.modules.ModuleContainer in project Binnie by ForestryMC.

the class BinnieCore method preInit.

@Mod.EventHandler
public void preInit(final FMLPreInitializationEvent evt) {
    MinecraftForge.EVENT_BUS.register(Binnie.LIQUID);
    MinecraftForge.EVENT_BUS.register(ModuleManager.class);
    Binnie.CONFIGURATION.registerConfiguration(ConfigurationMods.class, this);
    for (IModuleContainer container : ForestryAPI.moduleManager.getContainers()) {
        if (!(container instanceof ModuleContainer)) {
            continue;
        }
        ((ModuleContainer) container).setupAPI();
    }
    for (FluidContainerType container : FluidContainerType.getBinnieContainers()) {
        Item item = new ItemFluidContainer(container);
        getProxy().registerItem(item);
    }
    for (CoreErrorCode errorCode : CoreErrorCode.values()) {
        ErrorStateRegistry.registerErrorState(errorCode);
    }
    super.preInit(evt);
}
Also used : Item(net.minecraft.item.Item) ItemFluidContainer(binnie.core.liquid.ItemFluidContainer) FluidContainerType(binnie.core.liquid.FluidContainerType) IModuleContainer(forestry.api.modules.IModuleContainer) IModuleContainer(forestry.api.modules.IModuleContainer) ModuleContainer(binnie.core.modules.ModuleContainer) CoreErrorCode(binnie.core.machines.errors.CoreErrorCode)

Aggregations

FluidContainerType (binnie.core.liquid.FluidContainerType)1 ItemFluidContainer (binnie.core.liquid.ItemFluidContainer)1 CoreErrorCode (binnie.core.machines.errors.CoreErrorCode)1 ModuleContainer (binnie.core.modules.ModuleContainer)1 IModuleContainer (forestry.api.modules.IModuleContainer)1 Item (net.minecraft.item.Item)1