chunk.clj

Branches > client-handling-rewrite > e91df30 > files / src / net / bowmap / network / chunk.clj

(ns net.bowmap.network.chunk
  (:require [clojure.alpha.spec :as s]))

(s/def ::coordinate (s/schema [::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/schema [::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))