Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,9 @@ public void postInit(FMLPostInitializationEvent event) {
if (CookingConfig.moduleGrectech5U && !Loader.isModLoaded("gregapi_post")) {
event.buildSoftDependProxy("gregtech", "net.blay09.mods.cookingforblockheads.compat.GregTech5UAddon");
}
if (CookingConfig.moduleIC2) {
event.buildSoftDependProxy("IC2", "net.blay09.mods.cookingforblockheads.compat.IC2Addon");
}
}

public void loadComplete(FMLLoadCompleteEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class CookingConfig {
public static boolean moduleJabba;
public static boolean moduleDreamcraft;
public static boolean moduleGrectech5U;
public static boolean moduleIC2;
public static boolean usePamsToast;

public static boolean gregtech5uLoaded;
Expand Down Expand Up @@ -97,6 +98,7 @@ public static void load(File configFile) {
moduleJabba = config.getBoolean("Jabba", "modules", true, "Jabba");
moduleDreamcraft = config.getBoolean("Dreamcraft", "modules", true, "Dreamcraft");
moduleGrectech5U = config.getBoolean("Gregtech5U", "modules", true, "Gregtech5U");
moduleIC2 = config.getBoolean("IC2", "modules", true, "IndustrialCraft2");
usePamsToast = config.getBoolean(
"Use Pam's Toast",
"modules",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void craftingComplete() {}
private static final ItemStack[] ADDITIONAL_RECIPES = new ItemStack[] {
GTOreDictUnificator.get(OrePrefixes.dust, Materials.MeatRaw, 1L),
GTOreDictUnificator.get(OrePrefixes.dust, Materials.MeatCooked, 1L),
GameRegistry.findItemStack("IC2", "itemCofeePowder", 1), };
GTOreDictUnificator.get(OrePrefixes.dust, Materials.Coffee, 1L), };

private static final short[] META_TOOLS = new short[] { (short) IDMetaTool01.HARDHAMMER.ID,
(short) IDMetaTool01.SOFTMALLET.ID, (short) IDMetaTool01.KNIFE.ID, (short) IDMetaTool01.BUTCHERYKNIFE.ID,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package net.blay09.mods.cookingforblockheads.compat;

import net.blay09.mods.cookingforblockheads.CookingConfig;
import net.blay09.mods.cookingforblockheads.api.event.FoodRegistryInitEvent;
import net.minecraftforge.common.MinecraftForge;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;

public class IC2Addon {

public IC2Addon() {
MinecraftForge.EVENT_BUS.register(this);
}

@SubscribeEvent
public void onFoodRegistryInit(FoodRegistryInitEvent event) {
// abort early since gt5u also add the ore dict for this.
if (CookingConfig.gregtech5uLoaded) return;
event.registerNonFoodRecipe(GameRegistry.findItemStack("IC2", "itemCofeePowder", 1));
}
}