Posted December 13, 20222 yr I want to inject into the Warden canTargetEntity method, but it just doesn't seem to work. There isn't a single error in the console. Here is my WardenMixin class: package com.kaboomroads.sculkybits.mixin; import com.kaboomroads.sculkybits.block.entity.custom.SculkAttacker; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.monster.warden.Warden; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Mixin(Warden.class) public abstract class WardenMixin { @Inject(method = "canTargetEntity(Lnet/minecraft/world/entity/Entity;)Z", at = @At("HEAD"), cancellable = true) public void canTargetEntity(Entity entity, CallbackInfoReturnable<Boolean> cir) { System.out.println("mixin working!"); if (!SculkAttacker.testAttackable(entity)) cir.setReturnValue(false); } } It does not print "mixin working!" And this is my sculkybits.mixins.json: { "required": true, "minVersion": "0.8", "package": "com.kaboomroads.sculkybits.mixin", "compatibilityLevel": "JAVA_17", "refmap": "sculkybits.refmap.json", "mixins": [ "WardenMixin" ], "client": [ ], "injectors": { "defaultRequire": 1 } }
December 13, 20222 yr This is not the mixin support forum. I believe there is a channel on forge's discord where you can ask about 3rd party modding tools. Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.