Liking cljdoc? Tell your friends :D

lambdaisland.witchcraft.bukkit

Bukkit wrapper and

Bukkit wrapper and
raw docstring

No vars found in this namespace.

lambdaisland.witchcraft.config

Create and handle Glowstone ServerConfig instances

Generally to configure Glowstone you edit YAML files, but that's not very Clojure-y. This config munging below allows you to define config values as inline EDN. The values in the config map that you provide to data-config or server-config are keywords derived from the ServerConfig$Key enum, see (keys config-keys)

Create and handle Glowstone ServerConfig instances

Generally to configure Glowstone you edit YAML files, but that's not very
Clojure-y. This config munging below allows you to define config values as
inline EDN. The values in the config map that you provide to [[data-config]]
or [[server-config]] are keywords derived from the `ServerConfig$Key` enum,
see `(keys config-keys)`
raw docstring

lambdaisland.witchcraft.cursor

Logo-like API for drawing blocks by using a walking metaphor.

This is a functional API, movements simply build up a list of block positions, call build at the end to actually make them materialize in the game.

A cursor contains a current location (x/y/z), a directions (:north, :north-east, :east, etc.), and a current building material, e.g :lapis-block (see [[lambdaisland.witchcraft.bukkit/materials]]).

It also contains a drawing flag :draw? and a list of blocks :blocks. When drawing is on, then any step will add a block to the list. build creates blocks in the world based on this, and resets the list.

Call start to get an initial cursor, this will return a cursor that is one step ahead of the player (so what you draw is in sight), facing away from the player.

(require '[lambdaisland.witchcraft.cursor :as c])

(-> (c/start)
    (c/draw)
    (c/material :red-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :blue-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :green-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :yellow-glazed-terracotta)
    (c/steps 3)
    (c/build)
    )
Logo-like API for drawing blocks by using a walking metaphor.

This is a functional API, movements simply build up a list of block positions,
call [[build]] at the end to actually make them materialize in the game.

A cursor contains a current location (x/y/z), a
directions (:north, :north-east, :east, etc.), and a current building
material, e.g :lapis-block (see [[lambdaisland.witchcraft.bukkit/materials]]).

It also contains a drawing flag `:draw?` and a list of blocks `:blocks`. When
drawing is on, then any step will add a block to the list. [[build]] creates
blocks in the world based on this, and resets the list.

Call [[start]] to get an initial cursor, this will return a cursor that is one
step ahead of the player (so what you draw is in sight), facing away from the
player.

```
(require '[lambdaisland.witchcraft.cursor :as c])

(-> (c/start)
    (c/draw)
    (c/material :red-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :blue-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :green-glazed-terracotta)
    (c/steps 3)
    (c/rotate 2)
    (c/material :yellow-glazed-terracotta)
    (c/steps 3)
    (c/build)
    )
```
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close