Unable to load mod in obfuscated server #21

Closed
opened 2023-12-02 13:38:33 +00:00 by BlakeRain · 3 comments
Owner

It appears that the refmap is missing, which is stopping the mod from loading on the server:

Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on checkInvulnerabilities could not find any targets matching 'isInvulnerableTo' in net.minecraft.world.entity.Entity. No refMap loaded. [PREINJECT Applicator Phase -> mixins.utamacraft.json:EntityMixin -> Prepare Injections ->  -> handler$zea000$checkInvulnerabilities(Lnet/minecraft/world/damagesource/DamageSource;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse]
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.validateTargets(InjectionInfo.java:656)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findTargets(InjectionInfo.java:587)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:330)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:316)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:308)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.<init>(CallbackInjectionInfo.java:46)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:149)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:708)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:131
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1042)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393)
	at MC-BOOTSTRAP/org.spongepowered.mixi/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365)
	at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
It appears that the refmap is missing, which is stopping the mod from loading on the server: ``` Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Critical injection failure: @Inject annotation on checkInvulnerabilities could not find any targets matching 'isInvulnerableTo' in net.minecraft.world.entity.Entity. No refMap loaded. [PREINJECT Applicator Phase -> mixins.utamacraft.json:EntityMixin -> Prepare Injections -> -> handler$zea000$checkInvulnerabilities(Lnet/minecraft/world/damagesource/DamageSource;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Parse] at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.validateTargets(InjectionInfo.java:656) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.findTargets(InjectionInfo.java:587) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:330) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:316) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:308) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.<init>(CallbackInjectionInfo.java:46) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:149) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:708) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:131 at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1042) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:393) at MC-BOOTSTRAP/org.spongepowered.mixi/org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ```
BlakeRain added the
Priority
Critical
Kind/Bug
labels 2023-12-02 13:38:33 +00:00
BlakeRain self-assigned this 2023-12-02 13:38:33 +00:00
BlakeRain added this to the Mod Development project 2023-12-02 13:38:33 +00:00
Author
Owner

It appears that the addMixinstoJar task is running correctly, so the mixins files should be added to the jar, which should also include the refmap. Need to look into why the refmap is not being inserted into the jar.

It appears that the `addMixinstoJar` task is running correctly, so the mixins files should be added to the jar, which should also include the refmap. Need to look into why the refmap is not being inserted into the jar.
Author
Owner

So it seems the refmap is being included in the jar...

❯ unzip -l build/libs/utamacraft-0.2.0-1.19.jar | grep mixins
      267  12-02-2023 13:33   mixins.utamacraft.json
      424  12-02-2023 13:33   mixins.utamacraft.refmap.json
So it seems the refmap _is_ being included in the jar... ``` ❯ unzip -l build/libs/utamacraft-0.2.0-1.19.jar | grep mixins 267 12-02-2023 13:33 mixins.utamacraft.json 424 12-02-2023 13:33 mixins.utamacraft.refmap.json ```
Author
Owner

Looks like the refmap field in the mixins.utamacraft.json file was named incorrectly:

{
  "required": true,
  "minVersion": "0.8",
  "package": "net.banutama.utamacraft.mixin",
  "compatibilityLevel": "JAVA_17",
  "mixins": [
    "EntityMixin"
  ],
  "client": [
  ],
  "injectors": {
    "defaultRequire": 1
  },
  "refmap": "utamacraft.refmap.json"
}

It should be mixins.utamacraft.refmap.json according to what is being placed in the jar file.

Looks like the `refmap` field in the `mixins.utamacraft.json` file was named incorrectly: ```json { "required": true, "minVersion": "0.8", "package": "net.banutama.utamacraft.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ "EntityMixin" ], "client": [ ], "injectors": { "defaultRequire": 1 }, "refmap": "utamacraft.refmap.json" } ``` It should be `mixins.utamacraft.refmap.json` according to what is being placed in the jar file.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bans-minecraft/utamacraft#21
No description provided.