Carpet TIS Addition

Carpet TIS Addition

530k Downloads

Incompatible: Mixin conflict with another mod (fuji`s `fake_player_manager`) on PlayerCommandMixin

Closed this issue ยท 3 comments

commented

Bug description

I'm currently trying to use carpet-tis-addition together with another mod called fuji, but I encountered a Mixin conflict that crashes the server at startup.

@Redirect conflict. Skipping fuji.mixins.json:gameplay.carpet.fake_player_manager.PlayerCommandMixin from mod fuji->@Redirect::$canSpawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000, already redirected by carpet-tis-addition.mixins.json:rule.fakePlayerNameExtra.PlayerCommandMixin from mod carpet-tis-addition->@Redirect::getStringWithPrefixAtCantSpawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000
...
Caused by: java.lang.RuntimeException: Mixin transformation of carpet.commands.PlayerCommand failed

Steps to reproduce

Set up a Fabric Minecraft server with version 1.21.4.

  1. Install the following mods:
  • Fabric-api v0.119.2
  • Fabric-carpet v241203
  • Carpet-tis-addition v1.66.0
  • Fuji v6.13.0
  1. Enable fuji's fake_player_manager
  2. Start the server.

Observe the crash due to Mixin transformation failure.

Expected behavior

Normal startup

Actual behavior

Crashed

Relevant logs

[14:22:48] [Worker-Main-3/WARN]: @Redirect conflict. Skipping fuji.mixins.json:gameplay.carpet.fake_player_manager.PlayerCommandMixin from mod fuji->@Redirect::$canSpawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000, already redirected by carpet-tis-addition.mixins.json:rule.fakePlayerNameExtra.PlayerCommandMixin from mod carpet-tis-addition->@Redirect::getStringWithPrefixAtCantSpawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000
[14:22:48] [Worker-Main-3/WARN]: @Redirect conflict. Skipping fuji.mixins.json:gameplay.carpet.fake_player_manager.PlayerCommandMixin from mod fuji->@Redirect::$spawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000, already redirected by carpet-tis-addition.mixins.json:rule.fakePlayerNameExtra.PlayerCommandMixin from mod carpet-tis-addition->@Redirect::getStringWithPrefixAtSpawn(Lcom/mojang/brigadier/context/CommandContext;Ljava/lang/String;)Ljava/lang/String; with priority 1000
[14:22:48] [main/WARN]: Failed to load datapacks, can't proceed with server load. You can either fix your datapacks or reset to vanilla with --safeMode
java.util.concurrent.ExecutionException: java.lang.RuntimeException: Mixin transformation of carpet.commands.PlayerCommand failed
        at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[?:?]
        at knot/net.minecraft.server.Main.main(Main.java:231) [server-intermediary.jar:?]
        at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.Server.main(KnotServer.java:23) [fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.16.10.jar:?]
        at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [server.jar:1.0.1]
Caused by: java.lang.RuntimeException: Mixin transformation of carpet.commands.PlayerCommand failed
        at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427) ~[fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.16.10.jar:?]
        at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.16.10.jar:?]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
        at knot/carpet.CarpetServer.registerCarpetCommands(CarpetServer.java:128) ~[fabric-carpet-1.21.4-1.4.161+v241203.jar:?]
        at knot//MC/net.minecraft.server.command.CommandManager.handler$zib000$carpet$onRegister(CommandManager.java:2108) ~[server-intermediary.jar:?]
        at knot//MC/net.minecraft.server.command.CommandManager.<init>(CommandManager.java:294) ~[server-intermediary.jar:?]
        at knot//MC/net.minecraft.server.DataPackContents.<init>(DataPackContents.java:39) ~[server-intermediary.jar:?]
        at knot//MC/net.minecraft.server.DataPackContents.method_58296(DataPackContents.java:79) ~[server-intermediary.jar:?]
        at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1150) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:614) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:653) ~[?:?]
        at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) ~[?:?]
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) ~[?:?]
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) ~[?:?]
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) ~[?:?]
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) ~[?:?]
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) ~[?:?]
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
        at 

Minecraft version

1.21.4

Carpet TIS Addition version

1.66.0

Fabric Carpet version

241203

Other information

No response

Check list

  • I have verified that the issue persists in the latest version of the mod.
  • I have searched the existing issues and confirmed that this is not a duplicate.
commented

Luckily, it seems to be easy to fix. I just need to replace those @Redirect with @ModifyExpressionValue

commented

LGTM, Thank you for your work