From 91a82c5aa761f2cd3832e24347f456abc58e19b4 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 16:19:31 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=9A=84=E5=89=8D=E8=A8=80=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- definitions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions.md b/definitions.md index 0a3edf2..10039d4 100644 --- a/definitions.md +++ b/definitions.md @@ -1,5 +1,5 @@ # 定义 - +Minecraft服务器是通过TCP进行连接并且使用数据包来进行通讯。一个数据包是由一连串通过TCP的字节组成。一个数据包的含义由其ID以及当时的连接状态两方面来决定。每个连接最初的步骤都是握手,并且通过数据包握手(握手,0x00,服务端)和成功登录(登录,0x02,客户端)来进行切换。 ## 类型定义 全部发向网络的数据都遵守大端序,这意味着字节将按照高位到地位的顺序发送。大部分现在的计算机都是使用的小端序,所以有可能需要在发送信息前交换字节顺序。 From 040fb9126aa39b0f6bc8f46540105eb41cf7bd05 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 16:31:56 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20packets.md=20?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E7=BF=BB=E8=AF=91=E7=BC=BA=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packets.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packets.md b/packets.md index d31379b..9b52069 100644 --- a/packets.md +++ b/packets.md @@ -9,6 +9,8 @@ ###数据包格式 +##没有数据压缩 + @@ -28,15 +30,15 @@ - - + +
Data Byte Array 由连接状态和数据包ID两方面决定
##数据压缩 -一旦一个压缩数据包组被发送,后面的所有数据包都将使用zlib压缩算法压缩发送。 +一旦一个压缩数据包组被发送,后面的所有数据包都将使用zlib压缩算法压缩发送。数据包的格式比没有压缩的数据包变得更加轻量。 From 4747d6080b08a4b577b949541d7cd8d4c93a4bff Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 16:34:57 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=81=97=E5=BF=98?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packets.md b/packets.md index 9b52069..aa648c4 100644 --- a/packets.md +++ b/packets.md @@ -30,7 +30,7 @@ - + From e6f12f70e505971e6e6c04ff3346b66cafe44004 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 16:56:26 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A05.2.10=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serverboundplay.md | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/serverboundplay.md b/serverboundplay.md index 52b96b9..9fd1846 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -1,6 +1,6 @@ ## 使用实体 -客户端会在玩家攻击或右键一个实体(比如玩家,马,矿车...)时发送此封包给服务器. +客户端会在玩家攻击或右键一个实体(比如玩家,马,矿车……)时发送此封包给服务器. 原版服务器只会在实体距离玩家不超过4单位长度,并且两者之间视线不受阻碍时,才会处理此封包.
(译注:在1.8中的规则是:若两者之间没有视线,则距离不能超过3. 若视线通畅,则距离不能超过6.) @@ -371,4 +371,27 @@ Face代表敲击的砖块面,有如下6种值: 在原版的Beta客户端中,砖块或物品ID等于客户端中玩家拿着的物品,并且客户端会在每次玩家对着砖块表面按右键时都发送一次这个封包,因此对于ID的安全性没有保证. 然而,原版的服务器端似乎会忽略客户端发来的ID,只采用服务器的数据. 在1.2.5和1.3.2中,客户端在一次回话中会发送真实物品ID和一个字段值为-1的封包. (译注:在1.7.2中,服务器确实会在大多数情况下忽略客户端发来的ID,唯一一种用到客户端发来的物品ID的情况是在检查物品是否耗尽的时候. 至于那个字段值为-1的情况,还没有被观测到...) -另外,在使用水桶时,原版客户端可能会发送两个封包:一个正常的放置砖块封包,然后是一个特殊情况的放置砖块封包. 它们会在你使用水桶的时候依次发送. 第一个不会起任何作用,真正执行舀水动作的是第二个封包,取水的位置是在服务器端根据玩家的位置和朝向来测算的. \ No newline at end of file +另外,在使用水桶时,原版客户端可能会发送两个封包:一个正常的放置砖块封包,然后是一个特殊情况的放置砖块封包. 它们会在你使用水桶的时候依次发送. 第一个不会起任何作用,真正执行舀水动作的是第二个封包,取水的位置是在服务器端根据玩家的位置和朝向来测算的. + +##玩家手持物品切换 + +切换快捷栏中的物品时会发送 + +
Data Byte Array Byte Array 由连接状态和数据包ID两方面决定
+ + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x09游戏服务器Slot Short 玩家所选择的栏位(0-8)
\ No newline at end of file From 46f29fb2a397fb3c847fec404f917882d044391b Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 16:58:31 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=93=E6=9C=89?= =?UTF-8?q?=E5=90=8D=E8=AF=8D=EF=BC=88packet=20ID=EF=BC=89=E7=9A=84?= =?UTF-8?q?=E8=A7=A3=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- definitions.md | 2 +- packets.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/definitions.md b/definitions.md index 10039d4..c9cf24d 100644 --- a/definitions.md +++ b/definitions.md @@ -1,5 +1,5 @@ # 定义 -Minecraft服务器是通过TCP进行连接并且使用数据包来进行通讯。一个数据包是由一连串通过TCP的字节组成。一个数据包的含义由其ID以及当时的连接状态两方面来决定。每个连接最初的步骤都是握手,并且通过数据包握手(握手,0x00,服务端)和成功登录(登录,0x02,客户端)来进行切换。 +Minecraft服务器是通过TCP进行连接并且使用数据包来进行通讯。一个数据包是由一连串通过TCP的字节组成。一个数据包的含义由其识别ID以及当时的连接状态两方面来决定。每个连接最初的步骤都是握手,并且通过数据包握手(握手,0x00,服务端)和成功登录(登录,0x02,客户端)来进行切换。 ## 类型定义 全部发向网络的数据都遵守大端序,这意味着字节将按照高位到地位的顺序发送。大部分现在的计算机都是使用的小端序,所以有可能需要在发送信息前交换字节顺序。 diff --git a/packets.md b/packets.md index aa648c4..bcd4254 100644 --- a/packets.md +++ b/packets.md @@ -21,7 +21,7 @@ Length VarInt - 数据与包ID长度的总和 + 数据与包识别ID长度的总和 Packet ID @@ -31,7 +31,7 @@ Data Byte Array - 由连接状态和数据包ID两方面决定 + 由连接状态和包识别ID两方面决定 From cf6fafd0003d693ee5d6b92e8916fd22da40fe21 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 17:02:52 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E5=A2=9E=E5=8A=A05.2.11=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serverboundplay.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/serverboundplay.md b/serverboundplay.md index 9fd1846..c73dc14 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -394,4 +394,25 @@ Face代表敲击的砖块面,有如下6种值: Short 玩家所选择的栏位(0-8) + + +##动画 + +当玩家手臂摆动时发送 + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0A游戏服务器无字段
\ No newline at end of file From 65e08931e2782641f3bacc4d1b97dfc0ec369259 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 17:20:53 +0800 Subject: [PATCH 07/14] =?UTF-8?q?5.2.12=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serverboundplay.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/serverboundplay.md b/serverboundplay.md index c73dc14..453ab27 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -415,4 +415,74 @@ Face代表敲击的砖块面,有如下6种值: 服务器 无字段 + + +##实体表现 + +当玩家蹲下,离开床,或者奔跑等等动作时发送。使用0x28发送动画动作到客户端,客户端会在“离开床”被点击时发送此动作ID为3的包。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0B游戏服务器Entity IDVarInt玩家的ID
Action IDVarInt动作ID,看下面
Jump BoostVarInt马的加速跳,范围是0->100
+ +动作ID可以是以下数值: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ID动作
0蹲伏
1解除蹲伏
2离开床
3开始奔跑
4停止奔跑
5骑马跳跃
6打开物品栏
\ No newline at end of file From b7474a9f00ac2f43d34851ce75e6d7bd861d9572 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 17:26:06 +0800 Subject: [PATCH 08/14] =?UTF-8?q?5.2.13=20=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- serverboundplay.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/serverboundplay.md b/serverboundplay.md index 453ab27..8721796 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -485,4 +485,35 @@ Face代表敲击的砖块面,有如下6种值: 6 打开物品栏 - \ No newline at end of file + + +##驾驶交通工具 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0B游戏服务器SidewaysFloat玩家左侧面
ForwardFloat玩家向前
FlagsUnsigned Byte位掩码: 0x1: 跳跃 0x2: 卸下
From 25ff2b0c895dae5d24ec9dece6d112b7a69fbccc Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 17:31:14 +0800 Subject: [PATCH 09/14] =?UTF-8?q?README.md=E6=94=B9=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 ++++++++-------- serverboundplay.md | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3687db4..3c17730 100644 --- a/README.md +++ b/README.md @@ -104,10 +104,10 @@ Minecraft 协议 * 5.2.7 [玩家坐标和视点](serverboundplay.md#玩家位置与视点) * 5.2.8 [玩家挖掘](serverboundplay.md#玩家挖掘) * 5.2.9 [玩家放置方块](serverboundplay.md#玩家放置砖块) - * 5.2.10 持有物品改变 - * 5.2.11 动画 - * 5.2.12 实体表现 - * 5.2.13 驾驶交通工具 + * 5.2.10 [持有物品改变](serverboundplay.md#持有物品改变) + * 5.2.11 [动画](serverboundplay.md#动画) + * 5.2.12 [实体表现](serverboundplay.md#实体表现) + * 5.2.13 [驾驶交通工具](serverboundplay.md#驾驶交通工具) * 5.2.14 关闭窗口 * 5.2.15 点击窗口 * 5.2.16 确认事务 @@ -245,10 +245,10 @@ Minecraft 协议 * 5.2.7 Player Position And Look // szszss [完成] * 5.2.8 Player Digging // szszss [完成] * 5.2.9 Player Block Placement // szszss [完成] - * 5.2.10 Held Item Change - * 5.2.11 Animation - * 5.2.12 Entity Action - * 5.2.13 Steer Vehicle + * 5.2.10 Held Item Change //roer [完成] + * 5.2.11 Animation //roer [完成] + * 5.2.12 Entity Action //roer [完成] + * 5.2.13 Steer Vehicle //roer [完成] * 5.2.14 Close Window * 5.2.15 Click Window * 5.2.16 Confirm Transaction diff --git a/serverboundplay.md b/serverboundplay.md index 8721796..4d3e250 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -373,7 +373,7 @@ Face代表敲击的砖块面,有如下6种值: 另外,在使用水桶时,原版客户端可能会发送两个封包:一个正常的放置砖块封包,然后是一个特殊情况的放置砖块封包. 它们会在你使用水桶的时候依次发送. 第一个不会起任何作用,真正执行舀水动作的是第二个封包,取水的位置是在服务器端根据玩家的位置和朝向来测算的. -##玩家手持物品切换 +##持有物品改变 切换快捷栏中的物品时会发送 From 2b906f39fa106cbf8738676e685d538fc4c3cd78 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 18:08:08 +0800 Subject: [PATCH 10/14] =?UTF-8?q?5.2.14=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- serverboundplay.md | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c17730..d9f3e3f 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ Minecraft 协议 * 5.2.11 [动画](serverboundplay.md#动画) * 5.2.12 [实体表现](serverboundplay.md#实体表现) * 5.2.13 [驾驶交通工具](serverboundplay.md#驾驶交通工具) - * 5.2.14 关闭窗口 + * 5.2.14 [关闭窗口](serverboundplay.md#关闭窗口) * 5.2.15 点击窗口 * 5.2.16 确认事务 * 5.2.17 创造模式背包事件 diff --git a/serverboundplay.md b/serverboundplay.md index 4d3e250..38b7b84 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -517,3 +517,28 @@ Face代表敲击的砖块面,有如下6种值: 位掩码: 0x1: 跳跃 0x2: 卸下 + +##关闭窗口 + +客户端会在窗口关闭的时候发送此数据包. + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0D游戏服务器Window IDByte这是窗口关闭的ID。0是物品栏。
+ + From 109732e1c179f71340fcaeb1eb406f6c832fdf13 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 18:40:33 +0800 Subject: [PATCH 11/14] =?UTF-8?q?5.2.15=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E4=BB=A5=E5=8F=8AREADME=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +- serverboundplay.md | 185 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d9f3e3f..3836077 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ Minecraft 协议 * 5.2.12 [实体表现](serverboundplay.md#实体表现) * 5.2.13 [驾驶交通工具](serverboundplay.md#驾驶交通工具) * 5.2.14 [关闭窗口](serverboundplay.md#关闭窗口) - * 5.2.15 点击窗口 + * 5.2.15 [点击窗口](serverboundplay.md#点击窗口) * 5.2.16 确认事务 * 5.2.17 创造模式背包事件 * 5.2.18 附魔物品 @@ -249,8 +249,8 @@ Minecraft 协议 * 5.2.11 Animation //roer [完成] * 5.2.12 Entity Action //roer [完成] * 5.2.13 Steer Vehicle //roer [完成] - * 5.2.14 Close Window - * 5.2.15 Click Window + * 5.2.14 Close Window //roer [完成] + * 5.2.15 Click Window //roer [完成] * 5.2.16 Confirm Transaction * 5.2.17 Creative Inventory Action * 5.2.18 Enchant Item diff --git a/serverboundplay.md b/serverboundplay.md index 38b7b84..867c8c1 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -541,4 +541,189 @@ Face代表敲击的砖块面,有如下6种值: +##点击窗口 + +当玩家点击一个窗口中的栏位 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0E游戏服务器Window IDByte点击的窗口的ID。0是玩家物品栏
SlotShort被点击的栏位,看下面
ButtonByte点击时使用的按钮,看下面
Action NumberShort动作的唯一识别数字,通过一个计数器实现,从1开始。服务器使用它返回一个确认事务
ModeByte物品操作模式,看下面
Clicked itemSlot
+ +请看[物品窗口](http://wiki.vg/Inventory#Windows)来知晓栏位是如何被索引的。 + +当右击一个物品的栈区时,栈中一半的物品都会被拿起并且另外一半还在栏位中。如果栈区内物品数量为奇数,那么在栏位中的那一半会是较小的那一份。 + +通过模式和按钮的组合来决定客户端发送的不同种类的点击。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模式按钮栏位触发行为
00Normal鼠标左键
1Normal鼠标右键
10NormalShift+鼠标左键
1NormalShift+鼠标右键(相同行为)
20Normal数字键1
1Normal数字键2
2Normal数字键3
8Normal数字键8
32Normal鼠标中键
40Normal丢弃键(Q)
1NormalCtrl+丢弃键(Q)(扔掉一整个栏位的物品)
0-999在没有物品被鼠标拿起的情况下左击物品栏的外边(非op模式)
1-999在没有物品被鼠标拿起的情况下右击物品栏的外边(非op模式)
50-999开始鼠标左键拖拽(或者是中键)
4-999开始鼠标右键拖拽
1Normal为鼠标左键拖拽增加栏位
5Normal为鼠标右键拖拽增加栏位
2-999结束鼠标左键拖拽
6-999结束鼠标右键拖拽
60Normal双击
+ +从1.5版本开始,“画笔模式”可以在物品栏窗口使用了。首先拿起一栈物品(至少超过一个),然后按住鼠标按键(可以是左键,右键或者中键)并且拖拽其经过空栏位(在右键按下时可以经过具有相同物品的栏位)。 +在鼠标按钮放开的时候(通常会处理第一个“拿起”的数据包),客户端会发送以下信息到服务器: + +1. 模式5,栏位 -999,按键(左键是0 | 右键是4)的数据包 +2. 所有被“涂过”的栏位,模式仍然是5,按键(1 | 5)的数据包 +3. 模式5,栏位 -999,按键(2 | 6)的数据包 + +如果任何发送的“涂画”数据包不同于现在正在发送中的(打个比方,开始,经过一些栏位,然后另外一个开始了;或者在途中点击了左键),那么现在涂画的状态会被重置取消。 + + From 5e8191b52befe7e420fe2cc90886bd0f94f73cad Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 18:50:12 +0800 Subject: [PATCH 12/14] =?UTF-8?q?5.2.16=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- serverboundplay.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3836077..da19ff0 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Minecraft 协议 * 5.2.13 [驾驶交通工具](serverboundplay.md#驾驶交通工具) * 5.2.14 [关闭窗口](serverboundplay.md#关闭窗口) * 5.2.15 [点击窗口](serverboundplay.md#点击窗口) - * 5.2.16 确认事务 + * 5.2.16 [确认事务](serverboundplay.md#确认事务) * 5.2.17 创造模式背包事件 * 5.2.18 附魔物品 * 5.2.19 修改木牌 @@ -251,7 +251,7 @@ Minecraft 协议 * 5.2.13 Steer Vehicle //roer [完成] * 5.2.14 Close Window //roer [完成] * 5.2.15 Click Window //roer [完成] - * 5.2.16 Confirm Transaction + * 5.2.16 Confirm Transaction //roer [完成] * 5.2.17 Creative Inventory Action * 5.2.18 Enchant Item * 5.2.19 Update Sign diff --git a/serverboundplay.md b/serverboundplay.md index 867c8c1..c395684 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -725,5 +725,34 @@ Face代表敲击的砖块面,有如下6种值: 如果任何发送的“涂画”数据包不同于现在正在发送中的(打个比方,开始,经过一些栏位,然后另外一个开始了;或者在途中点击了左键),那么现在涂画的状态会被重置取消。 +##确认事务 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x0F游戏服务器Window IDByte发生该事件的窗口ID
Action NumberShort每个被接受的行为都有一个唯一的识别码,这个字段是对应这个识别码的
AcceptedBoolean当行为被接受时
From b4a34dc066fe0774bda51101481b997bea6bb01e Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 19:00:19 +0800 Subject: [PATCH 13/14] =?UTF-8?q?5.2.17=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 +++++++++--------- serverboundplay.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index da19ff0..0e65a6b 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ Minecraft 协议 * 5.2.14 [关闭窗口](serverboundplay.md#关闭窗口) * 5.2.15 [点击窗口](serverboundplay.md#点击窗口) * 5.2.16 [确认事务](serverboundplay.md#确认事务) - * 5.2.17 创造模式背包事件 + * 5.2.17 [创造模式背包事件](serverboundplay.md#创造模式背包事件) * 5.2.18 附魔物品 * 5.2.19 修改木牌 * 5.2.20 玩家能力 @@ -245,14 +245,14 @@ Minecraft 协议 * 5.2.7 Player Position And Look // szszss [完成] * 5.2.8 Player Digging // szszss [完成] * 5.2.9 Player Block Placement // szszss [完成] - * 5.2.10 Held Item Change //roer [完成] - * 5.2.11 Animation //roer [完成] - * 5.2.12 Entity Action //roer [完成] - * 5.2.13 Steer Vehicle //roer [完成] - * 5.2.14 Close Window //roer [完成] - * 5.2.15 Click Window //roer [完成] - * 5.2.16 Confirm Transaction //roer [完成] - * 5.2.17 Creative Inventory Action + * 5.2.10 Held Item Change //roer [完成] + * 5.2.11 Animation //roer [完成] + * 5.2.12 Entity Action //roer [完成] + * 5.2.13 Steer Vehicle //roer [完成] + * 5.2.14 Close Window //roer [完成] + * 5.2.15 Click Window //roer [完成] + * 5.2.16 Confirm Transaction //roer [完成] + * 5.2.17 Creative Inventory Action//roer [完成] * 5.2.18 Enchant Item * 5.2.19 Update Sign * 5.2.20 Player Abilities diff --git a/serverboundplay.md b/serverboundplay.md index c395684..0c64d8f 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -756,3 +756,33 @@ Face代表敲击的砖块面,有如下6种值: +##创造模式背包事件 + +当创造模式用户是在标准物品栏模式(不是一个合成台模式),服务器会发送一个数据包。 + +- 当一个物品被扔进快捷栏 +- 当一个物品从快捷栏中拿起(物品ID是-1) + + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x10游戏服务器SlotShort物品栏位
Clicked ItemSlot
\ No newline at end of file From 297bbe7530596cc4ae5e4fd407868a658b67b099 Mon Sep 17 00:00:00 2001 From: roer Date: Sun, 25 Jan 2015 19:07:11 +0800 Subject: [PATCH 14/14] =?UTF-8?q?5.2.18=E7=BF=BB=E8=AF=91=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- serverboundplay.md | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e65a6b..9422f5b 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,7 @@ Minecraft 协议 * 5.2.15 [点击窗口](serverboundplay.md#点击窗口) * 5.2.16 [确认事务](serverboundplay.md#确认事务) * 5.2.17 [创造模式背包事件](serverboundplay.md#创造模式背包事件) - * 5.2.18 附魔物品 + * 5.2.18 [附魔物品](serverboundplay.md#附魔物品) * 5.2.19 修改木牌 * 5.2.20 玩家能力 * 5.2.21 Tab补全 @@ -253,7 +253,7 @@ Minecraft 协议 * 5.2.15 Click Window //roer [完成] * 5.2.16 Confirm Transaction //roer [完成] * 5.2.17 Creative Inventory Action//roer [完成] - * 5.2.18 Enchant Item + * 5.2.18 Enchant Item //roer [完成] * 5.2.19 Update Sign * 5.2.20 Player Abilities * 5.2.21 Tab-Complete diff --git a/serverboundplay.md b/serverboundplay.md index 0c64d8f..ffa9a44 100644 --- a/serverboundplay.md +++ b/serverboundplay.md @@ -785,4 +785,30 @@ Face代表敲击的砖块面,有如下6种值: Slot + + +##附魔物品 + + + + + + + + + + + + + + + + + + + + + + +
包标识符类别绑定到字段名字段类型备注
0x11游戏服务器Window IDByte附魔台窗口ID
EnchantmentByte点击的附魔栏位,从最上面开始计0
\ No newline at end of file