Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Actually make every message a system message (#2903)
Dieser Commit ist enthalten in:
Ursprung
b7005f2400
Commit
b82b067745
@ -167,7 +167,10 @@ public final class Protocol1_19To1_18_2 extends AbstractProtocol<ClientboundPack
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.COMPONENT); // Message
|
||||
map(Type.BYTE, Type.VAR_INT); // Type
|
||||
handler(wrapper -> {
|
||||
int type = wrapper.read(Type.BYTE);
|
||||
wrapper.write(Type.VAR_INT, type == 2 ? 1 : 0);
|
||||
});
|
||||
read(Type.UUID); // Sender
|
||||
}
|
||||
});
|
||||
|
@ -49,63 +49,28 @@ public final class EntityPackets extends EntityRewriter<Protocol1_19To1_18_2> {
|
||||
|
||||
//TODO move to compressed nbt file
|
||||
private static final String CHAT_REGISTRY_SNBT = "{\n" +
|
||||
" \"minecraft:chat_type\":{\n" +
|
||||
" \"type\":\"minecraft:chat_type\",\n" +
|
||||
" \"value\":[\n" +
|
||||
" {\n" +
|
||||
" \"name\":\"minecraft:chat\",\n" +
|
||||
" \"id\":0,\n" +
|
||||
" \"element\":{\n" +
|
||||
" \"chat\":{\n" +
|
||||
" \"decoration\":{\n" +
|
||||
" \"translation_key\":\"chat.type.text\",\n" +
|
||||
" \"style\":{\n" +
|
||||
" \n" +
|
||||
" },\n" +
|
||||
" \"parameters\":[\n" +
|
||||
" \"sender\",\n" +
|
||||
" \"content\"\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" \"narration\":{\n" +
|
||||
" \"priority\":\"chat\",\n" +
|
||||
" \"decoration\":{\n" +
|
||||
" \"translation_key\":\"chat.type.text.narrate\",\n" +
|
||||
" \"style\":{\n" +
|
||||
" \n" +
|
||||
" },\n" +
|
||||
" \"parameters\":[\n" +
|
||||
" \"sender\",\n" +
|
||||
" \"content\"\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" {\n" +
|
||||
" \"name\":\"minecraft:system\",\n" +
|
||||
" \"id\":1,\n" +
|
||||
" \"element\":{\n" +
|
||||
" \"chat\":{\n" +
|
||||
" \n" +
|
||||
" },\n" +
|
||||
" \"narration\":{\n" +
|
||||
" \"priority\":\"system\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" {\n" +
|
||||
" \"name\":\"minecraft:game_info\",\n" +
|
||||
" \"id\":2,\n" +
|
||||
" \"element\":{\n" +
|
||||
" \"overlay\":{\n" +
|
||||
" \n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
" \"minecraft:chat_type\": {\n" +
|
||||
" \"type\": \"minecraft:chat_type\",\n" +
|
||||
" \"value\": [\n" +
|
||||
" {\n" +
|
||||
" \"name\": \"minecraft:system\",\n" +
|
||||
" \"id\": 0,\n" +
|
||||
" \"element\": {\n" +
|
||||
" \"chat\": {},\n" +
|
||||
" \"narration\": {\n" +
|
||||
" \"priority\": \"system\"\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" {\n" +
|
||||
" \"name\": \"minecraft:game_info\",\n" +
|
||||
" \"id\": 1,\n" +
|
||||
" \"element\": {\n" +
|
||||
" \"overlay\": {}\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" ]\n" +
|
||||
" }\n" +
|
||||
"}";
|
||||
private static final CompoundTag CHAT_REGISTRY;
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren