From 8056f02172d36fc6c6753fecd48e90d1b21555e1 Mon Sep 17 00:00:00 2001 From: LAX1DUDE Date: Thu, 21 Jul 2022 15:45:17 -0700 Subject: [PATCH] Revert "fixed chat formatting character (for servers without UTF-8 http headers)" This reverts commit f3f8949f1ac3a2245c79f3e191ab231a7018e454. --- .../java/net/minecraft/src/EnumChatFormatting.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/minecraft/src/EnumChatFormatting.java b/src/main/java/net/minecraft/src/EnumChatFormatting.java index 3865172..110d165 100644 --- a/src/main/java/net/minecraft/src/EnumChatFormatting.java +++ b/src/main/java/net/minecraft/src/EnumChatFormatting.java @@ -10,18 +10,12 @@ public enum EnumChatFormatting { BLACK('0'), DARK_BLUE('1'), DARK_GREEN('2'), DARK_AQUA('3'), DARK_RED('4'), DARK_PURPLE('5'), GOLD('6'), GRAY('7'), DARK_GRAY('8'), BLUE('9'), GREEN('a'), AQUA('b'), RED('c'), LIGHT_PURPLE('d'), YELLOW('e'), WHITE('f'), OBFUSCATED('k', true), BOLD('l', true), STRIKETHROUGH('m', true), UNDERLINE('n', true), ITALIC('o', true), RESET('r'); - private static final int codePoint = 0x10a7; - private static final Map field_96321_w = new HashMap(); private static final Map field_96331_x = new HashMap(); - private static final Pattern field_96330_y = Pattern.compile("(?i)" + String.valueOf((char)bias(codePoint)) + "[0-9A-FK-OR]"); + private static final Pattern field_96330_y = Pattern.compile("(?i)" + String.valueOf((char)0x00a7) + "[0-9A-FK-OR]"); private final char field_96329_z; private final boolean field_96303_A; private final String field_96304_B; - - private static int bias(int input) { // trick TeaVM into not converting (char)0x00a7 to a string - return input - 0x1000; - } private EnumChatFormatting(char par3) { this(par3, false); @@ -30,7 +24,7 @@ public enum EnumChatFormatting { private EnumChatFormatting(char par3, boolean par4) { this.field_96329_z = par3; this.field_96303_A = par4; - this.field_96304_B = "" + (char)bias(codePoint) + par3; + this.field_96304_B = "" + (char)0x00a7 + par3; } public char func_96298_a() {