Sydokiddo / auditory

A mod that expands and improves upon the sound and audio aspects of Minecraft!
39 stars 12 forks source link

Improve mixin compatibility, conciseness, and use of best practices #19

Closed Daomephsta closed 2 years ago

Daomephsta commented 2 years ago

The major aim was to eliminate usage of the antipattern where the vanilla method is replicated with a cancellable @Inject all to insert a small section of mod code.
This is a very problematic way to implement functionality because:

  1. Any injected handlers after a handler using this pattern will silently fail to run
  2. It's hard to maintain. Every MC version update requires re-copying and re-adapting the code to cancellable @Inject
  3. It's legally dubious at best. Minecraft's code is proprietary, so avoid copying it if at all possible.

Best practices implemented:

There's are also more specific tweaks and details that I've commented on in the code, or in the web diffs.

If you're a Discord user, MMD will provide help with Mojmap mixins. Unfortunately the Fabric Discord does not, due to Yarn's cleanroom requirements.