minecraft

plexus 2021-10-13T11:43:26.016400Z

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.

plexus 2021-10-13T11:44:43.016700Z

strange though, block should still be there

plexus 2021-10-13T11:45:18.017300Z

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

plexus 2021-10-13T11:48:26.017600Z

New release:

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

plexus 2021-10-13T11:49:02.018300Z

have you found https://github.com/lambdaisland/witchcraft-plugin as well? this is now the recommended way to get started, you can add this to any Glowstone, Spigot, or Paper server

plexus 2021-10-13T11:50:33.019Z

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

plexus 2021-10-13T11:50:45.019200Z

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

plexus 2021-10-13T11:52:13.020800Z

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 lambdaisland.witchcraft.gallery.*, 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 https://github.com/plexus/cauldron

jkent 2021-10-13T13:34:48.027100Z

@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: #'lambdaisland.witchcraft.safe-bean/bean
Syntax error (ClassNotFoundException) compiling at (lambdaisland/witchcraft.clj:1:1).
org.bukkit.GameRule
I see that you now have support for starting paper as well as glowstone in the repl. do I need the paper deps too?

plexus 2021-10-13T13:35:33.028Z

no, you don't need the paper deps.

jkent 2021-10-13T13:36:02.028900Z

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

plexus 2021-10-13T13:36:46.029800Z

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

plexus 2021-10-13T13:37:55.030300Z

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

plexus 2021-10-13T13:38:56.031200Z

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

plexus 2021-10-13T13:39:44.032200Z

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

plexus 2021-10-13T13:40:21.033100Z

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

jkent 2021-10-13T13:40:30.033400Z

should I switch to running paper in the repl then?

plexus 2021-10-13T13:40:54.033900Z

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

plexus 2021-10-13T13:41:14.034400Z

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

plexus 2021-10-13T13:41:22.034700Z

this is really the easiest least friction path

plexus 2021-10-13T13:41:38.034900Z

and the most well tested one

plexus 2021-10-13T13:46:41.036Z

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

jkent 2021-10-13T13:48:12.037500Z

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?

plexus 2021-10-13T13:48:50.038300Z

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.

plexus 2021-10-13T13:49:18.038800Z

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

👍 1
plexus 2021-10-13T13:51:28.039300Z

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

plexus 2021-10-13T13:51:43.039500Z

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

plexus 2021-10-13T13:52:18.039800Z

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

jkent 2021-10-13T14:00:04.042100Z

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

jkent 2021-10-13T14:01:09.042700Z

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

jkent 2021-10-13T01:34:04.010Z

@jkent has joined the channel

jkent 2021-10-13T02:01:14.015400Z

does anyone have experience with https://github.com/lambdaisland/witchcraft? I was trying to follow the https://github.com/lambdaisland/witchcraft/blob/main/doc/witchcraft_manual.org#running-from-the-repl 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!