Search in sources :

Example 1 with EnergyStatementProvider

use of buildcraft.energy.statements.EnergyStatementProvider in project BuildCraft by BuildCraft.

the class BuildCraftEnergy method init.

@Mod.EventHandler
public void init(FMLInitializationEvent evt) {
    channels = NetworkRegistry.INSTANCE.newChannel(DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new ChannelHandler(), new PacketHandler());
    NetworkRegistry.INSTANCE.registerGuiHandler(instance, new EnergyGuiHandler());
    StatementManager.registerTriggerProvider(new EnergyStatementProvider());
    if (BuildCraftCore.loadDefaultRecipes) {
        loadRecipes();
    }
    reloadConfig(RestartRequirement.GAME);
    BuildcraftRecipeRegistry.refinery.addRecipe("buildcraft:fuel", new FluidStack(oil.fluid, 1), new FluidStack(fuel.fluid, 1), 120, 1);
    double fuelOilMultiplier = BuildCraftCore.mainConfigManager.get("general", "fuel.oil.combustion").getDouble();
    double fuelFuelMultiplier = BuildCraftCore.mainConfigManager.get("general", "fuel.fuel.combustion").getDouble();
    int fuelOilEnergyOutput = BuildCraftCore.mainConfigManager.get("general", "fuel.oil.combustion.energyOutput").getInt();
    int fuelFuelEnergyOutput = BuildCraftCore.mainConfigManager.get("general", "fuel.fuel.combustion.energyOutput").getInt();
    if (!Loader.isModLoaded("BuildCraft|Factory")) {
        BuildcraftFuelRegistry.fuel.addFuel(oil.fluid, fuelOilEnergyOutput, (int) (5000 * fuelOilMultiplier));
        BuildcraftFuelRegistry.fuel.addFuel(fuel.fluid, fuelFuelEnergyOutput, (int) (25000 * fuelFuelMultiplier));
    }
    BuildcraftFuelRegistry.coolant.addCoolant(FluidRegistry.WATER, 0.0023f);
    BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.ice), StackKey.fluid(FluidRegistry.WATER), 1.5f);
    BuildcraftFuelRegistry.coolant.addSolidCoolant(StackKey.stack(Blocks.packed_ice), StackKey.fluid(FluidRegistry.WATER), 2.0f);
    EnergyProxy.proxy.registerBlockRenderers();
    EnergyProxy.proxy.registerTileEntities();
    engineAchievement2 = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|energy:achievement.stirlingEngine", "engineAchievement2", 3, -2, new ItemStack(BuildCraftCore.engineBlock, 1, 1), BuildCraftCore.engineRedstoneAchievement));
    engineAchievement3 = BuildCraftCore.achievementManager.registerAchievement(new Achievement("buildcraft|energy:achievement.combustionEngine", "engineAchievement3", 5, -2, new ItemStack(BuildCraftCore.engineBlock, 1, 2), engineAchievement2));
}
Also used : PacketHandler(buildcraft.core.lib.network.base.PacketHandler) EnergyStatementProvider(buildcraft.energy.statements.EnergyStatementProvider) FluidStack(net.minecraftforge.fluids.FluidStack) ChannelHandler(buildcraft.core.lib.network.base.ChannelHandler) Achievement(net.minecraft.stats.Achievement) ItemStack(net.minecraft.item.ItemStack)

Aggregations

ChannelHandler (buildcraft.core.lib.network.base.ChannelHandler)1 PacketHandler (buildcraft.core.lib.network.base.PacketHandler)1 EnergyStatementProvider (buildcraft.energy.statements.EnergyStatementProvider)1 ItemStack (net.minecraft.item.ItemStack)1 Achievement (net.minecraft.stats.Achievement)1 FluidStack (net.minecraftforge.fluids.FluidStack)1