Jump to content

Recommended Posts

Posted

Hi All Im Looking for any references for a conditional recipe that relies on a config value to either allow a recipe to be used or not.

basically what I need is if config value = false then recipe doesn't work but if config value = true then recipe works.

I have tried searching for an answer but I cannot find an answer. any links or basic code is much appreciated.

Posted

a better explanation is like this

some players don't want the decorative features to the mod so they can disable the feature in the toml however I need the recipe to disable aswell to avoid major log spam

Posted

My bad about the log spam, I was thinking about an older version however I didn't disable the block in registry but once the feature is disabled the blocks can no longer be placed and to prevent accidental crafting of a non usable block I need a conditional recipe to use that will disable if the config value says false

Posted (edited)

As far as im aware you cannot disable or remove blocks from the registry if the config says false as the config loading is done after the blocks are registered. Please do correct me if im wrong.

If you need more information then I'm happy to explain further

Edited by DX12
Posted
Just now, diesieben07 said:

ICondition

Is There Any documentation about that in the src files or any example I can use as Im pretty new to these topics. Thank you for the validation about dynamic registry

Posted

@diesieben07Thank you For this, one last question. do i need to register the ICondition and serializer if so what class do i need to use to register the condition and is it under a event that i need to call it at

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.