MineColonies

MineColonies

65M Downloads

The "Builder Modes" research option should not consume enchanted diamond axes

zen-crab opened this issue ยท 17 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

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

  1. do thing
  2. bad thing happen
  3. 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.
commented

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.

commented

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.)

commented

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!

commented

What a stupid game mechanic.

commented

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.

commented

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.

commented

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.

commented

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?

commented

Would it be reasonable to skip enchanted items unless an enchantment is called for by the research?

commented

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.

commented

Lowest, as in, unenchanted or lowest enchantment score.

commented

And lowest durability among ones which score equivalent based on enchantments?

commented

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.

commented

Ah, then we could try to do sth like smallest enchant, or, at least, more generically smallest serialized size or so.

commented

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?

commented

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

commented

That would not solve the issue for e.g. visitor recruitment costs, though. So I think this needs to be changed/made more intuitive regardless