Hello guys,
I have written a small mod for my personal use - just some simple blocks and items, nothing much. This has been updated / upgraded for the 5th or 6th time already. Every next update was preceded by going through good deal of video tutorials, reading forums and posts on relevant forums. I have ever been greatly motivated and driven to go through next updates of my mod, so that I could run it along with current MC versions. Still, the game's version 1.12 brought me to my knees, literally. So much has been changed. I dug through this whole new code structure and most of the things that my mod has been doing previously have been achieved this way.
One thing remains unattainable to me it seems, however. Namely, I can't seem to find a way to REMOVE vanilla crafting recipes for dyes, wool of different types, panes, stained glass types - all of which require dyes in their recipes.
To be exact: I cannot make it so to prevent say a Poppy (flower)from producing a red dye, prevent a Lapis Lazuli from producing a blue dye, Dandelion flowed from producing a yellow dye, etc., etc. All I have found during my searching that resembled the code I was aiming for (or so I think) was:
@SubscribeEvent
public static void registerRecipes(RegistryEvent.Register<IRecipe> event)
{
ResourceLocation theButton = new ResourceLocation("minecraft:wooden_button");
IForgeRegistryModifiable modRegistry = (IForgeRegistryModifiable) event.getRegistry();
modRegistry.remove(theButton);
}
which works fine on blocks and items, but... not on colored wool, dyes, stained panes or glass - each requiring the meta data.
I honestly have no idea at all how to apply that: "list of items with the same ID, but different meta (eg: dye returns 16 items)".
I would like to kindly ask you for your help in that problem of mine. As I am still a beginner mod writer, I would also ask you to provide step-by-step description and/or instruction as to where I should put my code to remove those dye producing recipes.
Thank you in advance for your kind support.