MineColonies

MineColonies

65M Downloads

Can't remove default recipe from crafters, it get added back and overflow max recipes

pwaksman973 opened this issue · 12 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest MineColonies Version?

  • I am running the latest beta/release version of MineColonies for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

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.

What were you playing at the time? Were you able to reproduce it in both settings?

  • Single Player
  • Multi Player

Minecraft Version

1.21

MineColonies Version

minecolonies-1.1.1143-1.21.1-snapshot

Structurize Version

structurize-1.0.787-1.21.1-snapshot

Related Mods and their Versions

No response

Current Behavior

Removing a default recipe from any crafter, it will instantly be added back after making any change on the crafter.

Image

In this case, I removed the first 3 recipes, then I added one I needed, once I back to the crafting list, it not only the recipe I added but all first 3 as well, ending with 31/30 recipes.

I believe it does that even if it is not maxed out, the removed default recipe is always added back

Expected Behavior

Removed default recipe from that crafter should not be added back upon updating the crafting list.

Reproduction Steps

Get any crafter that have default recipes like (Fletcher, Stonemason, etc).
In this case I'm using the Stonemason.

Max out the recipes it can learn (10/10, 30/30, whatever research level allows).

Once maxed out, on the crafting list, remove one of the default recipes, then click on add, and add another recipe that isn't the default and is also not in the list.

Go back to the recip list, the default recipe will be back in the list and the count will have pass the max.

Logs

https://gist.github.com/pwaksman973/f0cb7aa1b8ff9d2b948fc4360d99b55b

Anything else?

No response

Footer


Viewers

  • Add a 👍 reaction to the bug report if you are also affected. This helps the bug report become more visible without cluttering the comments.
  • ⚠️ Only add a comment if you have new insights or background information not already mentioned. Off-topic or "+1" comments will be deleted to keep the discussion focused.
commented

I don’t believe it is intended you can remove those. That is why disable has been added

commented

Disabling them should now not count towards the limit anymore, that PR was finally merged #10235

commented

@uecasm can we do sth like adding a flag so that the remove option doesn't show?

commented

We know when something was auto added right, can disable the remove button then, or at least gray it out

commented

We know when something was auto added right, can disable the remove button then, or at least gray it out

We don't know, we would need to add a flag on loading them

commented

I mean technically we do right, since something is responsible for auto adding them, so when that happens you set a flag to true within the recipe that it can't be removed

commented

Yes, the auto adding place can load a flag for them. The recipes themselves don't know it atm

commented

Wouldn't be simpler to just add the recipes once on the first time the hut is build, and never touch then again? The player can always re-add whatever he removed, no extra logic on the ui to hide/show/disable and recipe counting.

commented

The player can always re-add whatever he removed, no extra logic on the ui to hide/show/disable and recipe counting.

This is impossible because these recipes come from a datapack, they are custom recipes, not vanilla crafting recipes.

commented

can we do sth like adding a flag so that the remove option doesn't show?

We could (they're easy to detect) but it is sometimes helpful to be able to remove a recipe manually if something got corrupted and it needs to be reset. If we removed that option then the only way out would be to remove/replace the entire building, which also loses other recipes you might have wanted to keep.

The recipes themselves don't know it atm

They do.

commented

We could (they're easy to detect) but it is sometimes helpful to be able to remove a recipe manually if something got corrupted and it needs to be reset.

Would it make sense to make it a reset button instead? Or would that be too confusing?

commented

Yeah, maybe we store in it the file name id , so you can just reload it.