MineColonies

MineColonies

65M Downloads

Does not wear Tinkers armor' Construct

Gerpus 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.20

MineColonies Version

1.20.1-1.1.789

Structurize Version

1.20,1-1.0.763

Related Mods and their Versions

Tinkers' Construct 3.9.0.6 for 1.20.1

Current Behavior

I wanted to give the guardian armor and weapons from the Tinkers mod' Construct, I checked in JEI, it shows that you can give from level 0, but by trying to give or put on the armor from Tinkers yourself' Construct she wasn't wearing it.

Image

Weapons from Tinkers' For some reason, Construct is not even displayed in JEI as a weapon for the guardian.

Expected Behavior

The guardian must wear armor

Reproduction Steps

1)Download mods
2)Take the armor
3)Give the armor to the guardian

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

I wanted to ask, is this error caused on the MineColonies side or on the Tinkers Construct side or you still haven't figured it out?

commented

Neither. Their armor doesn't implement the default minecraft things for it. So a special compat is necessary.

commented

what "default minecraft things" does it not implement? It extends the vanilla class and adds all the armor behavior using attributes.

commented

is it instance of ArmorItem?

commented
commented
commented

You check a lot more than that, apparently you use the armor material to determine the armor quality instead of asking the stack, so no NBT sensitive armor values. Will just report a bunch of 0s for us: https://github.com/ldtteam/minecolonies/blob/version/main/src/main/java/com/minecolonies/api/util/ItemStackUtils.java#L270

Not sure what conditions based on that, but its a place to start debugging this.

commented
commented

fetching armor values from an item stack requires calling the method that gets the map of attribute modifiers, ItemStack#getAttributeModifiers. Though that might be a pain to iterate the same way as armor material given you don't know all 4 item instances in a set.

If that is not whats keeping them from wearing the armor I'm not sure what is; you probably have a better idea in your codebase. Just know anything that you fetch from ArmorMaterial is unreliable on NBT based armor, so if you use that anywhere in filtering its likely the cause.

commented

I still haven't gotten weapons to work fully on monsters like zombies. They can use the attributes, but not all modifier hooks. Some of those Mojang hardcoded to only work from players, some are my own custom logic. So I wouldn't worry about it too much.

commented

Weapons we cannot fix, as this is a whole different problem, we need to re-enable our compatibility for this.
As it took a very long time for Tinkers to update, it's possible this may find it's way back slowly or not at all.

commented

I wanted to ask, can you fix the mistake that prevented colonists from using weapons from the Tinkers Construct mod?