AzureDoom / AzureLib

Based off Geckolib but now just for my own needs.
MIT License
28 stars 6 forks source link

TODO: Replace Forge/NeoForge Overwrite with ModifyArgs #19

Closed AzureDoom closed 9 months ago

AzureDoom commented 9 months ago

Overwrite is a very breaking thing to do here: https://github.com/AzureDoom/AzureLib/blob/1.20/NeoForge/src/main/java/mod/azure/azurelib/mixin/MixinHumanoidArmorLayer.java#L66

Suggestion is to move to an ModifyArgs simpler to Fabrics, like so: https://github.com/AzureDoom/AzureLib/blob/1.20-Item-Rendering-WIP/NeoForge/src/main/java/mod/azure/azurelib/mixin/MixinHumanoidArmorLayer.java#L38

Main issue: Due to https://github.com/MinecraftForge/MinecraftForge/blob/ccbc697bad9b689fbb44cb1de090a0650c8925bc/patches/minecraft/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java.patch#L39-L46 There is a 2nd renderModel method created with a Model and ResourceLocation instead of a HumanoidModel and String. The ModifyArg seems to want to target only the first 1st renderMethod and is causing a crash when doing so.

Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Argument modifier method injectArmor(Lnet/minecraft/client/model/HumanoidModel;)Lnet/minecraft/client/model/HumanoidModel; in azurelib.mixins.json:MixinHumanoidArmorLayer failed injection check, (0/1) succeeded. Scanned 1 target(s). No refMap loaded.
AzureDoom commented 9 months ago

Closed by #20