team-abnormals / blueprint

Library that implements the framework of all Abnormals mods
https://www.curseforge.com/minecraft/mc-mods/blueprint
Other
111 stars 34 forks source link

[1.18.2] Can't load single-player world at creation (mixins error?) #157

Closed xenornithos closed 2 years ago

xenornithos commented 2 years ago

Using a custom modpack with Blueprint (5.3.2), attempted to first create a world in single-player but just encounters "errors in currently selected datapacks prevented world from loading." Checked the latest.log file and noticed this cause:

Mixin apply failed blueprint.mixins.json:AdvancementBuilderMixin -> net.minecraft.advancements.Advancement$Builder: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException Unexpecteded ClassMetadataNotFoundException whilst transforming the mixin class: [MAIN Applicator Phase -> blueprint.mixins.json:AdvancementBuilderMixin -> Apply Methods -> (Lcom/google/gson/JsonObject;Lnet/minecraft/advancements/critereon/DeserializationContext;Lnet/minecraftforge/common/crafting/conditions/ICondition$IContext;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V:handler$zcb000$modifyBuilder -> Transform LVT -> var=context -> desc=Lnet/minecraftforge/common/crafting/conditions/ICondition$IContext;]

I've noticed it works fine with an 1.18.1 version of the custom modpack using Blueprint (5.1.1).

SmellyModder commented 2 years ago

What forge version are you using?

xenornithos commented 2 years ago

Using Forge 40.0.24 in order for it to work with OptiFine H7 for 1.18.2. I've also had to edit the Blueprint mods.toml file to accept Forge "[40,)" rather than its original specific version number, 40.0.36 to bypass the error in-game of conflicting version requirements.

SmellyModder commented 2 years ago

There is an important reason why Blueprint version 5.3.2 requires Forge versions 40.0.36 and above, and you changing it to accept Forge version 40.0.24 explains the crash.

Forge version 40.0.36 made a change to vanilla code that caused the AdvancementBuilderMixin to crash, so we had to change a few things, but consequently made the AdvancementBuilderMixin crash on Forge versions below 40.0.36, so we had to change the minimum Forge version to 40.0.36.

If you need to use Blueprint on Forge 40.0.24, the easiest way would be to use Blueprint 5.3.0. Although, keep in mind that there are some important bug fixes that only Blueprint versions 5.3.1+ have.

I'm going to close this issue, but I will reopen it if the cause turns out to be something else.