patch namespace exploit !!

This commit is contained in:
Chayapak 2023-06-25 09:23:40 +07:00
parent a2b2de94f9
commit 99d37d33f9
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,17 @@
package land.chipmunk.chipmunkmod.mixin;
import net.minecraft.util.Identifier;
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(Identifier.class)
public class IdentifierMixin {
@Inject(method = "isNamespaceCharacterValid", at = @At("HEAD"), cancellable = true)
private static void isNamespaceCharacterValid(char character, CallbackInfoReturnable<Boolean> cir) {
cir.setReturnValue(true);
cir.cancel();
}
}

View file

@ -18,7 +18,8 @@
"StringHelperMixin",
"NbtIoMixin",
"KeyboardInputMixin",
"ElderGuardianAppearanceParticleMixin"
"ElderGuardianAppearanceParticleMixin",
"IdentifierMixin"
],
"injectors": {
"defaultRequire": 1