a96563e

Branches > facts > a96563e > files / .gitignore

Move net.bowmap.network.* to net.bowmap.protocol.*

Grahp, 2026-08-22

Commit: a96563e0b81855cbb310e6b1dba3401fb8893fbf
Parent: a212003

17 changed files:

src/net/bowmap/core.clj modified (view file)

@@ -1,6 +1,6 @@ (ns net.bowmap.core   (:require-   [net.bowmap.network.server :as server]))+   [net.bowmap.protocol.server :as server]))  (defn start-server! []   (Thread/.start (Thread. #(server/start-server! 25565)))

src/net/bowmap/protocol/chunk.clj renamed from src/net/bowmap/network/chunk.clj (view file)

@@ -1,4 +1,4 @@-(ns net.bowmap.network.chunk+(ns net.bowmap.protocol.chunk   (:require [clojure.spec.alpha :as s]))  ; TODO these keys aren't even used in the chunk code lol

src/net/bowmap/protocol/client.clj renamed from src/net/bowmap/network/client.clj (view file)

@@ -1,9 +1,9 @@-(ns net.bowmap.network.client+(ns net.bowmap.protocol.client   (:require    [clojure.core.async :refer [chan]]    [clojure.spec.alpha :as s]    [net.bowmap.transport.connection :as connection]-   [net.bowmap.network.state :as state]))+   [net.bowmap.protocol.state :as state]))  (s/def ::client (s/keys :opt [::state/connection-state ::connection/connection])) 

src/net/bowmap/protocol/handle.clj renamed from src/net/bowmap/network/handle.clj (view file)

@@ -1,13 +1,13 @@-(ns net.bowmap.network.handle+(ns net.bowmap.protocol.handle   (:require-   [net.bowmap.network.chunk :as chunk]-   [net.bowmap.network.client :as client]-   [net.bowmap.network.packet :as pk]-   [net.bowmap.network.packets.clientbound :as clientbound]-   [net.bowmap.network.packets.registry :as registry]-   [net.bowmap.network.packets.serverbound :as serverbound]-   [net.bowmap.network.registry :as reg]-   [net.bowmap.network.state :as state]+   [net.bowmap.protocol.chunk :as chunk]+   [net.bowmap.protocol.client :as client]+   [net.bowmap.protocol.packet :as pk]+   [net.bowmap.protocol.packet.clientbound :as clientbound]+   [net.bowmap.protocol.packet.registry :as registry]+   [net.bowmap.protocol.packet.serverbound :as serverbound]+   [net.bowmap.protocol.registry :as reg]+   [net.bowmap.protocol.state :as state]    [net.bowmap.server.entity :as entity]    [net.bowmap.server.gamemode :as gamemode]    [net.bowmap.server.player :as player]

src/net/bowmap/protocol/packet.clj renamed from src/net/bowmap/network/packet.clj (view file)

@@ -1,4 +1,4 @@-(ns net.bowmap.network.packet+(ns net.bowmap.protocol.packet   (:require    [clojure.spec.alpha :as s])) 

src/net/bowmap/protocol/packet/clientbound.clj renamed from src/net/bowmap/network/packets/clientbound.clj (view file)

@@ -1,13 +1,13 @@-(ns net.bowmap.network.packets.clientbound+(ns net.bowmap.protocol.packet.clientbound   (:require-   [net.bowmap.network.packet :as pk]-   [net.bowmap.network.packets.writers :as write+   [net.bowmap.protocol.packet :as pk]+   [net.bowmap.protocol.packet.writers :as write     :refer [bit-mask-> boolean-> byte-> chunk-data-> coerce context-optional->             double-> enum-> float-> game-profile-> identifier-> int-> json->             length-prefixed light-data-> list-> long-> nbt-> optional-> or->             position-> string-> ubyte-> uuid-> varint->]]-   [net.bowmap.network.registry :as reg]-   [net.bowmap.network.state :as state]+   [net.bowmap.protocol.registry :as reg]+   [net.bowmap.protocol.state :as state]    [net.bowmap.server.gamemode :as gamemode])   (:import    [io.netty.buffer Unpooled]))

src/net/bowmap/protocol/packet/readers.clj renamed from src/net/bowmap/network/packets/readers.clj (view file)

@@ -1,10 +1,10 @@-(ns net.bowmap.network.packets.readers+(ns net.bowmap.protocol.packet.readers   "Functions for reading data from frames.    When given bad data, read functions will throw.    See https://minecraft.wiki/w/Java_Edition_protocol/Packets#Data_types"   (:require    [clojure.spec.alpha :as s]-   [net.bowmap.network.packets.types :as t]+   [net.bowmap.protocol.packet.types :as t]    [net.bowmap.server.location :as location])   (:import    [io.netty.buffer ByteBuf]

src/net/bowmap/protocol/packet/registry.clj renamed from src/net/bowmap/network/packets/registry.clj (view file)

@@ -1,8 +1,8 @@-(ns net.bowmap.network.packets.registry+(ns net.bowmap.protocol.packet.registry   (:require-   [net.bowmap.network.packet :as pk]-   [net.bowmap.network.packets.clientbound :as clientbound]-   [net.bowmap.network.registry :as reg]))+   [net.bowmap.protocol.packet :as pk]+   [net.bowmap.protocol.packet.clientbound :as clientbound]+   [net.bowmap.protocol.registry :as reg]))  ; Not in love with this... (defn registry-packets []

src/net/bowmap/protocol/packet/serverbound.clj renamed from src/net/bowmap/network/packets/serverbound.clj (view file)

@@ -1,11 +1,11 @@-(ns net.bowmap.network.packets.serverbound+(ns net.bowmap.protocol.packet.serverbound   (:require-   [net.bowmap.network.packet :as pk]-   [net.bowmap.network.packets.readers+   [net.bowmap.protocol.packet :as pk]+   [net.bowmap.protocol.packet.readers     :refer [->bit-mask ->boolean ->byte ->double ->enum ->float ->identifier             ->int ->list ->long ->optional ->location ->short ->string ->ubyte             ->uuid ->varint coerce]]-   [net.bowmap.network.state :as state]))+   [net.bowmap.protocol.state :as state]))  (def packet-order   "Map of connection states to vectors of serverbound packet ids in the order the appear in the protocol."

src/net/bowmap/protocol/packet/types.clj renamed from src/net/bowmap/network/packets/types.clj (view file)

@@ -1,4 +1,4 @@-(ns net.bowmap.network.packets.types+(ns net.bowmap.protocol.packet.types   (:require    [clojure.spec.alpha :as s])) 

src/net/bowmap/protocol/packet/writers.clj renamed from src/net/bowmap/network/packets/writers.clj (view file)

@@ -1,4 +1,4 @@-(ns net.bowmap.network.packets.writers+(ns net.bowmap.protocol.packet.writers   "Functions to write Minecraft protocol types.    When given bad data, write functions will throw.    See https://minecraft.wiki/w/Java_Edition_protocol/Packets#Data_types"@@ -6,7 +6,7 @@    [clojure.spec.alpha :as s]    [clojure.data.json :as json]    [clojure.set :as set]-   [net.bowmap.network.packets.types :as t])+   [net.bowmap.protocol.packet.types :as t])   (:import    [io.netty.buffer ByteBuf CompositeByteBuf Unpooled]    [java.nio.charset Charset]

src/net/bowmap/protocol/registry.clj renamed from src/net/bowmap/network/registry.clj (view file)

@@ -1,7 +1,7 @@-(ns net.bowmap.network.registry+(ns net.bowmap.protocol.registry   (:require    [clojure.set :as set]-   [net.bowmap.network.chunk :as chunk]))+   [net.bowmap.protocol.chunk :as chunk]))  (def world-dimension "world") 

src/net/bowmap/protocol/server.clj renamed from src/net/bowmap/network/server.clj (view file)

@@ -1,11 +1,11 @@-(ns net.bowmap.network.server+(ns net.bowmap.protocol.server   (:require    [clojure.core.async :refer [<!! >!! alt!! io-thread put!]]-   [net.bowmap.network.client :as client]-   [net.bowmap.network.handle :as handle]-   [net.bowmap.network.packets.clientbound :refer [encode-packet!]]-   [net.bowmap.network.packets.serverbound :refer [decode-packet!]]-   [net.bowmap.network.state :as state]+   [net.bowmap.protocol.client :as client]+   [net.bowmap.protocol.handle :as handle]+   [net.bowmap.protocol.packet.clientbound :refer [encode-packet!]]+   [net.bowmap.protocol.packet.serverbound :refer [decode-packet!]]+   [net.bowmap.protocol.state :as state]    [net.bowmap.server.logic :as logic]    [net.bowmap.stormbow.responses :refer [handle-responses!]]    [net.bowmap.transport.connection :as connection]

src/net/bowmap/protocol/state.clj renamed from src/net/bowmap/network/state.clj (view file)

@@ -1,4 +1,4 @@-(ns net.bowmap.network.state+(ns net.bowmap.protocol.state   (:require [clojure.spec.alpha :as s]))  (s/def ::connection-state #{::handshaking ::status ::login ::config ::play})

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

@@ -1,6 +1,6 @@ (ns net.bowmap.server.logic   (:require-   [net.bowmap.network.client :as client]+   [net.bowmap.protocol.client :as client]    [net.bowmap.server.entity :as entity]    [net.bowmap.server.player :as player]    [net.bowmap.server.server :as server]

src/net/bowmap/stormbow/responses.clj modified (view file)

@@ -1,10 +1,10 @@ (ns net.bowmap.stormbow.responses   (:require    [clojure.core.async :refer [put!]]-   [net.bowmap.network.client :as client]-   [net.bowmap.network.packet :as pk]-   [net.bowmap.network.packets.clientbound :as clientbound]-   [net.bowmap.network.state :as state]+   [net.bowmap.protocol.client :as client]+   [net.bowmap.protocol.packet :as pk]+   [net.bowmap.protocol.packet.clientbound :as clientbound]+   [net.bowmap.protocol.state :as state]    [net.bowmap.stormbow.response :as response]))  (defmulti handle-response!

src/net/bowmap/transport/streams.clj modified (view file)

@@ -1,7 +1,7 @@ (ns net.bowmap.transport.streams   "Functions for reading and writing frames from input and output streams"   (:require-   [net.bowmap.network.packets.types :as t])+   [net.bowmap.protocol.packet.types :as t])   (:import    [io.netty.buffer ByteBuf Unpooled]    [java.io