mirror of
https://github.com/ammaraskar/pyCraft.git
synced 2024-11-30 06:03:27 +01:00
29 lines
523 B
Python
29 lines
523 B
Python
|
from minecraft.networking.packets import Packet
|
||
|
|
||
|
from minecraft.networking.types import (
|
||
|
String, Long
|
||
|
)
|
||
|
|
||
|
|
||
|
# Formerly known as state_status_clientbound.
|
||
|
def get_packets(context):
|
||
|
packets = {
|
||
|
ResponsePacket,
|
||
|
PingPacketResponse,
|
||
|
}
|
||
|
return packets
|
||
|
|
||
|
|
||
|
class ResponsePacket(Packet):
|
||
|
id = 0x00
|
||
|
packet_name = "response"
|
||
|
definition = [
|
||
|
{'json_response': String}]
|
||
|
|
||
|
|
||
|
class PingPacketResponse(Packet):
|
||
|
id = 0x01
|
||
|
packet_name = "ping"
|
||
|
definition = [
|
||
|
{'time': Long}]
|