Jump to content

[1.15.2] Dynamic Recipes


Purplicious_Cow

Recommended Posts

Hello Forge friends. Long time. I'm finally updating my mods to 1.15.x (and up), and have run into an issue with one of the features in Inventory Pets, which dynamically determined which recipe set the player saw based on a config value (thereby increasing the difficulty of game by using harder to find ingredients). 

 

I see that we can no longer use the 'remove' feature from the Registry. And I see williewillus' note in his super-valuable primer that super dynamic recipes still haven't been implemented in 1.14/1.15.x (not sure if that's the same thing). 

 

The one idea I came up with was to restrict a set of recipes to be based on an advancement which is would be unlocked after checking config settings. Probably not the best experience. Am I missing another method? 

 

Thanks for any assistance. 

 

Purp

Link to comment
Share on other sites

Use the ConditionalRecipe system. You can add a condition to make it determine whether to allow based on the config, recommended you use data generators for this as the recipes are easier to create using that, especially conditional ones. However, you will need to reload the recipe datapack if you plan to change the config value on the fly during runtime.

  • Thanks 1
Link to comment
Share on other sites

47 minutes ago, ChampionAsh5357 said:

Use the ConditionalRecipe system. You can add a condition to make it determine whether to allow based on the config, recommended you use data generators for this as the recipes are easier to create using that, especially conditional ones. However, you will need to reload the recipe datapack if you plan to change the config value on the fly during runtime.

Nice! Yes, I think I can use this. Will report back if I run into issues/questions.

Link to comment
Share on other sites

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.