I had this mixin for 1.20.1 which made torchflowers glow, and it worked fine. But now after updating to 1.21, it doesn't work anymore. It causes minecraft to crash.
@Mixin(value = Blocks.class)
public class TorchflowerGlow {
@ModifyArg(
method = "<clinit>",
slice = @Slice(
from = @At(value = "CONSTANT", args = "stringValue=torchflower"),
to = @At(value = "CONSTANT", args = "stringValue=poppy")),
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/FlowerBlock;<init>" +
"(Lnet/minecraft/entity/effect/StatusEffect;ILnet/minecraft/block/AbstractBlock$Settings;)V"),
index = 2)
private static AbstractBlock.Settings changeLuminance(AbstractBlock.Settings addLum) {
return addLum.luminance(state -> 15);
}
}```
Now it gives me 'Cannot resolve target reference' for the target, and 'There are no possible signatures for this injector' for AbstractBlock.settings addLum