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

Initial Port of Forge version to Fabric 1.18.2 #26

Merged
merged 5 commits into from Mar 21, 2022
Merged

Conversation

WildfireRomeo
Copy link
Owner

This port is incomplete, there are still some stuff that I need to fix before I make the update live.

  • PacketHurt stuff --- check to see if I can do what Forge is doing for female hurt sounds.
  • Fix inconsistient indents/typos.
  • Check to make everything is working properly.

@pupnewfster
Copy link
Collaborator

pupnewfster commented Mar 20, 2022

Rather than try to do what forge is doing I would just Mixin to Player#getHurtSound and adjust it there directly as it will give you better results. I didn't do so in forge given I don't actually know how to write mixins and even though I know how to write coremods I try to avoid them.

To fix formatting given you use intellij you can just do ctrl+alt+shift+L to format all files. I didn't do so on the forge branch as I didn't know if you prefer tabs or spaces

@WildfireRomeo
Copy link
Owner Author

I've fixed the original female hurt sound effects system for Fabric, however I cannot figure out how to implement it properly using the Mixin system. I might try again later but it's not a high priority for me atm.

@pupnewfster
Copy link
Collaborator

Sounds good, in theory it should basically just be:

inject at head of Player#getHurtSound:

GenderPlayer plr = WildfireGender.getPlayerById(getUUID());
if (plr != null && plr.hasHurtSounds() && plr.getGender().hasFemaleHurtSounds()) {
    //return proper female sound
}

But yeah no idea how you would implement that or if you need to do different things than just inject so as to be able to add that early return. Though actually thinking about it maybe that isn't the best solution as that wouldn't really work for when the server doesn't have the mod as the server would send the normal hurt sound through so yeah just using the old system for now probably makes most sense for fabric.

@WildfireRomeo WildfireRomeo merged commit 719c6f8 into master Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants