mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-29 18:55:40 -05:00
Switch to varint where I was doubting wiki.vg
This commit is contained in:
parent
46e5637a3c
commit
3121c0fdcc
1 changed files with 19 additions and 19 deletions
|
@ -76,7 +76,7 @@ var packets = {
|
||||||
play: {
|
play: {
|
||||||
toClient: {
|
toClient: {
|
||||||
keep_alive: {id: 0x00, fields: [
|
keep_alive: {id: 0x00, fields: [
|
||||||
{ name: "keepAliveId", type: "int" /* TODO: Int or VarInt */ },
|
{ name: "keepAliveId", type: "varint" },
|
||||||
]},
|
]},
|
||||||
login: {id: 0x01, fields: [
|
login: {id: 0x01, fields: [
|
||||||
{ name: "entityId", type: "int" },
|
{ name: "entityId", type: "int" },
|
||||||
|
@ -96,7 +96,7 @@ var packets = {
|
||||||
{ name: "time", type: "long" },
|
{ name: "time", type: "long" },
|
||||||
]},
|
]},
|
||||||
entity_equipment: {id: 0x04, fields: [
|
entity_equipment: {id: 0x04, fields: [
|
||||||
{ name: "entityId", type: "int" /* TODO: Int or VarInt */ },
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "slot", type: "short" },
|
{ name: "slot", type: "short" },
|
||||||
{ name: "item", type: "slot" }
|
{ name: "item", type: "slot" }
|
||||||
]},
|
]},
|
||||||
|
@ -145,8 +145,8 @@ var packets = {
|
||||||
{ name: "metadata", type: "entityMetadata" }
|
{ name: "metadata", type: "entityMetadata" }
|
||||||
]},
|
]},
|
||||||
collect: {id: 0x0d, fields: [
|
collect: {id: 0x0d, fields: [
|
||||||
{ name: "collectedEntityId", type: "int" /* TODO: Int or VarInt */},
|
{ name: "collectedEntityId", type: "varint" },
|
||||||
{ name: "collectorEntityId", type: "int" /* TODO: Int or VarInt */}
|
{ name: "collectorEntityId", type: "varint" }
|
||||||
]},
|
]},
|
||||||
spawn_entity: {id: 0x0e, fields: [
|
spawn_entity: {id: 0x0e, fields: [
|
||||||
{ name: "entityId", type: "varint" },
|
{ name: "entityId", type: "varint" },
|
||||||
|
@ -210,20 +210,20 @@ var packets = {
|
||||||
{ name: "entityId", type: "int" }
|
{ name: "entityId", type: "int" }
|
||||||
]},
|
]},
|
||||||
rel_entity_move: {id: 0x15, fields: [
|
rel_entity_move: {id: 0x15, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "dX", type: "byte" },
|
{ name: "dX", type: "byte" },
|
||||||
{ name: "dY", type: "byte" },
|
{ name: "dY", type: "byte" },
|
||||||
{ name: "dZ", type: "byte" },
|
{ name: "dZ", type: "byte" },
|
||||||
{ name: "onGround", type: "bool"}
|
{ name: "onGround", type: "bool"}
|
||||||
]},
|
]},
|
||||||
entity_look: {id: 0x16, fields: [
|
entity_look: {id: 0x16, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "yaw", type: "byte" },
|
{ name: "yaw", type: "byte" },
|
||||||
{ name: "pitch", type: "byte" },
|
{ name: "pitch", type: "byte" },
|
||||||
{ name: "onGround", type: "bool"}
|
{ name: "onGround", type: "bool"}
|
||||||
]},
|
]},
|
||||||
entity_move_look: {id: 0x17, fields: [
|
entity_move_look: {id: 0x17, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "dX", type: "byte" },
|
{ name: "dX", type: "byte" },
|
||||||
{ name: "dY", type: "byte" },
|
{ name: "dY", type: "byte" },
|
||||||
{ name: "dZ", type: "byte" },
|
{ name: "dZ", type: "byte" },
|
||||||
|
@ -232,7 +232,7 @@ var packets = {
|
||||||
{ name: "onGround", type: "bool"}
|
{ name: "onGround", type: "bool"}
|
||||||
]},
|
]},
|
||||||
entity_teleport: {id: 0x18, fields: [
|
entity_teleport: {id: 0x18, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "x", type: "int" },
|
{ name: "x", type: "int" },
|
||||||
{ name: "y", type: "int" },
|
{ name: "y", type: "int" },
|
||||||
{ name: "z", type: "int" },
|
{ name: "z", type: "int" },
|
||||||
|
@ -241,7 +241,7 @@ var packets = {
|
||||||
{ name: "onGround", type: "bool"}
|
{ name: "onGround", type: "bool"}
|
||||||
]},
|
]},
|
||||||
entity_head_rotation: {id: 0x19, fields: [
|
entity_head_rotation: {id: 0x19, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "headYaw", type: "byte" },
|
{ name: "headYaw", type: "byte" },
|
||||||
]},
|
]},
|
||||||
entity_status: {id: 0x1a, fields: [
|
entity_status: {id: 0x1a, fields: [
|
||||||
|
@ -254,18 +254,18 @@ var packets = {
|
||||||
{ name: "leash", type: "bool" }
|
{ name: "leash", type: "bool" }
|
||||||
]},
|
]},
|
||||||
entity_metadata: {id: 0x1c, fields: [
|
entity_metadata: {id: 0x1c, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "metadata", type: "entityMetadata" }
|
{ name: "metadata", type: "entityMetadata" }
|
||||||
]},
|
]},
|
||||||
entity_effect: {id: 0x1d, fields: [
|
entity_effect: {id: 0x1d, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "effectId", type: "byte" },
|
{ name: "effectId", type: "byte" },
|
||||||
{ name: "amplifier", type: "byte" },
|
{ name: "amplifier", type: "byte" },
|
||||||
{ name: "duration", type: "varint" },
|
{ name: "duration", type: "varint" },
|
||||||
{ name: "hideParticles", type: "bool" }
|
{ name: "hideParticles", type: "bool" }
|
||||||
]},
|
]},
|
||||||
remove_entity_effect: {id: 0x1e, fields: [
|
remove_entity_effect: {id: 0x1e, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "effectId", type: "byte" }
|
{ name: "effectId", type: "byte" }
|
||||||
]},
|
]},
|
||||||
experience: {id: 0x1f, fields: [
|
experience: {id: 0x1f, fields: [
|
||||||
|
@ -274,7 +274,7 @@ var packets = {
|
||||||
{ name: "totalExperience", type: "varint" }
|
{ name: "totalExperience", type: "varint" }
|
||||||
]},
|
]},
|
||||||
update_attributes: {id: 0x20, fields: [
|
update_attributes: {id: 0x20, fields: [
|
||||||
{ name: "entityId", type: "int" }, /* TODO: Int or VarInt */
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "count", type: "count", typeArgs: { type: "int", countFor: "properties" } },
|
{ name: "count", type: "count", typeArgs: { type: "int", countFor: "properties" } },
|
||||||
{ name: "properties", type: "array", typeArgs: { count: "count",
|
{ name: "properties", type: "array", typeArgs: { count: "count",
|
||||||
type: "container", typeArgs: { fields: [
|
type: "container", typeArgs: { fields: [
|
||||||
|
@ -295,8 +295,8 @@ var packets = {
|
||||||
{ name: "z", type: "int" },
|
{ name: "z", type: "int" },
|
||||||
{ name: "groundUp", type: "bool" },
|
{ name: "groundUp", type: "bool" },
|
||||||
{ name: "bitMap", type: "ushort" },
|
{ name: "bitMap", type: "ushort" },
|
||||||
{ name: "chunkDataLength", type: "count", typeArgs: { type: "int", countFor: "compressedChunkData" } }, /* TODO: Int or VarInt */
|
{ name: "chunkDataLength", type: "count", typeArgs: { type: "varint", countFor: "chunkData" } },
|
||||||
{ name: "chunkData", type: "buffer", typeArgs: { count: "compressedChunkDataLength" } },
|
{ name: "chunkData", type: "buffer", typeArgs: { count: "chunkDataLength" } },
|
||||||
]},
|
]},
|
||||||
multi_block_change: {id: 0x22, fields: [
|
multi_block_change: {id: 0x22, fields: [
|
||||||
{ name: "chunkX", type: "int" },
|
{ name: "chunkX", type: "int" },
|
||||||
|
@ -600,13 +600,13 @@ var packets = {
|
||||||
},
|
},
|
||||||
toServer: {
|
toServer: {
|
||||||
keep_alive: {id: 0x00, fields: [
|
keep_alive: {id: 0x00, fields: [
|
||||||
{ name: "keepAliveId", type: "int" /* TODO: Int or VarInt */ }
|
{ name: "keepAliveId", type: "varint" }
|
||||||
]},
|
]},
|
||||||
chat: {id: 0x01, fields: [
|
chat: {id: 0x01, fields: [
|
||||||
{ name: "message", type: "string" }
|
{ name: "message", type: "string" }
|
||||||
]},
|
]},
|
||||||
use_entity: {id: 0x02, fields: [
|
use_entity: {id: 0x02, fields: [
|
||||||
{ name: "target", type: "int" /* TODO: Int or VarInt */},
|
{ name: "target", type: "varint" },
|
||||||
{ name: "mouse", type: "byte" },
|
{ name: "mouse", type: "byte" },
|
||||||
{ name: "x", type: "float"},
|
{ name: "x", type: "float"},
|
||||||
{ name: "y", type: "float"},
|
{ name: "y", type: "float"},
|
||||||
|
@ -656,9 +656,9 @@ var packets = {
|
||||||
{ name: "animation", type: "byte" }
|
{ name: "animation", type: "byte" }
|
||||||
]},
|
]},
|
||||||
entity_action: {id: 0x0b, fields: [
|
entity_action: {id: 0x0b, fields: [
|
||||||
{ name: "entityId", type: "varint" /* TODO: Int or VarInt */},
|
{ name: "entityId", type: "varint" },
|
||||||
{ name: "actionId", type: "varint" },
|
{ name: "actionId", type: "varint" },
|
||||||
{ name: "jumpBoost", type: "varint" /* TODO: Int or VarInt */}
|
{ name: "jumpBoost", type: "varint" }
|
||||||
]},
|
]},
|
||||||
steer_vehicle: {id: 0x0c, fields: [
|
steer_vehicle: {id: 0x0c, fields: [
|
||||||
{ name: "sideways", type: "float" },
|
{ name: "sideways", type: "float" },
|
||||||
|
|
Loading…
Reference in a new issue