[BUG] Recipe Loops in Dyer with Colored Wool
anonymous563 opened this issue ยท 8 comments
Is there an existing issue for this?
- I have searched the existing issues
Are you using the latest MineColonies Verison?
- I am running the latest alpha version of MineColonies for my Minecraft version.
Did you check on the Wiki? or ask on Discord?
- I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.
Minecraft Version
1.18
MineColonies Version
minecolonies-1.18.1-1.0.667-ALPHA
Structurize Version
structurize-1.18.1-1.0.387-RELEASE
Related Mods and their Versions
- Forge 39.0.5
- DO 1.18.1-1.0.49-ALPHA
- Multi-Piston 1.18-1.2.2-ALPHA
- BlockUI 1.18.2-0.0.47-ALPHA
- Copper Equipment
- Fast leaf decay, JEI, Journeymap, some FPS-increasers that Sam wrote, Enchantment Descriptions, Medieval Music, The One Probe, Time Control, Vanilla+ Tools (all from the 1.18.1 modpack)
Current Behavior
When my colonists request a colored wool, the dyer will make requests that loop from e.g. yellow wool --> white wool + yellow dye --> black wool wool + white dye --> white wool + black dye.
The dyer knows the recipe for yellow wool and yellow dye, but does not have any other recipes related to wool or dyes.
The "recipes" request steps all come from the dyer.
https://discord.com/channels/139070364159311872/915411448342118441/969806648359125022
Expected Behavior
I expect the dyer to request white wool and for that to be the end of the request chain since they shouldn't know recipes to make white wool.
Reproduction Steps
- Make new colony (creative mode).
- Creatively paste in a dyer (at level 5). Assign a colonist to work as the dyer.
- Teach dyer recipe for yellow wool and yellow dye from dandelion.
- Place a postbox somewhere. Request 10 yellow wool at the postbox.
Logs
pastebin.com/WillIncludeLater
Anything else?
- Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
- Add a comment if you have any insights or background information that isn't already part of the conversation.
If resources are not available, it is possible that it loops up to one time, but not further and will then be stuck at that position.
If resources are available it should not loop.
Well, you want black wool, you don't have black wool so it tries to craft black wool with the help of white wool, but you don't have white wool, so it tries to color a different wool white first, etc.
There is no way to solve this without simulating the entire tree, for now this is intended behaviour.
It would be nice if the "create white wool" recipe disabled itself if there was not sufficient coloured wool to immediately satisfy the request (such that it then can't loop back to trying to create more coloured wool). I believe (from glancing at it) that it does already check the warehouse when evaluating that recipe to choose which colour to turn white, so this shouldn't be super complicated.
Hmm. I had a bit of a go at this and it's a little trickier than first thought. It would be doable if getFirstRecipe
were passed the target count, but that isn't currently the case. And implementing the check only in getFirstFulfillableRecipe
does not appear to be sufficient to stop it attempting to use the "wrong" recipe. I'm not really sure why both of these need to exist.