
The "Builder Modes" research option should not consume enchanted diamond axes
zen-crab opened this issue ยท 17 comments
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
1.1.939-1.21.1alpha
Structurize Version
1.0.778-1.21.1
Related Mods and their Versions
No response
Current Behavior
When starting the "Builder Modes" research option in the university, diamond axes with enchantments can be consumed.
Expected Behavior
Enchanted items, which are often items a player has spend a lot of time and experience crafting, should not be consumed by the university.
Reproduction Steps
- do thing
- bad thing happen
- cry
Logs
.
Anything else?
No response
Footer
Viewers
- 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.
This might be standard vanilla behavior, not controlled by the mod. I have had to put away all of my "good" stuff for years to avoid using my enchanted item for something else. And I don't mind the enchanted item being used (even use them deliberately sometimes) when it's a broken bow with Curse of Vanishing that I can use to make a rally banner, for instance. I'm interested in what others know.
Much sympathy, by the way, for your loss. Depending on the work done, it can definitely feel horrible.
yep; afaik it is also intentional so you don't have to have a pristine brand new item for the costs (you can give them ones that are worn out etc.)
I'll warn you now, any item that can be taken might be. Visitor hiring. Bows or shields for research. Leave your good stuff in a chest before you proceed. Like Shadizar said above, it's a trade off so you can use items with different nbt than expected. I'd like to say you'll only have it happen once because you learnt the lesson, but I have done it more than I care to admit!
An enchanted diamond tool is still a diamond tool as far as the game is concerned. When we try to grab the respective items from your inventory we simply look for the first match of said item, and remove it.
There is a little meta to it, like where exactly you put the tool in your inventory compared to the other tool, but that is highly unpredictable.
It's actually pretty well-defined. It will search the hotbar left to right, then the main inventory left to right & top to bottom. First matching item is taken.
We could perhaps make it less likely to take fancy enchanted tools by just making it search in the reverse order. Though it will still do it if the fancy tool is the only one you have.
I mean, left to right hotbar is exactly where my best fancy tools are. So, at minimum, reversing the search would help, since people who don't know about the issue will be less likely to lose things that way?
Would it be reasonable to skip enchanted items unless an enchantment is called for by the research?
We could do a find all matches and pick the "lowest". It's just for direct player interactions so performance in that context is not super important as it is one offs.
And lowest durability among ones which score equivalent based on enchantments?
The research actually can't request a specific enchantment, it only supports base items (and tags); you can't request specific itemstack properties.
And it does already scan and report all matching slots, because it sometimes needs to consume more than one slot of items when the cost is larger than the stack size.
Ah, then we could try to do sth like smallest enchant, or, at least, more generically smallest serialized size or so.
It's actually pretty well-defined.
Being well-defined in the code is different than being well-defined in the minds of players. The game just taking items from our inventories is not expected. We are usually in strict control of what leaves our inventory. Even when doing trades with villagers, there are slots where the items are placed.
The first time this happened, I didn't even realize it had happened. I honestly thought I either must have broken my axe without realizing it when using ftb ultimine or accidentally deposited it into a random chest.
It wasn't until two days later when a friend told me that the university took their enchanted axe that I connected the dots to my lost axe.
What I don't understand is why there needs to be any logic for the game to figure out the "correct axe" to consume. The university block has an inventory, so why cant the mechanic be that the item must be in the university's inventory?
The university block has an inventory, so why cant the mechanic be that the item must be in the university's inventory?
This would be an excellent solution for the player - many people have asked many times. I can not remember if, or why it doesn't happen now though