|
|
|
|
@@ -0,0 +1,30 @@
|
|
|
|
|
--- a/net/minecraft/network/chat/ChatMessageType.java
|
|
|
|
|
+++ b/net/minecraft/network/chat/ChatMessageType.java
|
|
|
|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
|
|
|
|
import com.mojang.serialization.Codec;
|
|
|
|
|
import com.mojang.serialization.codecs.RecordCodecBuilder;
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
import net.minecraft.commands.CommandListenerWrapper;
|
|
|
|
|
@@ -27,6 +28,7 @@
|
|
|
|
|
public static final ResourceKey<ChatMessageType> TEAM_MSG_COMMAND_INCOMING = create("team_msg_command_incoming");
|
|
|
|
|
public static final ResourceKey<ChatMessageType> TEAM_MSG_COMMAND_OUTGOING = create("team_msg_command_outgoing");
|
|
|
|
|
public static final ResourceKey<ChatMessageType> EMOTE_COMMAND = create("emote_command");
|
|
|
|
|
+ public static final ResourceKey<ChatMessageType> RAW = create("raw"); // CraftBukkit
|
|
|
|
|
|
|
|
|
|
private static ResourceKey<ChatMessageType> create(String s) {
|
|
|
|
|
return ResourceKey.create(IRegistry.CHAT_TYPE_REGISTRY, new MinecraftKey(s));
|
|
|
|
|
@@ -39,7 +41,10 @@
|
|
|
|
|
RegistryGeneration.register(iregistry, ChatMessageType.MSG_COMMAND_OUTGOING, new ChatMessageType(ChatDecoration.outgoingDirectMessage("commands.message.display.outgoing"), ChatDecoration.withSender("chat.type.text.narrate")));
|
|
|
|
|
RegistryGeneration.register(iregistry, ChatMessageType.TEAM_MSG_COMMAND_INCOMING, new ChatMessageType(ChatDecoration.teamMessage("chat.type.team.text"), ChatDecoration.withSender("chat.type.text.narrate")));
|
|
|
|
|
RegistryGeneration.register(iregistry, ChatMessageType.TEAM_MSG_COMMAND_OUTGOING, new ChatMessageType(ChatDecoration.teamMessage("chat.type.team.sent"), ChatDecoration.withSender("chat.type.text.narrate")));
|
|
|
|
|
- return RegistryGeneration.register(iregistry, ChatMessageType.EMOTE_COMMAND, new ChatMessageType(ChatDecoration.withSender("chat.type.emote"), ChatDecoration.withSender("chat.type.emote")));
|
|
|
|
|
+ // CraftBukkit start
|
|
|
|
|
+ RegistryGeneration.register(iregistry, ChatMessageType.EMOTE_COMMAND, new ChatMessageType(ChatDecoration.withSender("chat.type.emote"), ChatDecoration.withSender("chat.type.emote")));
|
|
|
|
|
+ return RegistryGeneration.register(iregistry, ChatMessageType.RAW, new ChatMessageType(new ChatDecoration("%s", List.of(ChatDecoration.a.CONTENT), ChatModifier.EMPTY), new ChatDecoration("%s", List.of(ChatDecoration.a.CONTENT), ChatModifier.EMPTY)));
|
|
|
|
|
+ // CraftBukkit end
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ChatMessageType.a bind(ResourceKey<ChatMessageType> resourcekey, Entity entity) {
|