Add 1.20.6 support

This commit is contained in:
7cc5c4f330d47060 2024-10-26 14:33:37 -04:00
parent efcab09fc1
commit 1569f83dae
Signed by: 7cc5c4f330d47060
SSH key fingerprint: SHA256:e+4tcZut1nBpe10PqjaO+Rvie0Q7W4qIvFzcUw+7riA

View file

@ -52,13 +52,16 @@ export default function defaultad (b) {
b.messageCount = 0
}, 4000)
b.messageTypes = []
b._client.on('registry_data', (data) => {
if (data.codec.value['minecraft:chat_type']) {
b.messageTypes = data.codec.value['minecraft:chat_type']
b._client.on('registry_data', (data) => {
if (data.codec && data.codec.value['minecraft:chat_type']) {
const nbtItems = data.codec.value['minecraft:chat_type'].value.value.value.value
nbtItems.forEach((item, i) => {
b.messageTypes[i] = convertChatTypeItem(item.element.value.chat.value)
})
} else if(data.entries && data.id == 'minecraft:chat_type'){
data.entries.forEach((item, i)=>{
b.messageTypes[i] = convertChatTypeItem(data.entries[i].value.value.chat.value)
})
}
})
b._client.on('profileless_chat', (data) => {