This repository has been archived by the owner on Sep 24, 2024. It is now read-only.
generated from MeteorDevelopment/meteor-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
StringReader fix allowing to use non-English characters (for example,…
… it fixes PlayerListEntryArgumentType) Fix by MeteorDevelopment/meteor-client#4492
- Loading branch information
Showing
2 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/nekiplay/meteorplus/mixin/minecraft/StringReaderMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package nekiplay.meteorplus.mixin.minecraft; | ||
|
||
import com.mojang.brigadier.StringReader; | ||
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(StringReader.class) | ||
public class StringReaderMixin { | ||
@Inject(method = "isAllowedInUnquotedString", at = @At("RETURN"), remap = false, cancellable = true) | ||
private static void onIsAllowedInUnquotedString(char c, CallbackInfoReturnable<Boolean> cir) { | ||
cir.setReturnValue( | ||
Character.isLetterOrDigit(c) | ||
|| c == '_' || c == '-' | ||
|| c == '.' || c == '+' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,39 @@ | ||
{ | ||
"required": true, | ||
"package": "nekiplay.meteorplus.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"plugin": "nekiplay.meteorplus.MixinPlugin", | ||
"client": [ | ||
"meteorclient.LeftRightSettingsScreenMixin", | ||
"meteorclient.ModuleMixin", | ||
"meteorclient.ModulesScreenMixin", | ||
"meteorclient.WMeteorModuleMixin", | ||
"meteorclient.WPressableMixin", | ||
"required": true, | ||
"package": "nekiplay.meteorplus.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"plugin": "nekiplay.meteorplus.MixinPlugin", | ||
"client": [ | ||
"meteorclient.LeftRightSettingsScreenMixin", | ||
"meteorclient.ModuleMixin", | ||
"meteorclient.ModulesScreenMixin", | ||
"meteorclient.WBlockPosEditMixin", | ||
"meteorclient.WMeteorModuleMixin", | ||
"meteorclient.WPressableMixin", | ||
"meteorclient.modules.AutoToolMixin", | ||
"meteorclient.modules.BlockESPMixin", | ||
"meteorclient.modules.ESPMixin", | ||
"meteorclient.modules.FreecamMixin", | ||
"meteorclient.modules.ItemHighlightMixin", | ||
"meteorclient.modules.KillAuraMixin", | ||
"meteorclient.modules.NoRenderMixin", | ||
"meteorclient.modules.AutoToolMixin", | ||
"meteorclient.modules.BlockESPMixin", | ||
"meteorclient.modules.ESPMixin", | ||
"meteorclient.modules.FreecamMixin", | ||
"meteorclient.modules.ItemHighlightMixin", | ||
"meteorclient.modules.KillAuraMixin", | ||
"meteorclient.modules.TracersMixin", | ||
"meteorclient.modules.WaypointsModuleMixin", | ||
"minecraft.ClientConnectionAccessor", | ||
"minecraft.ClientPlayerInteractionManagerMixin", | ||
"minecraft.CraftingScreenHandlerAccessor", | ||
"minecraft.MinecraftClientMixin", | ||
"minecraft.ShapelessRecipeAccessor", | ||
"minecraft.hud.DebugHudMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"mixins": [ | ||
"meteorclient.DefaultSettingsWidgetFactoryMixin", | ||
"meteorclient.KeybindMixin", | ||
"minecraft.ClientPlayerEntityMixin", | ||
"minecraft.LivingEntityMixin" | ||
] | ||
"meteorclient.modules.TracersMixin", | ||
"meteorclient.modules.WaypointsModuleMixin", | ||
"minecraft.ClientConnectionAccessor", | ||
"minecraft.ClientPlayerInteractionManagerMixin", | ||
"minecraft.CraftingScreenHandlerAccessor", | ||
"minecraft.MinecraftClientMixin", | ||
"minecraft.ShapelessRecipeAccessor", | ||
"minecraft.hud.DebugHudMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
}, | ||
"mixins": [ | ||
"meteorclient.DefaultSettingsWidgetFactoryMixin", | ||
"meteorclient.KeybindMixin", | ||
"minecraft.ClientPlayerEntityMixin", | ||
"minecraft.LivingEntityMixin", | ||
"minecraft.StringReaderMixin" | ||
] | ||
} |