package portables.common.core; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import portables.common.items.CraftingComponent; import portables.common.items.Lock; import portables.common.items.PortableBlock; import portables.common.items.PortableItem; import portables.common.network.ServerPacketHandler; public class CommonProxy { public static int portableItemID; public static Item portableItem; public static int portableBlockID; public static Item portableBlock; public static int componentsID; public static Item components; public static int lockID; public static Item lock; public void init() { portableItem = new PortableItem(); portableBlock = new PortableBlock(); components = new CraftingComponent(); lock = new Lock(); GameRegistry.registerItem(portableItem, "portableItem"); GameRegistry.registerItem(portableBlock, "portableBlock"); GameRegistry.registerItem(components, "spComponents"); GameRegistry.registerItem(lock, "spLock"); GameRegistry.addRecipe(new ItemStack(portableItem), new Object[] { " X", " / ", "/ ", 'X', new ItemStack(components, 1, 1), '/', Items.stick }); GameRegistry.addRecipe(new ItemStack(portableBlock), new Object[] { " X", " / ", "/ ", 'X', new ItemStack(components, 1, 0), '/', Items.stick }); GameRegistry.addRecipe(new ItemStack(components, 1, 0), new Object[] { "IGI", "GDG", "IGI", 'G', Items.gold_ingot, 'I', Items.iron_ingot, 'D', new ItemStack(components, 1, 2) }); GameRegistry.addRecipe(new ItemStack(components, 1, 3), new Object[] { "BBB", "BBB", "BBB", 'B', Blocks.bookshelf }); GameRegistry.addRecipe(new ItemStack(components, 1, 2), new Object[] { " E ", "EDE", " E ", 'E', Items.ender_pearl, 'D', Items.diamond }); GameRegistry.addRecipe(new ItemStack(lock), new Object[] { " I ", "I I", "III", 'I', Items.iron_ingot }); GameRegistry.addShapelessRecipe(new ItemStack(components, 1, 1), new Object[] { Blocks.enchanting_table, Blocks.crafting_table, Blocks.ender_chest, Blocks.anvil, new ItemStack(components, 1, 2), new ItemStack(components, 1, 4), new ItemStack(components, 1, 4) }); SimplePortables.channel.register(new ServerPacketHandler()); } public void initClient() { } }