regorganize packet structure as outlined in https://github.com/ammaraskar/pyCraft/pull/68
This commit is contained in:
1 parent
f8781c19c8
commit
8552c6efe5
15 files changed
+1291
-1164
No files matched your search
@@ -0,0 +1,29 @@
|
||||
from minecraft.networking.packets import Packet
|
||||
|
||||
from minecraft.networking.types import (
|
||||
String, VarIntPrefixedByteArray
|
||||
)
|
||||
|
||||
|
||||
# Formerly known as state_login_serverbound.
|
||||
def get_packets(context):
|
||||
packets = {
|
||||
LoginStartPacket,
|
||||
EncryptionResponsePacket
|
||||
}
|
||||
return packets
|
||||
|
||||
|
||||
class LoginStartPacket(Packet):
|
||||
id = 0x00
|
||||
packet_name = "login start"
|
||||
definition = [
|
||||
{'name': String}]
|
||||
|
||||
|
||||
class EncryptionResponsePacket(Packet):
|
||||
id = 0x01
|
||||
packet_name = "encryption response"
|
||||
definition = [
|
||||
{'shared_secret': VarIntPrefixedByteArray},
|
||||
{'verify_token': VarIntPrefixedByteArray}]
|
||||
Reference in new issue
Block a user