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

[Feature]: Replacement based armor negation #158

Open
Jackiecrazy opened this issue Sep 6, 2023 · 0 comments
Open

[Feature]: Replacement based armor negation #158

Jackiecrazy opened this issue Sep 6, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Jackiecrazy
Copy link

Jackiecrazy commented Sep 6, 2023

What?

This is partially a bug report, but it appears to be a cross-mod conflict and I cannot determine the source. My armor values when transformed occasionally revert to their pre-transformation state. I'm guessing some mod is regularly refreshing all the attribute values, but I can't tell who. I do have a suggestion on how to mitigate this sort of unexpected occurrence, though.
Create a dummy item that wraps around the armor item. On tick the dummy item checks if it is still equipped and if its wielder is still a werewolf, and if not, unwraps itself into the original armor piece. The dummy item drops a custom ItemEntity that also unwraps itself.

Mod experience

I think it's the only consistent way to completely remove the armor, if that's what you're going for. It handles all attributes, including ones potentially added by other mods, because it physically replaces the armor piece with something that also safely unwraps afterwards. There are several cases where this may lead to inconsistent behavior (such as not inheriting fire immunity from netherite gear when dropped), but these are not favorable to the player, and thus I don't think anyone will actually go out of their way to do something like it.

Contributions

I did something similar in Taoism once to suppress the offhand item while wielding a two-handed weapon. The code is old, but I haven't had any complaints from my users with this logic. Dungeons Gear also used the same system (which I also authored) for a while.

@Jackiecrazy Jackiecrazy added the enhancement New feature or request label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant