Add 1.20.6 support
This commit is contained in:
parent
efcab09fc1
commit
1569f83dae
1 changed files with 6 additions and 3 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue