MineColonies

MineColonies

53M Downloads

[BUG] Recipe Loops in Dyer with Colored Wool

anonymous563 opened this issue ยท 8 comments

commented

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

  1. Forge 39.0.5
  2. DO 1.18.1-1.0.49-ALPHA
  3. Multi-Piston 1.18-1.2.2-ALPHA
  4. BlockUI 1.18.2-0.0.47-ALPHA
  5. Copper Equipment
  6. 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

image
image
image
image

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

  1. Make new colony (creative mode).
  2. Creatively paste in a dyer (at level 5). Assign a colonist to work as the dyer.
  3. Teach dyer recipe for yellow wool and yellow dye from dandelion.
  4. 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.
commented

do you have white wool available?

commented

The steps to reproduce might not be right. Here are some screenshots from my actual game. I had put a min stock of white wool in the warehouse.

image
image

Or maybe I'm derping and misreading something.

commented

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.

commented

Part of a request for black wool for banners made by a colonist:
image
image

I can't reliably reproduce this, but it only seems to happen with the dyer, but it takes so long to find this situation that I'm not sure what steps are required.

Why does it loop in the first place?

commented

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.

commented

There is no way to solve this without simulating the entire tree, for now this is intended behaviour.

commented

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.

commented

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.