Skip to content

Commit

Permalink
Merge pull request #21 from GTNewHorizons/nuke-ic2-recipes
Browse files Browse the repository at this point in the history
nuke ic2 recipe registration
  • Loading branch information
Dream-Master authored Sep 6, 2024
2 parents 36def5e + df2c7db commit 738daa9
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@

import appeng.api.AEApi;
import appeng.api.util.AEColor;
import cpw.mods.fml.common.Loader;
import ic2.api.item.IC2Items;
import ic2.api.recipe.Recipes;

public class AppengRecipes {

public static void addRecipesToRegistry() {

if (Loader.isModLoaded("dreamcraft")) {
return;
}

// AE Kit
Recipes.advRecipes.addRecipe(
new ItemStack(CrossAppeng.kitAppeng),
Expand All @@ -29,6 +34,10 @@ public static void addRecipesToRegistry() {

public static void addGregtechRecipes() {

if (Loader.isModLoaded("dreamcraft")) {
return;
}

// AE Kit
Recipes.advRecipes.addRecipe(
new ItemStack(CrossAppeng.kitAppeng),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import ic2.api.recipe.Recipes;
Expand All @@ -19,25 +20,19 @@

public class GregtechRecipes {

private static Item gtmeta1;
private static ItemStack gtComputerMonitor;
private static ItemStack gtSensor;
private static ItemStack gtEmitter;

/**
* Grabs all the nessary items/itemstacks from GT indirectly.
*
* @author xbony2
*/
public static void grabItems() {
gtmeta1 = GameRegistry.findItem("gregtech", "gt.metaitem.01");
gtComputerMonitor = new ItemStack(gtmeta1, 1, 32740);
gtSensor = new ItemStack(gtmeta1, 1, 32690);
gtEmitter = new ItemStack(gtmeta1, 1, 32680);
}

public static void addRecipes() {
GregtechRecipes.grabItems();

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());

if (Loader.isModLoaded("dreamcraft")) {
return;
}

final Item gtmeta1 = GameRegistry.findItem("gregtech", "gt.metaitem.01");
final ItemStack gtComputerMonitor = new ItemStack(gtmeta1, 1, 32740);
final ItemStack gtSensor = new ItemStack(gtmeta1, 1, 32690);
final ItemStack gtEmitter = new ItemStack(gtmeta1, 1, 32680);

Recipes.advRecipes.addRecipe(
new ItemStack(IC2NuclearControl.itemToolThermometer),
new Object[] { "BG ", "GMG", " GI", 'B', "boltIron", 'G', "plateGlass", 'M', "cellMercury", 'I',
Expand Down Expand Up @@ -245,6 +240,5 @@ public static void addRecipes() {
BlockDamages.DAMAGE_INFO_PANEL_EXTENDER),
'R', IC2NuclearControl.itemUpgrade, 'P', "plateStainlessSteel" });

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import ic2.api.item.IC2Items;
import ic2.api.recipe.Recipes;
Expand All @@ -25,6 +26,10 @@ public static void initVanilla() {
GameRegistry.registerItem(vanillaKit, "ItemVanilliaKit");
GameRegistry.registerItem(machineCard, "ItemVanillaMachineCard");

if (Loader.isModLoaded("dreamcraft")) {
return;
}

Recipes.advRecipes.addRecipe(
new ItemStack(vanillaKit),
new Object[] { "PL ", "FC ", 'P', Items.paper, 'C', "circuitBasic", 'F',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;

import cpw.mods.fml.common.Loader;
import ic2.api.item.IC2Items;
import ic2.api.recipe.Recipes;
import ic2.core.util.StackUtil;
Expand All @@ -18,6 +19,13 @@
public class RecipesNew {

public static void addRecipes() {

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());

if (Loader.isModLoaded("dreamcraft")) {
return;
}

ItemStack thermalMonitor = new ItemStack(
IC2NuclearControl.blockNuclearControlMain,
1,
Expand Down Expand Up @@ -220,6 +228,5 @@ public static void addRecipes() {
IC2Items.getItem("electronicCircuit"),
IC2NuclearControl.itemMultipleSensorLocationCard);

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;

import cpw.mods.fml.common.Loader;
import ic2.api.item.IC2Items;
import ic2.api.recipe.Recipes;
import ic2.core.util.StackUtil;
Expand All @@ -19,6 +20,13 @@ public class RecipesOld {

@Deprecated // It's not :P ~Chocohead
public static void addOldRecipes() {

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());

if (Loader.isModLoaded("dreamcraft")) {
return;
}

ItemStack thermalMonitor = new ItemStack(
IC2NuclearControl.blockNuclearControlMain,
1,
Expand Down Expand Up @@ -220,6 +228,5 @@ public static void addOldRecipes() {
new ItemStack(IC2Items.getItem("electronicCircuit").getItem(), 1),
new ItemStack(IC2NuclearControl.itemTimeCard, 1));

CraftingManager.getInstance().getRecipeList().add(new StorageArrayRecipe());
}
}

0 comments on commit 738daa9

Please sign in to comment.