Outvoted

Outvoted

6M Downloads

[MobZ @Redirect crash] Fabric 1.17.1

WolfBV opened this issue ยท 8 comments

commented

Describe the bug
Crash with MobZ when launching an instance

To Reproduce
Steps to reproduce the behavior:

  1. Download Outvoted-1.5.0-beta.4
  2. Download Geckolib 3.0.16 or higher
  3. Download MobZ-3.2.0-fabric.jar
  4. Launch

Screenshots/Logs
https://pastebin.com/pES1hbLV

Version (please complete the following information):

  • Minecraft Version 1.17.1
  • Modloader Fabric
commented

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.

commented

I'll ask rikka

commented

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.

commented

Fixed in beta 5

commented

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.

commented

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

commented

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.

commented

You may want to have a look at this:
https://www.curseforge.com/minecraft/mc-mods/fabric-shield-lib/files/3544625

A shield API!