Sponge icon indicating copy to clipboard operation
Sponge copied to clipboard

Conflict between SpongeForge and Infernal Expansion

Open Rykita opened this issue 2 years ago • 3 comments

Affected Product(s)

SpongeForge

Version

1.16.5-36.2.5-8.0.0-RC1100

Operating System

Linux

Java Version

openjdk version "1.8.0_312"

Plugins/Mods

Infernal Expansion

Describe the bug

[22:23:53] [Server thread/FATAL] [mixin/]: Mixin apply failed infernal-expansion.mixins.json:common.MixinPlayerInteractionManager ->
 net.minecraft.server.management.PlayerInteractionManager: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException
  @At("INVOKE") on net/minecraft/server/management/PlayerInteractionManager::IE_firePostRightClickBlockEventServer with priority 1000 cannot
  inject into
  net/minecraft/server/management/PlayerInteractionManager::func_219441_a(Lnet/minecraft/entity/player/ServerPlayerEntity;Lnet/minecraft/world
  /World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/BlockRayTraceResult;)Lnet/minecraft/util/ActionResultType; 
  merged by org.spongepowered.common.mixin.tracker.server.level.ServerPlayerGameModeMixin_Tracker with priority 1102 [PREINJECT Applicator Phase -> 
  infernal-expansion.mixins.json:common.MixinPlayerInteractionManager -> Prepare Injections ->  -> 
  handler$zoo000$IE_firePostRightClickBlockEventServer(Lnet/minecraft/entity/player/ServerPlayerEntity;Lnet/minecraft/world
  /World;Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/Hand;Lnet/minecraft/util/math/BlockRayTraceResult;
  Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfoReturnable;)V -> Prepare]

Link to logs

No response

Rykita avatar Mar 23 '22 22:03 Rykita

For some extra context, this issue is encountered after running a build of https://github.com/SpongePowered/Sponge/pull/3656, which works around an issue with Infernal Expansion's additions to the MobCategory enum.

The relevant Mixin on IE's side: https://github.com/infernalexp/Infernal-Expansion/blob/8d518702601726506b01dd7624c28cd1725f6736/src/main/java/org/infernalstudios/infernalexp/mixin/common/MixinPlayerInteractionManager.java#L36

On our side: https://github.com/SpongePowered/Sponge/blob/4a026b63a41c3e8abe49c4fee5c8ec1a19974539/src/mixins/java/org/spongepowered/common/mixin/tracker/server/level/ServerPlayerGameModeMixin_Tracker.java#L95

The injection point IE uses is still present in our overwrite -- would a possible solution be to adjust the priority of our mixin sets to allow IE's injection to occur on top of our overwrite?

zml2008 avatar Mar 23 '22 22:03 zml2008

Opened a PR to test it out: https://github.com/SpongePowered/Sponge/pull/3658

Give this build a try: https://github.com/SpongePowered/Sponge/suites/5780075464/artifacts/192657304

gabizou avatar Mar 24 '22 06:03 gabizou

Is there a working spongeforge version for this?

Enterprise12nx01 avatar Jul 02 '22 21:07 Enterprise12nx01