WorldEdit

WorldEdit

43M Downloads

Mixins don't seem to get loaded using Forge

OffKilterMC opened this issue ยท 1 comments

commented

WorldEdit Version

7.3.0 beta 02 (and 7.2.17)

Platform Version

Forge 48.0.40

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

I was trying to make a combined fabric/forge mod and saw that WE does this. After cobbling something together, I found out the mixins were not loading in forge because the mixin configs are not in the manifest (it was basically empty). I figured out that WE appears to have the same issue (verified via debug logging to watch FML output). I managed to fix this for my mod by merging both manifests in gradle. I am wondering if you might need to do the same.

When I attempted to fix this by including the MixinConfigs in the manifest, it then crashed because apparently at least in 7.3 beta the refmap is missing for forge.

In 7.2.17, the refmap is there, but again the manifest does not contain the config. If I update the manifest manually and try to run, the app crashes:

[08:38:20] [pool-4-thread-1/FATAL] [mixin/]: Mixin apply failed worldedit-forge.mixins.json:MixinServerGamePacketListenerImpl -> net.minecraft.server.network.ServerGamePacketListenerImpl: org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException @Shadow field player was not located in the target class net.minecraft.server.network.ServerGamePacketListenerImpl. Using refmap worldedit-forge.mixins.refmap.json
org.spongepowered.asm.mixin.transformer.throwables.InvalidMixinException: @Shadow field player was not located in the target class net.minecraft.server.network.ServerGamePacketListenerImpl. Using refmap worldedit-forge.mixins.refmap.json

So it definitely is trying to apply the mixins at least.

Expected Behavior

mixins load normally and given the steps to repro, Registering mixin config: worldedit-forge.mixins.json as well as other lines indicating the mixin is being applied should show in debug.log.

Reproduction Steps

  1. modify java logging.properties to set level to DEBUG
  2. run worldedit

Note there is no line: Registering mixin config: worldedit-forge.mixins.json But there should be.

Anything Else?

No response

commented

The manifest issue was fixed in #2457. I can't actually reproduce the crash you mentioned with a valid manifest, Forge loads the -mod jar fine and the mixins have applied. I also can't reproduce the missing refmap in 7.3.0, as it's both there and valid as Forge loads the mixins from the -mod jar in 7.3.0 as well.

Closing this as the manifest issue is now fixed, and the rest seemingly are no longer issues.