
Crash on mixin task
Phoupraw opened this issue ยท 0 comments
Minecraft version
1.21.1
Describe the bug
Failed to execute task .../MClientPlayerEntity.class
Steps to reproduce
- Install the mod TrifleClient+1.21.1+0.23.0.jar.zip
- Launch the game.
- Crash.
Logs
https://gist.github.com/Phoupraw/9be4fc9d24c86aaaebd11f351d6b03dd
Additional context
The following operations can't prevent crash:
- Remove the class name from
mixin.json
- Not apply the mixin class by custom
IMixinConfigPlugin
.
Only removing the class itself from mod jar can prevent crash.
The source of the class:
package phoupraw.mcmod.trifleclient.mixin.minecraft.elytra;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
import com.mojang.authlib.GameProfile;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.network.AbstractClientPlayerEntity;
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.client.world.ClientWorld;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import phoupraw.mcmod.trifleclient.mixins.minecraft.MMClientPlayerEntity;
@Environment(EnvType.CLIENT)
@Mixin(value = ClientPlayerEntity.class)
abstract class MClientPlayerEntity extends AbstractClientPlayerEntity {
public MClientPlayerEntity(ClientWorld world, GameProfile profile) {
super(world, profile);
}
@ModifyExpressionValue(method = "tickMovement", at = @At(value = "FIELD", target = "Lnet/minecraft/entity/player/PlayerAbilities;allowFlying:Z", opcode = Opcodes.GETFIELD))
private boolean toggleFlying(boolean original) {
return MMClientPlayerEntity.toggleFlying((ClientPlayerEntity) (Object) this, original);
}
@WrapWithCondition(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/ClientPlayerEntity;sendAbilitiesUpdate()V"))
private boolean notSendStopFlyingPacket(ClientPlayerEntity instance) {
return MMClientPlayerEntity.notSendStopFlyingPacket(instance);
}
}