diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/IdentifierMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/IdentifierMixin.java new file mode 100644 index 0000000..8b51f03 --- /dev/null +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/IdentifierMixin.java @@ -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 cir) { + cir.setReturnValue(true); + + cir.cancel(); + } +} diff --git a/src/main/resources/chipmunkmod.mixins.json b/src/main/resources/chipmunkmod.mixins.json index 4561937..330c33b 100644 --- a/src/main/resources/chipmunkmod.mixins.json +++ b/src/main/resources/chipmunkmod.mixins.json @@ -18,7 +18,8 @@ "StringHelperMixin", "NbtIoMixin", "KeyboardInputMixin", - "ElderGuardianAppearanceParticleMixin" + "ElderGuardianAppearanceParticleMixin", + "IdentifierMixin" ], "injectors": { "defaultRequire": 1