Fork me on GitHub

does anyone have experience with I was trying to follow the to get a locally running glowstone server running in my repl, which I was able to do, but it seems like the published jar is pretty out of date. for instance, the block function doesn’t exist, which is the next thing that the manual goes over after getting the server up:

> (wc/block [0 0 0])
Syntax error compiling at (/private/var/folders/vg/zw2xmz2n5tn995hr3nd93h180000gp/T/form-init8340767686230672678.clj:1:1).
No such var: wc/block
currently, my deps.edn looks like
{:paths     ["src" "resources"]
 :deps      {org.clojure/clojure            {:mvn/version "1.10.3"}
             com.lambdaisland/witchcraft    {:mvn/version "0.0.28"}}
 :mvn/repos {"glowstone-repo" {:url ""}
             "aikar"          {:url ""}}}
but should I be relying on the github source rather than the packaged jar to be getting everything up and running?
com.lambdaisland/witchcraft    {:git/url ""
                                :git/sha "12edfe88f0753909e2d7123f4de540d33d1d90a8"}
any experienced opinions or help on this would be great thanks!


Hey @jkent, you came to the right place! Really happy to hear you're trying out witchcraft. The manual is indeed out of date, hoping to give it a big overhaul soon.


strange though, block should still be there


oh I see the released version is pretty old, let me cut a new release. At the moment you're generally best of just taking the latest commit on main


New release:

[com.lambdaisland/witchcraft "0.3.90"]
{com.lambdaisland/witchcraft {:mvn/version "0.3.90"}}


have you found as well? this is now the recommended way to get started, you can add this to any Glowstone, Spigot, or Paper server


I think you'll need to add the Glowstone dependency as well if you want to run Glowstone from your REPL:


net.glowstone/glowstone {:mvn/version "2021.8.0"}


let me know if you get things running, after that you should probably just start looking at some example code. There are a few things under*, these are "official" examples which we'll make sure remain up to date and functional. Then there's much more stuff of just me experimenting under repl_sessions, or in my own witchcraft experiments repo cauldron


@plexus I appreciate the help and thanks for releasing the new version! this is my updated deps.edn, you should notice I needed to update the glowstone repo release repository to point it as releases rather than snapshots as stated in the docs

{:paths     ["src" "resources"]
 :deps      {org.clojure/clojure         {:mvn/version "1.10.3"}
             com.lambdaisland/witchcraft {:mvn/version "0.3.90"}
             net.glowstone/glowstone     {:mvn/version "2021.8.0"}}
 :mvn/repos {"glowstone-repo" {:url ""}
             "aikar"          {:url ""}}}
unfortunately, I’m now encountering an error when I require witchcraft
> (require '[lambdaisland.witchcraft :as wc]) 
WARNING: bean already refers to: #'clojure.core/bean in namespace: lambdaisland.witchcraft, being replaced by: #'
Syntax error (ClassNotFoundException) compiling at (lambdaisland/witchcraft.clj:1:1).
I see that you now have support for starting paper as well as glowstone in the repl. do I need the paper deps too?


no, you don't need the paper deps.


also, it sounds like you recommend running the server outside of the repl and adding the plugin instead. I can move in that direction but I was just hoping I could get this working first


yeah I see what's happening, haven't tested with Glowstone in a while. In principle we rely on Bukkit being a shared interface/API, but in this case I suppose Glowstone does not have all the bukkit stuff that paper has. I'll have to fix that, we should stick to the largest common denominator, and detect the rest dynamically


or, probably more accurately this version of Glowstone does not yet have this particular Bukkit class


if you're coming from a Clojure perspective I understand that it seems much more appealing running things inside your REPL rather than running a separate server, that was also my starting point and why I went initially with Glowstone


but Glowstone is in this annoying limbo state where the last stable version is quite old (it's based on the Minecraft 1.12 protocol and feature set), and the newer stuff is not yet generally usable


they have said they might have a new release towards the end of the year, but of course that could always lapse


should I switch to running paper in the repl then?


still, I do want to continue supporting Glowstone 1.12 until the newer stuff is ready, I'll have that fixed hopefully soonish


you can try running paper in the REPL but honestly it's much easier to just download the server jar and drop in the plugin


this is really the easiest least friction path


and the most well tested one


I don't have a ton of time right now but I may be able to put out a fix for glowstone


awesome, I’ll try the server with the plugin approach if you dont have time to put out a fix. I really appreciate the quick responses and the help. going with the standalone server approach, which do you recommend?


if you want to run paper inside your repl you need to run paper standalone first, have it patch the mojang jar, then take that jar and add it to your classpath. You also need to create an eula.txt to show that you agree to the eula.


I've mostly been using PaperMC, it seems to be the most advanced/optimized of the bukkit servers

👍 1

ok, putting out a new release which should fix glowstone support


[com.lambdaisland/witchcraft "0.4.94"]
{com.lambdaisland/witchcraft {:mvn/version "0.4.94"}}


please do keep us posted and share what you end up doing/creating!


woot! I was able to get the server up with the new release!!!


I’ll make sure to share anything I create. that creative activity will need to wait till this evening though 😉