chunk.clj
Branches > main > 41eb671 > files / src / net / bowmap / network / protocol / chunk.clj
(ns net.bowmap.network.protocol.chunk
(:require [clojure.spec.alpha :as s]))
(s/def ::coordinate (s/keys :opt [::x ::y ::z]))
(s/def ::data (s/map-of ::coordinate ::chunk-section))
(s/def ::block-bpe #{0 4 5 6 7 8 15})
(s/def ::biome-bpe #{0 1 2 3 7})
(s/def ::block-states vector?)
(s/def ::biomes vector?)
(s/def ::chunk-section (s/keys :opt [::block-bpe ::biome-bpe]))
(s/def ::world (s/map-of ::coordinate ::chunk-section))
(def world-height-chunk-sections 24)
(def world-height (* world-height-chunk-sections 16))