Skip to content

Commit

Permalink
Update chat_type handler
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperGamerTron committed Oct 26, 2024
1 parent 5320e19 commit badc707
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/pc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Expand Down

0 comments on commit badc707

Please sign in to comment.