mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
83 lines
2.7 KiB
Java
83 lines
2.7 KiB
Java
package com.hbm.crafting;
|
|
|
|
import com.hbm.items.ModItems;
|
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.init.Items;
|
|
import net.minecraft.item.Item;
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
/**
|
|
* Wrappers for common recipe schemes
|
|
* @author hbm
|
|
*/
|
|
public class RecipesCommon {
|
|
|
|
//Decompress one item into nine
|
|
public static void add1To9(Block one, Item nine) {
|
|
add1To9(new ItemStack(one), new ItemStack(nine, 9));
|
|
}
|
|
|
|
public static void add1To9(Item one, Item nine) {
|
|
add1To9(new ItemStack(one), new ItemStack(nine, 9));
|
|
}
|
|
|
|
public static void add1To9(ItemStack one, ItemStack nine) {
|
|
GameRegistry.addRecipe(nine, new Object[] { "#", '#', one });
|
|
}
|
|
|
|
//Compress nine items into one
|
|
public static void add9To1(Item nine, Block one) {
|
|
add9To1(new ItemStack(nine), new ItemStack(one));
|
|
}
|
|
|
|
public static void add9To1(Item nine, Item one) {
|
|
add9To1(new ItemStack(nine), new ItemStack(one));
|
|
}
|
|
|
|
public static void add9To1(ItemStack nine, ItemStack one) {
|
|
GameRegistry.addRecipe(one, new Object[] { "###", "###", "###", '#', nine });
|
|
}
|
|
|
|
//Fill rods with 6 nuggets
|
|
public static void addRod(Item nugget, Item out) {
|
|
GameRegistry.addShapelessRecipe(new ItemStack(out), new Object[] { ModItems.rod_empty, nugget, nugget, nugget, nugget, nugget, nugget });
|
|
}
|
|
|
|
//Fill rods with 12 nuggets
|
|
public static void addDualRod(Item ingot, Item nugget, Item out) {
|
|
GameRegistry.addShapelessRecipe(new ItemStack(out), new Object[] { ModItems.rod_dual_empty, ingot, nugget, nugget, nugget });
|
|
}
|
|
|
|
//Fill rods with 24 nuggets
|
|
public static void addQuadRod(Item ingot, Item nugget, Item out) {
|
|
GameRegistry.addShapelessRecipe(new ItemStack(out), new Object[] { ModItems.rod_quad_empty, ingot, ingot, nugget, nugget, nugget, nugget, nugget, nugget });
|
|
}
|
|
|
|
//Sword
|
|
public static void addSword(Item ingot, Item sword) {
|
|
GameRegistry.addRecipe(new ItemStack(sword), new Object[] { "I", "I", "S", 'I', ingot, 'S', Items.stick });
|
|
}
|
|
|
|
//Pickaxe
|
|
public static void addPickaxe(Item ingot, Item pick) {
|
|
GameRegistry.addRecipe(new ItemStack(pick), new Object[] { "III", " S ", " S ", 'I', ingot, 'S', Items.stick });
|
|
}
|
|
|
|
//Axe
|
|
public static void addAxe(Item ingot, Item axe) {
|
|
GameRegistry.addRecipe(new ItemStack(axe), new Object[] { "II", "IS", " S", 'I', ingot, 'S', Items.stick });
|
|
}
|
|
|
|
//Shovel
|
|
public static void addShovel(Item ingot, Item shovel) {
|
|
GameRegistry.addRecipe(new ItemStack(shovel), new Object[] { "I", "S", "S", 'I', ingot, 'S', Items.stick });
|
|
}
|
|
|
|
//Hoe
|
|
public static void addHoe(Item ingot, Item hoe) {
|
|
GameRegistry.addRecipe(new ItemStack(hoe), new Object[] { "II", " S", " S", 'I', ingot, 'S', Items.stick });
|
|
}
|
|
}
|