Conversation
|
Is the client_command payload the same on 1.8 and 1.9? It sounds "payload" should be corrected to "actionId" in the 1.8 JSON if so |
6fa1f2e to
729f0e3
Compare
|
Information on adding statistics data... This is the protocol schema on 1.8 "packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]
}
]On 1.12 "packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "name",
"type": "string"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]
}
]
],1.13 "packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "categoryId",
"type": "varint"
},
{
"name": "statisticId",
"type": "varint"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]
}1.16 "packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "categoryId",
"type": "varint"
},
{
"name": "statisticId",
"type": "varint"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]
}1.19.4 "packet_statistics": [
"container",
[
{
"name": "entries",
"type": [
"array",
{
"countType": "varint",
"type": [
"container",
[
{
"name": "categoryId",
"type": "varint"
},
{
"name": "statisticId",
"type": "varint"
},
{
"name": "value",
"type": "varint"
}
]
]
}
]Per above: 1.13 went from string stat => value to (int category, int statId) => value; From the discord, minecraft storage went from {
"stat.walkOneCm":311,
"stat.playOneMinute":78,
"stat.leaveGame":1,
"stat.timeSinceDeath":78,
"stat.useItem.minecraft.dirt":1,
"stat.sprintOneCm":136,
"stat.mineBlock.minecraft.dirt":1,
"achievement.exploreAllBiomes":{
"value":0,
"progress":[
"Plains"
]
}to {
"stats":{
"minecraft:dropped":{
"minecraft:oak_log":12
},
"minecraft:custom":{
"minecraft:time_since_rest":2327,
"minecraft:leave_game":2,
"minecraft:play_time":2327,
"minecraft:time_since_death":2327,
"minecraft:walk_one_cm":102,
"minecraft:total_world_time":2495,
"minecraft:drop":12,
"minecraft:jump":5
},
"minecraft:picked_up":{
"minecraft:oak_log":12
}
},
"DataVersion":3218
}So, to account for both, the schema should look like this on old versions: [
{id: 4, name: 'walk_one_cm', protocolName: 'stat.walkOneCm' } // 1.8
]and on 1.13+, [
{id: 4, name: 'walk_one_cm', protocolName: 'minecraft:walk_one_cm', category: 'minecraft:custom', protocolId: 2, categoryId: 3 }
] // protocolId and categoryId are the integers that correspond to protocolName, categoryNameThe category field on new versions could be optional on older versions, or backported to old versions |
I'll probably change I'll need to make |
|
I'll need to add datapaths for the new statistics |
|
@Chitasa do you intend to finish this? |
Reopening PrismarineJS/mineflayer#1962