mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-23 21:51:26 +01:00
Return false in isForbiddenCharacter check if the font is not contained in the forbidden character map (#208)
* Return false in isForbiddenCharacter check if the font is not contained in the forbidden character map Fixes #206 * Make field final --------- Co-authored-by: EnZaXD <60033407+FlorianMichael@users.noreply.github.com>
This commit is contained in:
parent
4ce85b1c68
commit
cefc76dc5a
@ -74,7 +74,9 @@ public abstract class MixinFontStorage implements IFontStorage {
|
||||
fontName = "UnihexFont";
|
||||
}
|
||||
if (fontName == null) return false;
|
||||
return viafabricplus_forbiddenCharacters.get(fontName).contains(codePoint);
|
||||
final var forbiddenCodepoints = viafabricplus_forbiddenCharacters.get(fontName);
|
||||
if (forbiddenCodepoints == null) return false;
|
||||
return forbiddenCodepoints.contains(codePoint);
|
||||
}
|
||||
|
||||
@Inject(method = "findGlyph", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/Font;getGlyph(I)Lnet/minecraft/client/font/Glyph;"), locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true)
|
||||
|
Loading…
Reference in New Issue
Block a user