[MobZ @Redirect crash] Fabric 1.17.1
WolfBV opened this issue ยท 8 comments
Describe the bug
Crash with MobZ when launching an instance
To Reproduce
Steps to reproduce the behavior:
- Download Outvoted-1.5.0-beta.4
- Download Geckolib 3.0.16 or higher
- Download MobZ-3.2.0-fabric.jar
- Launch
Screenshots/Logs
https://pastebin.com/pES1hbLV
Version (please complete the following information):
- Minecraft Version 1.17.1
- Modloader Fabric
I am actually unsure if I can do anything about this. From what I know, this specific mixin redirect is required for modded shields to work properly, so its not like I can remove it.
I just took the simple approach and instead of redirecting just inject the mixin at the start and go from there. Will be fixed next beta.
How is this be fixed? I'm thinking if I can do something on my side to improve the compatibility.
I just remembered Fabric is missing a custom shield API.
How is this be fixed? I'm thinking if I can do something on my side to improve the compatibility.
I just remembered Fabric is missing a custom shield API.
I basically just made a copy of the entire original method but changed the initial item check, and injected that into the method rather than redirecting anything. Definitely not elegant but ensures compatibility.
See here: https://github.com/How-Bout-No/Outvoted/blob/1.17.1/fabric/src/main/java/io/github/how_bout_no/outvoted/fabric/mixin/MixinPlayerEntity.java#L35
How is this be fixed? I'm thinking if I can do something on my side to improve the compatibility.
I just remembered Fabric is missing a custom shield API.I basically just made a copy of the entire original method but changed the initial item check, and injected that into the method rather than redirecting anything. Definitely not elegant but ensures compatibility. See here: https://github.com/How-Bout-No/Outvoted/blob/1.17.1/fabric/src/main/java/io/github/how_bout_no/outvoted/fabric/mixin/MixinPlayerEntity.java#L35
That's really helpful and I should do the same change to improve compatibility with other mods.
The best solution is to tell Fabric to add a shield API.
You may want to have a look at this:
https://www.curseforge.com/minecraft/mc-mods/fabric-shield-lib/files/3544625
A shield API!