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
Add an API to allow mods to adjust breast behavior when armor is worn #17
Add an API to allow mods to adjust breast behavior when armor is worn #17
Conversation
Default armor resistance values I'd recommend This depends on whether or not 1 is equal to NO resistance (full motion), and 0 is full resistance: Maybe change Gold armor as well to something other than zero just to switch it up? Tightness Comment Regarding "tightness", are you referencing how "tight" around the breasts the armor is (like scaling the armor breasts)? I don't see a problem with adding this personally. For example, it could be tighter for leather armor or something with a similar material. Breathing animation TODO yeah, the breathing animation could play if the value is <= 0.5 or something. Would have to see it working properly to make a definitive answer. Will add onto this PR comments section if I find anything else worth mentioning. |
I was initially thinking 0 is no resistance and 1 is full resistance (but I can just flip the numbers you gave). In regards to tightness I was more thinking something similar to say how sports bras act in that they basically push the breasts against you further so they end up appearing smaller or something (though I am unsure how to best implement this math wise). And I will mess around a bit with the breathing animation's todo then to see what looks reasonable as a rough cutoff point. |
…a armors and make breathing only happen below a certain physics threshold. Also fix having accidentally broken rendering of left breast when wearing armor that lets you see the breast such as chainmail
Okay, I made a few changes and it seems to be working decently now (I also fixed a bug I found that I introduced in an earlier PR by accident in relation to rendering of the left breast when wearing things like chainmail)l. I still need to go ahead and make the docs in |
If you don't know how to implement the tightness thing then I'd just say hold off for now. It wouldn't be a super important thing. I don't know the best way to implement it either honestly |
Sounds good, I probably will experiment with it a little later today as I have a couple ideas how it might work and if not then I will just remove the comments I put on it, fixup the docs on the API side of things and mark this PR as ready for review. |
Okay, I think this is basically ready for review. Only thing we may want to adjust is tightness of values and stuff for vanilla armor. I added some tightness to leather and a tiny bit to chainmail but I can remove those if you wish or change how they are done. One other thing I noticed but didn't change as I am not sure it is a bug or not, is in |
I don't see any problems with this PR in terms of the API stuff, do you think I should merge it or wait for any other changes (if you had anything planned)? Oh, and I looked into the breast sizes for armor, this is the correct format. |
Should it be 17 for the initial setting as well (and then remove the secondary updating of it)? And you can go ahead and merge this unless you want me to make the change you mentioned to 17 myself. I do have one more set of changes planned in relation to config data validation, but that is a bit out of scope of this PR so I likely will open one for that tomorrow. |
The initial setting of it is already 17 for me, but yeah I noticed that recalculating that on armor resize isn't necessary, only the resizing of the actual breasts need to be recalculated. I'll merge and fix it in my own commit. EDIT: I lied, I forget I changed the initial setting to test it. facepalms |
…he port but it's overall complete.
Exposed an API to allow mods to tweak various settings when their armor is being worn. See
IGenderArmor
javadocs for detailsChanges:
Additionally this PR also does a little minor cleanup to
GenderLayer
:breathingAnimation
to before any calculation of it is done (to avoid having to calculate that stuff) and also making it so that the check for being able to breathe under water using mojang's util method to check effects to avoid having to update it if they add more and also making it so that if the player's head is in a bubble column it counts as them being able to breathe (as that increases a player's breath)instanceof ElytraItem
check as a class cannot be both aninstanceof ArmorItem
and aninstanceof ElytraItem