protocol: Fix position serialization

This commit is contained in:
extremeheat 2021-05-26 11:08:19 -04:00
commit 6a7ad6ab98
2 changed files with 25 additions and 95 deletions

View file

@ -4177,28 +4177,12 @@
"type": "string"
},
{
"name": "x",
"type": "lf32"
"name": "position",
"type": "vec3f"
},
{
"name": "y",
"type": "lf32"
},
{
"name": "z",
"type": "lf32"
},
{
"name": "speed_x",
"type": "lf32"
},
{
"name": "speed_y",
"type": "lf32"
},
{
"name": "speed_z",
"type": "lf32"
"name": "velocity",
"type": "vec3f"
},
{
"name": "pitch",
@ -4274,28 +4258,12 @@
"type": "string"
},
{
"name": "x",
"type": "lf32"
"name": "position",
"type": "vec3f"
},
{
"name": "y",
"type": "lf32"
},
{
"name": "z",
"type": "lf32"
},
{
"name": "speed_x",
"type": "lf32"
},
{
"name": "speed_y",
"type": "lf32"
},
{
"name": "speed_z",
"type": "lf32"
"name": "velocity",
"type": "vec3f"
},
{
"name": "pitch",
@ -4348,28 +4316,12 @@
"type": "Item"
},
{
"name": "x",
"type": "lf32"
"name": "position",
"type": "vec3f"
},
{
"name": "y",
"type": "lf32"
},
{
"name": "z",
"type": "lf32"
},
{
"name": "speed_x",
"type": "lf32"
},
{
"name": "speed_y",
"type": "lf32"
},
{
"name": "speed_z",
"type": "lf32"
"name": "velocity",
"type": "vec3f"
},
{
"name": "metadata",
@ -4547,7 +4499,7 @@
},
{
"name": "coordinates",
"type": "BlockCoordinates"
"type": "vec3f"
},
{
"name": "direction",
@ -5137,16 +5089,8 @@
"container",
[
{
"name": "x",
"type": "lf32"
},
{
"name": "y",
"type": "lf32"
},
{
"name": "z",
"type": "lf32"
"name": "position",
"type": "vec3f"
},
{
"name": "state",
@ -7192,7 +7136,7 @@
"container",
[
{
"name": "dimension_id",
"name": "dimension",
"type": "u8"
},
{

View file

@ -401,12 +401,8 @@ packet_add_player:
# Nintendo Switch). It is otherwise an empty string, and is used to decide which players
# are able to chat with each other.
platform_chat_id: string
x: lf32
y: lf32
z: lf32
speed_x: lf32
speed_y: lf32
speed_z: lf32
position: vec3f
velocity: vec3f
pitch: lf32
yaw: lf32
head_yaw: lf32
@ -428,12 +424,8 @@ packet_add_entity:
entity_id_self: zigzag64
runtime_entity_id: varint64
entity_type: string
x: lf32
y: lf32
z: lf32
speed_x: lf32
speed_y: lf32
speed_z: lf32
position: vec3f
velocity: vec3f
pitch: lf32
yaw: lf32
head_yaw: lf32
@ -452,12 +444,8 @@ packet_add_item_entity:
entity_id_self: zigzag64
runtime_entity_id: varint64
item: Item
x: lf32
y: lf32
z: lf32
speed_x: lf32
speed_y: lf32
speed_z: lf32
position: vec3f
velocity: vec3f
metadata: MetadataDictionary
is_from_fishing: bool
@ -573,7 +561,7 @@ packet_add_painting:
!bound: client
entity_id_self: zigzag64
runtime_entity_id: varint64
coordinates: BlockCoordinates
coordinates: vec3f
direction: zigzag32
title: string
@ -937,9 +925,7 @@ packet_animate:
packet_respawn:
!id: 0x2d
!bound: both
x: lf32
y: lf32
z: lf32
position: vec3f
state: u8
runtime_entity_id: varint64
@ -2023,7 +2009,7 @@ packet_script_custom_event:
packet_spawn_particle_effect:
!id: 0x76
!bound: client
dimension_id: u8
dimension: u8
entity_id: zigzag64
position: vec3f
particle_name: string