package land.chipmunk.chipmunkmod.mixin;

import net.minecraft.util.StringHelper;
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(StringHelper.class)
public class StringHelperMixin {
    @Inject(method = "isValidChar", at = @At("RETURN"), cancellable = true)
    private static void isValidChar (final char c, final CallbackInfoReturnable<Boolean> cir) {
        // very legal [NUL] [LF] § Allowance.
        cir.setReturnValue(true);
    }
}
