mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Update to Minecraft 1.16.1
This commit is contained in:
35
nms-patches/ChatHexColor.patch
Normal file
35
nms-patches/ChatHexColor.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
--- a/net/minecraft/server/ChatHexColor.java
|
||||
+++ b/net/minecraft/server/ChatHexColor.java
|
||||
@@ -10,7 +10,7 @@
|
||||
public final class ChatHexColor {
|
||||
|
||||
private static final Map<EnumChatFormat, ChatHexColor> a = (Map) Stream.of(EnumChatFormat.values()).filter(EnumChatFormat::d).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> {
|
||||
- return new ChatHexColor(enumchatformat.e(), enumchatformat.f());
|
||||
+ return new ChatHexColor(enumchatformat.e(), enumchatformat.f(), enumchatformat); // CraftBukkit
|
||||
}));
|
||||
private static final Map<String, ChatHexColor> b = (Map) ChatHexColor.a.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> {
|
||||
return chathexcolor.name;
|
||||
@@ -18,16 +18,22 @@
|
||||
private final int rgb;
|
||||
@Nullable
|
||||
public final String name;
|
||||
+ // CraftBukkit start
|
||||
+ @Nullable
|
||||
+ public final EnumChatFormat format;
|
||||
|
||||
- private ChatHexColor(int i, String s) {
|
||||
+ private ChatHexColor(int i, String s, EnumChatFormat format) {
|
||||
this.rgb = i;
|
||||
this.name = s;
|
||||
+ this.format = format;
|
||||
}
|
||||
|
||||
private ChatHexColor(int i) {
|
||||
this.rgb = i;
|
||||
this.name = null;
|
||||
+ this.format = null;
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
public String b() {
|
||||
return this.name != null ? this.name : this.c();
|
Reference in New Issue
Block a user