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 2426ad8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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('incrementChatType')) {
// 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"standard": "^17.0.0"
},
"dependencies": {
"minecraft-data": "^3.70.0",
"minecraft-data": "github:SuperGamerTron/node-minecraft-data#feature",
"prismarine-nbt": "^2.0.0"
}
}

0 comments on commit 2426ad8

Please sign in to comment.