445a50b

Bowmap · bowmap.git · Tickets

Branches > main > 445a50b > files

Rename "protocol" to version ID

Grahp, 2026-10-09

Commit: 445a50bf5672afcb299fdd4ebc48f244db37d529
Parent: 3478630

3 changed files:

src/net/bowmap/server/game/handle.clj modified (view file)

@@ -26,7 +26,7 @@   [nil    {::p/id ::clientbound/status-response     ::p/version-name "26.3"-    ::p/protocol 777+    ::p/version-id 777     ::p/motd {::component/text "Bowmap!"               ::component/color "#9f9f9f"}     ::p/online-player-count (count (state ::server/players))

src/net/bowmap/server/packet/serverbound.clj modified (view file)

@@ -8,7 +8,7 @@   "Map of connection phases to pairs of serverbound packet IDs and readers.    The ordering of packet IDs in the vectors determines their numeric ID."   {::phase/handshaking-   [::handshaking (map< :protocol varint<+   [::handshaking (map< ::p/version-id varint<                         :address string<                         :port short<                         ::phase/phase (enum< varint< {1 ::phase/status 2 ::phase/login 3 ::phase/transfer}))]

src/net/bowmap/server/packet/writers.clj modified (view file)

@@ -145,10 +145,10 @@   "Turns 'x' into JSON and writes it as a string."   (apply> json/write-str string>)) -(defn- ->status-response [{::p/keys! [version-name protocol]+(defn- ->status-response [{::p/keys! [version-name version-id]                            ::p/keys [motd max-player-count online-player-count]}]   (cond-> {:version {:name version-name-                     :protocol protocol}}+                     :protocol version-id}}     motd (assoc :description motd)      (and max-player-count online-player-count)