Jump to content

Recommended Posts

Posted

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.
 

Posted

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.