packet.clj

Bowmap · bowmap.git · Tickets

Branches > main > 208a969 > files / src / net / bowmap / server / protocol / packet.clj

(ns net.bowmap.server.protocol.packet
  "A Minecraft protocol packet sent either to the server (serverbound),
   or to the client (clientbound).
   See https://minecraft.wiki/w/Java_Edition_protocol/Packets"
  (:require
   [clojure.set :as set]
   [clojure.spec.alpha :as s]
   [net.bowmap.server.protocol.clientbound-packets :as clientbound]
   [net.bowmap.server.protocol.serverbound-packets :as serverbound]))

(s/def ::id (set/union clientbound/ids serverbound/ids))
(s/def ::packet (s/keys :opt [::id]))