From badc7071b7393da8ae4db3ff1a4c9181a61e13dc Mon Sep 17 00:00:00 2001 From: SuperGamerTron Date: Fri, 25 Oct 2024 10:30:20 -0600 Subject: [PATCH] Update chat_type handler --- lib/pc/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/pc/index.js b/lib/pc/index.js index 1e8039a..e57e55c 100644 --- a/lib/pc/index.js +++ b/lib/pc/index.js @@ -20,7 +20,12 @@ module.exports = (data, staticData) => { formatString: staticData.language[d.translation_key] || d.translation_key /* chat type minecraft:raw has the formatString given directly by the translation key */, parameters: d.parameters } - data.chatFormattingById[chatType.id] = n + if (staticData.supportFeature('incrementedChatType')) { + // 1.21 - Player chat packet chat type now starts at 1 + data.chatFormattingById[chatType.id + 1] = n + } else { + data.chatFormattingById[chatType.id] = n + } data.chatFormattingByName[chatType.name] = n } },