Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 34 additions & 59 deletions data/pc/1.10-pre1/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,65 +59,40 @@
}
]
]
entityMetadataItem: $compareTo ?
if 0: i8
if 1: varint
if 2: f32
if 3: string
if 4: string
if 5: slot
if 6: bool
if 7:
pitch: f32
yaw: f32
roll: f32
if 8: position
if 9: [
"option",
"position"
]
if 10: varint
if 11: [
"option",
"UUID"
]
if 12: varint
entityMetadata: [
"entityMetadataLoop",
{
"endVal": 255,
"type": [
"container",
[
{
"anon": true,
"type": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": "i8"
}
]
]
},
{
"name": "value",
"type": [
"entityMetadataItem",
{
"compareTo": "type"
}
]
}
]
]
}
]
entityMetadataEntry:
key: u8
type: i8 =>
- byte
- int
- float
- string
- component
- item_stack
- boolean
- rotations
- block_pos
- optional_block_pos
- direction
- optional_uuid
- block_state
value: type ?
if byte: i8
if int: varint
if float: f32
if string: string
if component: string
if item_stack: slot
if boolean: bool
if rotations:
pitch: f32
yaw: f32
roll: f32
if block_pos: position
if optional_block_pos: ["option", "position"]
if direction: varint
if optional_uuid: ["option", "UUID"]
if block_state: varint
entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }]

^handshaking.toClient.types:
packet:
Expand Down
147 changes: 77 additions & 70 deletions data/pc/1.10-pre1/protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,83 +88,90 @@
}
]
],
"entityMetadataItem": [
"switch",
{
"compareTo": "$compareTo",
"fields": {
"0": "i8",
"1": "varint",
"2": "f32",
"3": "string",
"4": "string",
"5": "slot",
"6": "bool",
"7": [
"container",
[
{
"name": "pitch",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "roll",
"type": "f32"
"entityMetadataEntry": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": [
"mapper",
{
"type": "i8",
"mappings": {
"0": "byte",
"1": "int",
"2": "float",
"3": "string",
"4": "component",
"5": "item_stack",
"6": "boolean",
"7": "rotations",
"8": "block_pos",
"9": "optional_block_pos",
"10": "direction",
"11": "optional_uuid",
"12": "block_state"
}
]
],
"8": "position",
"9": [
"option",
"position"
],
"10": "varint",
"11": [
"option",
"UUID"
],
"12": "varint"
}
]
},
{
"name": "value",
"type": [
"switch",
{
"compareTo": "type",
"fields": {
"byte": "i8",
"int": "varint",
"float": "f32",
"string": "string",
"component": "string",
"item_stack": "slot",
"boolean": "bool",
"rotations": [
"container",
[
{
"name": "pitch",
"type": "f32"
},
{
"name": "yaw",
"type": "f32"
},
{
"name": "roll",
"type": "f32"
}
]
],
"block_pos": "position",
"optional_block_pos": [
"option",
"position"
],
"direction": "varint",
"optional_uuid": [
"option",
"UUID"
],
"block_state": "varint"
}
}
]
}
}
]
],
"entityMetadata": [
"entityMetadataLoop",
{
"endVal": 255,
"type": [
"container",
[
{
"anon": true,
"type": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": "i8"
}
]
]
},
{
"name": "value",
"type": [
"entityMetadataItem",
{
"compareTo": "type"
}
]
}
]
]
"type": "entityMetadataEntry"
}
]
},
Expand Down
93 changes: 34 additions & 59 deletions data/pc/1.10/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,65 +59,40 @@
}
]
]
entityMetadataItem: $compareTo ?
if 0: i8
if 1: varint
if 2: f32
if 3: string
if 4: string
if 5: slot
if 6: bool
if 7:
pitch: f32
yaw: f32
roll: f32
if 8: position
if 9: [
"option",
"position"
]
if 10: varint
if 11: [
"option",
"UUID"
]
if 12: varint
entityMetadata: [
"entityMetadataLoop",
{
"endVal": 255,
"type": [
"container",
[
{
"anon": true,
"type": [
"container",
[
{
"name": "key",
"type": "u8"
},
{
"name": "type",
"type": "i8"
}
]
]
},
{
"name": "value",
"type": [
"entityMetadataItem",
{
"compareTo": "type"
}
]
}
]
]
}
]
entityMetadataEntry:
key: u8
type: i8 =>
- byte
- int
- float
- string
- component
- item_stack
- boolean
- rotations
- block_pos
- optional_block_pos
- direction
- optional_uuid
- block_state
value: type ?
if byte: i8
if int: varint
if float: f32
if string: string
if component: string
if item_stack: slot
if boolean: bool
if rotations:
pitch: f32
yaw: f32
roll: f32
if block_pos: position
if optional_block_pos: ["option", "position"]
if direction: varint
if optional_uuid: ["option", "UUID"]
if block_state: varint
entityMetadata: ["entityMetadataLoop", { "endVal": 255, "type": "entityMetadataEntry" }]

^handshaking.toClient.types:
packet:
Expand Down
Loading