Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not wear Tinkers armor' Construct #10586

Open
4 of 5 tasks
Gerpus opened this issue Jan 11, 2025 · 9 comments
Open
4 of 5 tasks

Does not wear Tinkers armor' Construct #10586

Gerpus opened this issue Jan 11, 2025 · 9 comments
Labels
Bug Gotta squash 'em all!

Comments

@Gerpus
Copy link

Gerpus commented Jan 11, 2025

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.
@Gerpus Gerpus added the Bug Gotta squash 'em all! label Jan 11, 2025
@Gerpus
Copy link
Author

Gerpus commented Jan 29, 2025

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?

@Raycoms
Copy link
Contributor

Raycoms commented Jan 29, 2025

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

@KnightMiner
Copy link

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

@Raycoms
Copy link
Contributor

Raycoms commented Jan 30, 2025

is it instance of ArmorItem?

@KnightMiner
Copy link

Yep, https://github.com/SlimeKnights/TinkersConstruct/blob/1.20.1/src/main/java/slimeknights/tconstruct/library/tools/item/armor/ModifiableArmorItem.java#L60

Though note our armor material is a dummy one as most of that is NBT controlled or ignored.

@Raycoms
Copy link
Contributor

Raycoms commented Jan 30, 2025 via email

@KnightMiner
Copy link

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.

@Raycoms
Copy link
Contributor

Raycoms commented Jan 30, 2025 via email

@KnightMiner
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Gotta squash 'em all!
Projects
None yet
Development

No branches or pull requests

3 participants