Java Code Examples for net.minecraftforge.oredict.OreDictionary#registerOre()

The following examples show how to use net.minecraftforge.oredict.OreDictionary#registerOre() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BigReactors.java    From BigReactors with MIT License 6 votes vote down vote up
public static void registerTurbineParts() {
	if(BigReactors.blockTurbinePart == null) {
		BRConfig.CONFIGURATION.load();
		BigReactors.blockTurbinePart = new BlockTurbinePart(Material.iron);
		GameRegistry.registerBlock(BigReactors.blockTurbinePart, ItemBlockBigReactors.class, "BRTurbinePart");

		OreDictionary.registerOre("turbineHousing", BigReactors.blockTurbinePart.getItemStack("housing"));
		OreDictionary.registerOre("turbineController", BigReactors.blockTurbinePart.getItemStack("controller"));
		OreDictionary.registerOre("turbinePowerTap", BigReactors.blockTurbinePart.getItemStack("powerTap"));
		OreDictionary.registerOre("turbineFluidPort", BigReactors.blockTurbinePart.getItemStack("fluidPort"));
		OreDictionary.registerOre("turbineBearing", BigReactors.blockTurbinePart.getItemStack("bearing"));

		BRConfig.CONFIGURATION.save();
	}

	if(BigReactors.blockTurbineRotorPart == null) {
		BRConfig.CONFIGURATION.load();
		BigReactors.blockTurbineRotorPart = new BlockTurbineRotorPart(Material.iron);
		GameRegistry.registerBlock(BigReactors.blockTurbineRotorPart, ItemBlockBigReactors.class, "BRTurbineRotorPart");

		OreDictionary.registerOre("turbineRotorShaft", BigReactors.blockTurbineRotorPart.getItemStack("rotor"));
		OreDictionary.registerOre("turbineRotorBlade", BigReactors.blockTurbineRotorPart.getItemStack("blade"));

		BRConfig.CONFIGURATION.save();
	}
}
 
Example 2
Source File: TraverseCommon.java    From Traverse-Legacy-1-12-2 with MIT License 6 votes vote down vote up
public void init(FMLInitializationEvent event) {
	for (Block block : TraverseBlocks.oreDictNames.keySet()) {
		OreDictionary.registerOre(TraverseBlocks.oreDictNames.get(block), block);
	}
	for (TraverseWorld.TraverseBiomeEntry traverseBiome : TraverseWorld.biomeList) {
		BiomeManager.addBiome(traverseBiome.getType(), traverseBiome.getEntry());
		if (traverseBiome.hasVillages()) {
			BiomeManager.addVillageBiome(traverseBiome.getBiome(), traverseBiome.canSpawn());
		}
		if (traverseBiome.canSpawn()) {
			BiomeManager.addSpawnBiome(traverseBiome.getBiome());
		}
		BiomeProvider.allowedBiomes.add(traverseBiome.getBiome());
	}

	registerSmeltingRecipe(new ItemStack(Items.COAL, 1, 1), new ItemStack(getBlock("fir_log")), 0.15F);
	registerSmeltingRecipe(new ItemStack(getBlock("red_rock")), new ItemStack(getBlock("red_rock_cobblestone")), 0.1F);
	registerSmeltingRecipe(new ItemStack(getBlock("blue_rock")), new ItemStack(getBlock("blue_rock_cobblestone")), 0.1F);
}
 
Example 3
Source File: ItemMeta.java    From SimplyJetpacks with MIT License 6 votes vote down vote up
public ItemStack addMetaItem(int index, MetaItem item, boolean registerCustomItemStack, boolean registerOreDict) {
    if (item == null) {
        return null;
    }
    
    this.metaItems.put(index, item);
    ItemStack itemStack = new ItemStack(this, 1, index);
    
    if (index > this.highestMeta) {
        this.highestMeta = index;
    }
    
    if (registerCustomItemStack) {
        GameRegistry.registerCustomItemStack(item.name, itemStack);
    }
    if (registerOreDict) {
        OreDictionary.registerOre(item.name, itemStack);
    }
    
    return itemStack;
}
 
Example 4
Source File: Registries.java    From Ex-Aliquo with MIT License 6 votes vote down vote up
public static void registerNihiloOreDict()
{
	for (int i = 0; i < 3; i++)
	{
		OreDictionary.registerOre("oreIron", new ItemStack(getBlock(Info.ironore), 1, i));
		OreDictionary.registerOre("oreGold", new ItemStack(getBlock(Info.goldore), 1, i));
		OreDictionary.registerOre("oreCopper", new ItemStack(getBlock(Info.copperore), 1, i));
		OreDictionary.registerOre("oreTin", new ItemStack(getBlock(Info.tinore), 1, i));
		OreDictionary.registerOre("oreSilver", new ItemStack(getBlock(Info.silverore), 1, i));
		OreDictionary.registerOre("oreLead", new ItemStack(getBlock(Info.leadore), 1, i));
		OreDictionary.registerOre("oreNickel", new ItemStack(getBlock(Info.nickelore), 1, i));
		OreDictionary.registerOre("orePlatinum", new ItemStack(getBlock(Info.platinumore), 1, i));
		OreDictionary.registerOre("oreAluminum", new ItemStack(getBlock(Info.aluminumore), 1, i));
		OreDictionary.registerOre("oreAluminium", new ItemStack(getBlock(Info.aluminumore), 1, i));
	}
}
 
Example 5
Source File: Registries.java    From Ex-Aliquo with MIT License 5 votes vote down vote up
public static void registerBlocks()
{
	blockEndEye = new BlockEndEye(Configurations.blockEndEye).setUnlocalizedName("EndEye").setCreativeTab(exatab);
	GameRegistry.registerBlock(blockEndEye, "ExAliquo.EndEye");
	blockEndCake = new BlockEndCake(Configurations.blockEndCake).setUnlocalizedName("EndCake").setCreativeTab(exatab);
	GameRegistry.registerBlock(blockEndCake, "ExAliquo.EndCake");
	
	OreDictionary.registerOre("blockEnder", blockEndEye);
	
	registerOres();
}
 
Example 6
Source File: RoutiductBlocks.java    From CommunityMod with GNU Lesser General Public License v2.1 5 votes vote down vote up
public static void register(Block block, RegistryEvent.Register<Block> event, String... oreNames) {
    block.setCreativeTab(CommunityGlobals.TAB);
    event.getRegistry().register(block);
    ItemBlock itemBlock = new ItemBlock(block);
    ShootingStar.registerModel(new ModelCompound(RoutiductConstants.MOD_ID, itemBlock));
    itemBlock.setRegistryName(block.getRegistryName());
    ForgeRegistries.ITEMS.register(itemBlock);
    for (String oreName : oreNames) {
        OreDictionary.registerOre(oreName, block);
    }
}
 
Example 7
Source File: CommonProxy.java    From TFC2 with GNU General Public License v3.0 5 votes vote down vote up
protected void registerOreDictionary()
{
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogVertical, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogVertical2, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogHorizontal, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogHorizontal2, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogHorizontal3, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogNatural, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogNatural2, 1, OreDictionary.WILDCARD_VALUE));
	OreDictionary.registerOre("logWood", new ItemStack(TFCBlocks.LogNaturalPalm, 1, OreDictionary.WILDCARD_VALUE));
}
 
Example 8
Source File: BigReactors.java    From BigReactors with MIT License 5 votes vote down vote up
public static void registerDevices(int id, boolean require) {
	if(BigReactors.blockDevice == null) {
		BRConfig.CONFIGURATION.load();

		BigReactors.blockDevice = new BlockBRDevice(Material.iron);
		GameRegistry.registerBlock(BigReactors.blockDevice, ItemBlockBigReactors.class, "BRDevice");
		
		OreDictionary.registerOre("brDeviceCyaniteProcessor", ((BlockBRDevice)BigReactors.blockDevice).getCyaniteReprocessorItemStack());
		
		BRConfig.CONFIGURATION.save();
	}
}
 
Example 9
Source File: OreDictHandler.java    From NewHorizonsCoreMod with GNU General Public License v3.0 5 votes vote down vote up
private static void reg_dust(String S,ItemStack I) {
	if (I != null) {
	String p = I.getUnlocalizedName().replaceAll("item\\.","").replaceAll("Dust", "").replaceAll(" ", "").trim();
	OreDictionary.registerOre(OreDictTypes.dust.name()+p, I);
	OreDictionary.registerOre(OreDictTypes.dust.name()+S, I);
	OreDictionary.registerOre(OreDictTypes.dust.name()+OreDictTypes.Space.name(),I);
	}
}
 
Example 10
Source File: MetaItem.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
public MetaValueItem addOreDict(String oreDictName) {
    if (oreDictName == null) {
        throw new IllegalArgumentException("Cannot add null OreDictName.");
    }
    OreDictionary.registerOre(oreDictName, getStackForm());
    return this;
}
 
Example 11
Source File: OreDict.java    From Ex-Aliquo with MIT License 5 votes vote down vote up
protected static void registerExMetallurgyOreDict()
{
	for (int i = 0; i < 3; i++)
	{
		OreDictionary.registerOre("oreAdamantine", new ItemStack(Registries.adamantineOreBlock, 1, i));
		OreDictionary.registerOre("oreAlduorite", new ItemStack(Registries.alduoriteOreBlock, 1, i));
		OreDictionary.registerOre("oreAstral Silver", new ItemStack(Registries.astralsilverOreBlock, 1, i));
		OreDictionary.registerOre("oreAtlarus", new ItemStack(Registries.atlarusOreBlock, 1, i));
		OreDictionary.registerOre("oreCarmot", new ItemStack(Registries.carmotOreBlock, 1, i));
		OreDictionary.registerOre("oreCeruclase", new ItemStack(Registries.ceruclaseOreBlock, 1, i));
		OreDictionary.registerOre("oreDeep Iron", new ItemStack(Registries.deepironOreBlock, 1, i));
		OreDictionary.registerOre("oreEximite", new ItemStack(Registries.eximiteOreBlock, 1, i));
		OreDictionary.registerOre("oreIgnatius", new ItemStack(Registries.ignatiusOreBlock, 1, i));
		OreDictionary.registerOre("oreInfuscolium", new ItemStack(Registries.infuscoliumOreBlock, 1, i));
		OreDictionary.registerOre("oreKalendrite", new ItemStack(Registries.kalendriteOreBlock, 1, i));
		OreDictionary.registerOre("oreLemurite", new ItemStack(Registries.lemuriteOreBlock, 1, i));
		OreDictionary.registerOre("oreManganese", new ItemStack(Registries.manganeseOreBlock, 1, i));
		OreDictionary.registerOre("oreMeutoite", new ItemStack(Registries.meutoiteOreBlock, 1, i));
		OreDictionary.registerOre("oreMidasium", new ItemStack(Registries.midasiumOreBlock, 1, i));
		OreDictionary.registerOre("oreMithril", new ItemStack(Registries.mithrilOreBlock, 1, i));
		OreDictionary.registerOre("oreOrichalcum", new ItemStack(Registries.orichalcumOreBlock, 1, i));
		OreDictionary.registerOre("oreOureclase", new ItemStack(Registries.oureclaseOreBlock, 1, i));
		OreDictionary.registerOre("orePrometheum", new ItemStack(Registries.prometheumOreBlock, 1, i));
		OreDictionary.registerOre("oreRubracium", new ItemStack(Registries.rubraciumOreBlock, 1, i));
		OreDictionary.registerOre("oreSanguinite", new ItemStack(Registries.sanguiniteOreBlock, 1, i));
		OreDictionary.registerOre("oreShadow Iron", new ItemStack(Registries.shadowironOreBlock, 1, i));
		OreDictionary.registerOre("oreVulcanite", new ItemStack(Registries.vulcaniteOreBlock, 1, i));
		OreDictionary.registerOre("oreVyroxeres", new ItemStack(Registries.vyroxeresOreBlock, 1, i));
		OreDictionary.registerOre("oreZinc", new ItemStack(Registries.zincOreBlock, 1, i));
	}
}
 
Example 12
Source File: Recipes.java    From BaseMetals with GNU Lesser General Public License v2.1 5 votes vote down vote up
private static void initVanillaRecipes(){
	OreDictionary.registerOre("barsIron", Blocks.IRON_BARS);
	OreDictionary.registerOre("bars", Blocks.IRON_BARS);
	OreDictionary.registerOre("doorIron", Items.IRON_DOOR);
	OreDictionary.registerOre("door", Items.IRON_DOOR);
	OreDictionary.registerOre("doorWood", Items.OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("doorWood", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("doorWood", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("doorWood", Items.BIRCH_DOOR);
	OreDictionary.registerOre("doorWood", Items.ACACIA_DOOR);
	OreDictionary.registerOre("door", Items.OAK_DOOR);
	OreDictionary.registerOre("door", Items.JUNGLE_DOOR);
	OreDictionary.registerOre("door", Items.SPRUCE_DOOR);
	OreDictionary.registerOre("door", Items.DARK_OAK_DOOR);
	OreDictionary.registerOre("door", Items.BIRCH_DOOR);
	OreDictionary.registerOre("door", Items.ACACIA_DOOR);
	
	CrusherRecipeRegistry.addNewCrusherRecipe("oreIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotIron", new ItemStack(cyano.basemetals.init.Items.iron_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe("oreGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe("ingotGold", new ItemStack(cyano.basemetals.init.Items.gold_powder,1));
	GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(cyano.basemetals.init.Items.iron_nugget,9), new ItemStack(Items.IRON_INGOT)));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.IRON_INGOT), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.iron_nugget));
	GameRegistry.addSmelting(cyano.basemetals.init.Items.iron_powder, new ItemStack(Items.IRON_INGOT), 0f);
	GameRegistry.addSmelting(cyano.basemetals.init.Items.gold_powder, new ItemStack(Items.GOLD_INGOT), 0f);
	CrusherRecipeRegistry.addNewCrusherRecipe("oreCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,2));
	CrusherRecipeRegistry.addNewCrusherRecipe("blockCoal", new ItemStack(cyano.basemetals.init.Items.carbon_powder,9));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,0), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	CrusherRecipeRegistry.addNewCrusherRecipe(new ItemStack(Items.COAL,1,1), new ItemStack(cyano.basemetals.init.Items.carbon_powder,1));
	GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.COAL_BLOCK), "xxx","xxx","xxx",'x',cyano.basemetals.init.Items.carbon_powder));
}
 
Example 13
Source File: GTRecipeIterators.java    From GT-Classic with GNU Lesser General Public License v3.0 5 votes vote down vote up
/** Iterates through loaded itemstacks for all mods **/
public static void postInit() {
	createMortarRecipe();
	if (GTConfig.general.addCompressorRecipesForBlocks) {
		createUniversalProcessingRecipes();
	}
	for (Item item : Item.REGISTRY) {
		NonNullList<ItemStack> items = NonNullList.create();
		item.getSubItems(CreativeTabs.SEARCH, items);
		for (ItemStack stack : items) {
			if (GTConfig.general.oreDictWroughtIron && GTHelperStack.matchOreDict(stack, "ingotWroughtIron")
					&& !GTHelperStack.matchOreDict(stack, "ingotRefinedIron")) {
				OreDictionary.registerOre("ingotRefinedIron", stack);
			}
			if (GTHelperStack.matchOreDict(stack, "ingotAluminum")
					&& !GTHelperStack.matchOreDict(stack, "ingotAluminium")) {
				OreDictionary.registerOre("ingotAluminium", stack);
			}
			if (GTHelperStack.matchOreDict(stack, "dustAluminum")
					&& !GTHelperStack.matchOreDict(stack, "dustAluminium")) {
				OreDictionary.registerOre("dustAluminium", stack);
			}
			if (GTHelperStack.matchOreDict(stack, "ingotChromium")
					&& !GTHelperStack.matchOreDict(stack, "ingotChrome")) {
				OreDictionary.registerOre("ingotChrome", stack);
			}
		}
	}
	for (Block block : Block.REGISTRY) {
		if (block.getDefaultState().getMaterial() == Material.ROCK
				&& !GTHelperStack.oreDictStartsWith(GTMaterialGen.get(block), "ore")) {
			GTItemJackHammer.rocks.add(block);
		}
	}
	GTMod.logger.info("Jack Hammer stone list populated with " + GTItemJackHammer.rocks.size() + " entries");
}
 
Example 14
Source File: OreDictionaryIntegration.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void onNovaAdded(DictionaryEvent.Add<Item> event) {
	ItemStack nativeStack = ItemConverter.instance().toNative(event.value);
	if (!OreDictionary.getOres(event.key).stream().anyMatch(stack -> stack.isItemEqual(nativeStack))) {
		OreDictionary.registerOre(event.key, nativeStack);
	}
}
 
Example 15
Source File: OreDictDrops.java    From Ex-Aliquo with MIT License 4 votes vote down vote up
public static void CheckMetals()
{
	for (Metals metals : Metals.values())
	{
		ArrayList<ItemStack> ores = OreDictionary.getOres(metals.ore);
		if (!ores.isEmpty())
		{
			for (int i = 0; i < metals.dropgroup.length; i++)
			{
				if (metals.meta == -1)
				{
					SieveRegistry.register(metals.dropgroup[i], 0, metals.partial.itemID, i, metals.chance);
				}
				else
				{
					SieveRegistry.register(metals.dropgroup[i], 0, metals.partial.itemID, metals.meta, metals.chance);
				}
			}
			
			for (int i = 0; i < ores.size() ;i++)
			{
				if (metals.meta == -1)
				{
					HammerRegistry.registerOre(ores.get(i).itemID, ores.get(i).getItemDamage(), metals.partial.itemID, 0);
				}
				else
				{
					HammerRegistry.registerOre(ores.get(i).itemID, ores.get(i).getItemDamage(), metals.partial.itemID, metals.meta);
				}
			}
			
			if (metals.full != Block.redstoneWire)
			{
				for (int i = 0; i < metals.dropgroup.length; i++)
				{
					OreDictionary.registerOre(metals.ore, new ItemStack(metals.full,1,i));
				}
			}
		}
		
		ArrayList<ItemStack> ingots = OreDictionary.getOres(metals.ingot);
		if (metals.smeltnum > 0 && !ingots.isEmpty())
		{
			GameRegistry.addSmelting(metals.full.blockID, ingots.get(0), 3);
		}
	}
}
 
Example 16
Source File: OreDictUnifier.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
public static void registerOre(ItemStack itemStack, String oreDict) {
    if (itemStack.isEmpty()) return;
    OreDictionary.registerOre(oreDict, itemStack);
}
 
Example 17
Source File: BigReactors.java    From BigReactors with MIT License 4 votes vote down vote up
public static ItemStack registerOres(int i, boolean b) {
	BRConfig.CONFIGURATION.load();

	if (blockYelloriteOre == null) {
		blockYelloriteOre = new BlockBROre();
		GameRegistry.registerBlock(BigReactors.blockYelloriteOre, ItemBlockBigReactors.class, "YelloriteOre");
		ItemStack yelloriteStack = new ItemStack(blockYelloriteOre, 1);
		OreDictionary.registerOre("oreYellorite", yelloriteStack);
		OreDictionary.registerOre("oreYellorium", yelloriteStack); // For convenience of mods which fiddle with recipes
	}

	if(blockMetal == null) {
		blockMetal = new BlockBRMetal();
		GameRegistry.registerBlock(BigReactors.blockMetal, ItemBlockBigReactors.class, "BRMetalBlock");
		blockMetal.registerOreDictEntries();
	}

	boolean genYelloriteOre = BRConfig.CONFIGURATION.get("WorldGen", "GenerateYelloriteOre", true, "Add yellorite ore during world generation?").getBoolean(true);
	if (yelloriteOreGeneration == null && genYelloriteOre)
	{
		// Magic number: 1 = stone
		int clustersPerChunk;
		int orePerCluster;
		int maxY;
		
		clustersPerChunk = BRConfig.CONFIGURATION.get("WorldGen", "MaxYelloriteClustersPerChunk", 5, "Maximum number of clusters per chunk; will generate at least half this number, rounded down").getInt();
		orePerCluster = BRConfig.CONFIGURATION.get("WorldGen", "MaxYelloriteOrePerCluster", 10, "Maximum number of blocks to generate in each cluster; will usually generate at least half this number").getInt();
		maxY = BRConfig.CONFIGURATION.get("WorldGen", "YelloriteMaxY", 50, "Maximum height (Y coordinate) in the world to generate yellorite ore").getInt();
		int[] dimensionBlacklist = BRConfig.CONFIGURATION.get("WorldGen", "YelloriteDimensionBlacklist", new int[] {}, "Dimensions in which yellorite ore should not be generated; Nether/End automatically included").getIntList();
		
		yelloriteOreGeneration = new BRSimpleOreGenerator(blockYelloriteOre, 0, Blocks.stone,
										clustersPerChunk/2, clustersPerChunk, 4, maxY, orePerCluster);

		// Per KingLemming's request, bonus yellorite around y12. :)
		BRSimpleOreGenerator yelloriteOreGeneration2 = new BRSimpleOreGenerator(blockYelloriteOre, 0, Blocks.stone,
				1, 2, 11, 13, orePerCluster);

		if(dimensionBlacklist != null) {
			for(int dimension : dimensionBlacklist) {
				yelloriteOreGeneration.blacklistDimension(dimension);
				yelloriteOreGeneration2.blacklistDimension(dimension);
			}
		}

		BRWorldGenerator.addGenerator(BigReactors.yelloriteOreGeneration);
		BRWorldGenerator.addGenerator(yelloriteOreGeneration2);
	}
	
	BRConfig.CONFIGURATION.save();

	return new ItemStack(blockYelloriteOre);
}
 
Example 18
Source File: OreRegistrationHandler.java    From EmergingTechnology with MIT License 4 votes vote down vote up
private static void registerBlocks(Block[] blocks, String name) {
    for (Block block : blocks) {
        OreDictionary.registerOre(name, block);
    }
}
 
Example 19
Source File: OreDictionaryIntegration.java    From NOVA-Core with GNU Lesser General Public License v3.0 4 votes vote down vote up
private void onNovaAdded(DictionaryEvent.Add<Item> event) {
	ItemStack nativeStack = ItemConverter.instance().toNative(event.value);
	if (!OreDictionary.getOres(event.key).stream().anyMatch(stack -> stack.isItemEqual(nativeStack))) {
		OreDictionary.registerOre(event.key, nativeStack);
	}
}
 
Example 20
Source File: WRCoreProxy.java    From WirelessRedstone with MIT License 4 votes vote down vote up
private void addRecipies() {
    GameRegistry.addRecipe(new ItemStack(obsidianStick, 2),
            "O",
            "O",
            'O', Blocks.obsidian);

    OreDictionary.registerOre("obsidianRod", new ItemStack(obsidianStick));
    OreDictionary.registerOre("stoneBowl", new ItemStack(stoneBowl));

    GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(wirelessTransceiver),
            "r",
            "o",
            'r', retherPearl,
            'o', "obsidianRod"));

    GameRegistry.addRecipe(new ItemStack(stoneBowl),
            "S S",
            " S ",
            'S', Blocks.stone);
    GameRegistry.addRecipe(new ItemStack(retherPearl),
            "rgr",
            "gpg",
            "rgr",
            'r', Items.redstone,
            'g', Items.glowstone_dust,
            'p', Items.ender_pearl);
    GameRegistry.addRecipe(new ItemStack(retherPearl),
            "grg",
            "rpr",
            "grg",
            'r', Items.redstone,
            'g', Items.glowstone_dust,
            'p', Items.ender_pearl);
    GameRegistry.addRecipe(new ItemStack(blazeTransceiver),
            "r",
            "b",
            'r', retherPearl,
            'b', Items.blaze_rod);
    GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(recieverDish),
            "t",
            "b",
            't', wirelessTransceiver,
            'b', "stoneBowl"));
    GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(blazeRecieverDish),
            "t",
            "b",
            't', blazeTransceiver,
            'b', "stoneBowl"));
}