-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mortar recipes support "null" in CraftTweaker Zenscript #425
Comments
Okay, so the issue isn't so much to do with nulls, but to do with the fact that the mortar was originally only designed to support spell recipes, which are specifically recipes of 5 ingredients. It was additionally modified to support recipes with 5 ingredients that just do general crafting rather than generating a specific type of spell dust. This system was then extended to allow for processing-style recipes: you create a recipe with 1 ingredient, and it automatically creates recipes for 1, 2, 3, 4 and 5 ingredients, modifying the output accordingly (so if the original output was an itemstack with a count of 2, you would get 2, 4, 6, 8, 10 respectively). Thus, it's only really designed to cope with 5 ingredients. Obviously I'm failing to clear out nulls, as there's already code in place to specifically say "hey, it has to be 1 or 5 ingredients". I think what you're trying to do is ore duplication: 1 ore = 1.5 dust. I'm not sure how to best go implementing this code-side. It's possible that I could specify a fractional/decimal float value for the output where one ore has a 50% chance of an extra, and 2 ore has a guaranteed chance of 3, and 3 ore has a guaranteed 4 ore and a chance of 5, and so-on. I'll need to consider it further, but I'll definitely strip out nulls when checking for valid quantities of ingredients. I forgot that this was standard practice for padding in CraftTWeaker. |
Oh, thanks for your reply! |
I think I'll add an additional mortar recipe type that takes a percentage chance for additional output and quantity of potential additional output and make that available via CraftTweaker; it should resolve the majority of issues, and it can also be used to automatically create recipes with 1-2-3-4 and 5 inputs. |
Unfortunately, I'll most likely have to delay this until 3.2. |
Describe your suggestion:
Now when we write a Roots Mortar recipe like this:
It is syntax correct, but will do nothing when you put 2 copper ore into Mortar and try to grind them.
My suggestion is to make Mortar recipe adding method support "null", so that we can put any number of materials into custom recipes as inputs.
Describe alternatives you've considered:
If this is difficult for devs to do so, maybe you can just disable "null" in Mortar recipe adding method.
For example,
will throw an CraftTweaker exception and write some information into
crafttweaker.log
.The text was updated successfully, but these errors were encountered: