chunk.clj

Branches > facts > 21b5507 > files / src / net / bowmap / network / chunk.clj

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

; TODO these keys aren't even used in the chunk code lol
(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))