Posted April 20, 20223 yr 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.
April 20, 20223 yr Author 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
April 20, 20223 yr Author 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
April 20, 20223 yr Author 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 April 20, 20223 yr by DX12
April 20, 20223 yr Author 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
April 21, 20223 yr Author @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
April 21, 20223 yr Author Nevermind I Used The Topic I Created For The 1.17.1 code and it works on 1.16.5 Topic I Used
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.