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,27 @@
|
||||
from minecraft.networking.packets import Packet
|
||||
|
||||
from minecraft.networking.types import (
|
||||
Long
|
||||
)
|
||||
|
||||
|
||||
# Formerly known as state_status_serverbound.
|
||||
def get_packets(context):
|
||||
packets = {
|
||||
RequestPacket,
|
||||
PingPacket
|
||||
}
|
||||
return packets
|
||||
|
||||
|
||||
class RequestPacket(Packet):
|
||||
id = 0x00
|
||||
packet_name = "request"
|
||||
definition = []
|
||||
|
||||
|
||||
class PingPacket(Packet):
|
||||
id = 0x01
|
||||
packet_name = "ping"
|
||||
definition = [
|
||||
{'time': Long}]
|
||||
Reference in new issue
Block a user