fix: Allow craft chains to have no output - #690
Conversation
Fixes GTNewHorizons/GT-New-Horizons-Modpack#20504 There were multiple instances where the item amounts or multipliers were forced up so that even if the items amounts outside crafting mode were zero, the crafting mode was showing at least one craft performed. It had other implications such as requiring two CTRL + scroll up instead of one to reach 2 output items Auto crafting is not affected, since the auto crafter finds 0 items to craft, nothing is done
|
isn't this a duplicate of #682 ? |
|
this PR doesn't make sense after #682 |
|
Hello, I agree, both PRs have the same goals but they don't share the same strategy. This PR removes the work that should not have been done in the first place I also observed why this shift was done. As one adds a favorite crafting chain, all intermediate recipes are requested for one more iteration and therefore growing the amounts of base items recursively. This is yet another bug to fix. |
It's not a problem. It was intended that way. the player very rarely needs to add a recipe without a quantity. and i wanted to reduce the number of buttons for frequently used behavior |
it doesn't behave as it was originally intended In 682 i fixed behavior when one scroll change multiplier from 0 to 2 GTNewHorizons/GT-New-Horizons-Modpack#20459 I don't deny that I could have missed some behavior that you thought of. If there is something, please give an example. Otherwise, this PR breaks the basic behavior that was originally intended. |
|
Here we have 2 opposing visions. I should point out that crafting mode and non-craft mode do not reconcile very well with the strategy from #682 .
I am biased toward my solution not because I wrote it, but this is something I extensively use for instance with motors as they are also ingredients themselves or when working with multiple tiers of circuits. This is a QoL feature we are losing from 2.7 . Maybe you have a bigger strategy in mind that would resolve this dissonance between crafting and non-crafting modes and I'd be happy to learn about it. Also, I do agree 100% that #690 creates a regression when importing a favorite crafting chain. That's a new feature I didn't extensively use yet and I overlooked it in my manual tests. I had a quick look at how it's written and I agree the current state does not intent to add a non-zero copy of a craft, which is against #690 strategy. |
|
@grimly, Your version initially requires you to add recipes without a quantity or scroll through the intermediate recipes before turning on the chain, and if you turn off the chain, you have to scroll through all the recipes again by one. This breaks the usual behavior of players. If I understand correct, you use recipes without a quantity. If so, I could revert the Shift + Ctrl + A shortcut back, and then we will have the behavior that was in version 2.7.4. |
|
if i split |
|
My version does not require you any action on intermediate recipes, it's just that the favorite recipe import was not adapted. I since added changes to it and you can test my latest commit. The behavior of 2.7 is back: you press CTRL if you want the amount or you have it with zero amounts. Going in or out crafting mode had to preserve some meaning between the two and my idea I expect to preserve from 2.7 is that you find your results only in non crafting mode and it computes all your steps in crafting mode. I also remembered doing this that CTRL+A had this meaning already of preserving the amounts. Useful for multiblocks btw. I didn't push it but I like the amount selector (bottom right) that defaults to a stack and how the ALT modifier was also linked to it. My idea for using an integer rather than a boolean is that maybe we could extend the idea on recipe import. Basically :
The bookmark panel is a really nice piece of work that has meaning to all actions down to even the modifier keys like I described. I am surprised you want to tear that down unless you have a new vision and logic that I cannot grasp. I also do not find a reason for the non-crafting mode in your version. |
|
The basic functionality was that people first add recipes with quantities to understand how many ingredients are needed to craft a recipe and only then, if they want, turn on the crafting chain to calculate dependencies. Your changes break this basic principle: players will have to reduce the amount of "Iron Ingot", "Oak Wood Planks", and "Redstone" each time they turn on the chains, and add it back when they turn them off. This is a significant change that was not in version 2.7.4.
Your idea has a right to exist, but players are used to it and it is more intuitive for them when they see the number of ingredients in the off state, and when the chain is turned on, the algorithm ignores recipes with a multiplier x1, except root recipes. When I made this functionality I tested it on players over a long period of time to understand how it would be convenient for the majority. I don't think it's worth changing. P.S. |
This is a continuation of the restauration of a zero output recipe on the bookmark panel. The previous commit introduced an issue, most visible on importing a favorite crafting chain, where ingredients would accumulate recursively through the crafting chain. The API is left open for more recipe iterations, attempts should be made to test the user experience of adding a recipe 64 times or for a set amount through ALT+CTRL combo. SHIFT+A adds a recipe zero times (2.7 behavior) SHIFT+CTRL+A adds a recipe one time (2.7 behavior) Same behavior is followed by the favorite icon but only the leading recipe may have an amount
|
I'll stay respectful and discard my PR. I thank you for how this mod added so much value to GTNH and wish you good luck. |


















Fixes GTNewHorizons/GT-New-Horizons-Modpack#20504
There were multiple instances where the item amounts or multipliers were forced up so that even if the items amounts outside crafting mode were zero, the crafting mode was showing at least one craft performed. It had other implications such as requiring two CTRL + scroll up instead of one to reach 2 output items
Auto crafting is not affected, since the auto crafter finds 0 items to craft, nothing is done