Search in sources :

Example 1 with ItemSoulGem

use of WayofTime.bloodmagic.item.soul.ItemSoulGem in project BloodMagic by WayofTime.

the class RegistrarBloodMagicRecipes method registerRecipes.

@SubscribeEvent
public static void registerRecipes(RegistryEvent.Register<IRecipe> event) {
    for (int i = 0; i < ItemSoulGem.names.length; i++) {
        for (EnumDemonWillType willType : EnumDemonWillType.values()) {
            ItemStack baseGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i);
            ItemStack newGemStack = new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, i);
            ((ItemSoulGem) RegistrarBloodMagicItems.SOUL_GEM).setCurrentType(willType, newGemStack);
            ShapelessOreRecipe shapeless = new ShapelessOreRecipe(new ResourceLocation(BloodMagic.MODID, "soul_gem"), newGemStack, baseGemStack, willType.getStack());
            event.getRegistry().register(shapeless.setRegistryName("soul_gem_" + willType.getName()));
        }
    }
    OreDictionary.registerOre("dustIron", ComponentTypes.SAND_IRON.getStack());
    OreDictionary.registerOre("dustGold", ComponentTypes.SAND_GOLD.getStack());
    OreDictionary.registerOre("dustCoal", ComponentTypes.SAND_COAL.getStack());
    PluginUtil.handlePluginStep(PluginUtil.RegistrationStep.RECIPE_REGISTER);
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) ShapelessOreRecipe(net.minecraftforge.oredict.ShapelessOreRecipe) ItemSoulGem(WayofTime.bloodmagic.item.soul.ItemSoulGem) EnumDemonWillType(WayofTime.bloodmagic.soul.EnumDemonWillType) ItemStack(net.minecraft.item.ItemStack) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

ItemSoulGem (WayofTime.bloodmagic.item.soul.ItemSoulGem)1 EnumDemonWillType (WayofTime.bloodmagic.soul.EnumDemonWillType)1 ItemStack (net.minecraft.item.ItemStack)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 ShapelessOreRecipe (net.minecraftforge.oredict.ShapelessOreRecipe)1