ViaVersion / ViaForge

Client-side Implementation of the Via* projects for Minecraft Forge
GNU General Public License v3.0
123 stars 32 forks source link

Moved the ViaForgeCommon#init call into an FMLCommonSetupEvent listener #83

Closed ccetl closed 6 months ago

ccetl commented 6 months ago

In this pull request, I utilized the Forge setup event to initialize ViaForge instead of the main menu initialization.

Why? This change ensures a more reliable initialization of ViaForge, as the main menu not loading would previously result in a null pointer crash.

ccetl commented 6 months ago

I couldn't test 1.17 yet

ccetl commented 6 months ago

I'm leaving this as a draft until I've tested everything thoroughly

ccetl commented 6 months ago

1.12.2 works fine. 1.16, 1.18, 1.19 and 1.20 load fine. There is an error when joining or pinging servers though. These errors existed before my changes already. 1.17 fails to load due to a mixin error. This error existed before too.

 [16:05:06] [Render thread/FATAL] [mixin/]: Mixin apply failed mixins.viaforge-mc117.json:fixes.MixinLocalPlayer -> net.minecraft.client.player.LocalPlayer: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow field lastOnGround was not located in the target class net.minecraft.client.player.LocalPlayer. Using refmap mixins.viaforge-mc117.refmap.json
FlorianMichael commented 6 months ago

I will fix these issues myself at some point, do you want to make a PR to the legacy 1.8 branch as well?

ccetl commented 6 months ago

I'll look into it