minecraft-data
minecraft-data copied to clipboard
Decide where to put channel data
example https://gist.github.com/plexigras/3e5d408ce303ac47b9e34838eac2d353
@plexigras
also write the rest of http://wiki.vg/Plugin_channels
Possibilities :
- put it straight in protocol.json as top-level types (or in a
channel
namespace) - create a channels.json
Anyway, the data needs to be written.
I guess a channels.json might be simpler for maintenance purposes (no need to change all the existing protocol.json)
(any opinion @roblabla @hansihe ?)
Going for a separate channels.json seems like the best approach to me.
ok so it should look like this :
{
"types": {
"MC|Brand":"string",
"MC|TrList": [
"container",
[
{
"name": "windowId",
"type": "i32"
},
{
"name": "trades",
"type": [
"array",
{
"countType": "i8",
"type": [
"container",
[
{
"name": "firstInput",
"type": "slot"
},
{
"name": "output",
"type": "slot"
},
{
"name": "hasSecondItem",
"type": "bool"
},
{
"name": "secondaryInput",
"type": [
"switch",
{
"compareTo": "hasSecondItem",
"fields": {
"true": "slot",
"false": "void"
}
}
]
},
{
"name": "disabled",
"type": "bool"
},
{
"name": "toolUses",
"type": "i32"
},
{
"name": "maxTradeuses",
"type": "i32"
}
]
]
}
]
}
]
]
}
}
@plexigras let's try to keep the camelCase convention for naming fields ok ?
made a channels
branch for it there https://github.com/PrismarineJS/minecraft-data/blob/channels/data/pc/1.10/channels.json
You can PR to it @plexigras