a7356884476c

Bundle things and add a README.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 21 Jul 2011 22:01:34 -0400
parents 32ce6a3696f8
children abc44232f0b9
branches/tags (none)
files README.markdown bundled/minecraft_server.jar bundled/runserver.sh bundled/server.properties

Changes

--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.markdown	Thu Jul 21 22:01:34 2011 -0400
@@ -0,0 +1,62 @@
+Clojurecraft
+============
+
+Clojurecraft is a framework for writing Minecraft bots in Clojure.
+
+**It's definitely not ready for actual use yet, but if you want to poke around it has
+some very basic functionality.  Just remember that *everything* is subject to
+change.**
+
+Quick Start
+-----------
+
+Clone down the repo with Mercurial or Git:
+
+    hg clone http://bitbucket.org/sjl/clojurecraft
+    git clone http://github.com/sjl/clojurecraft.git
+
+Grab the dependencies using Leiningen (Cake will probably work too) and fire up
+a REPL:
+
+    cd clojurecraft
+    lein deps
+    lein repl
+
+Now you'll need to open another terminal window to run the server.  It's just
+the vanilla Minecraft server that I've bundled into the repo:
+
+    cd path/to/clojurecraft
+    bundled/runserver.sh
+
+Wait for the server to finish loading (it'll say "Done") and then connect to it with
+a normal Minecraft client so you can watch your bot.
+
+Now you can go back to your REPL and get started.  Import the things you'll need:
+
+    (require '(clojurecraft [core :as cc] [actions :as act]))
+
+Create a bot connected to your local server:
+
+    (def bot (cc/connect cc/minecraft-local "desired_username"))
+
+Right now Clojurecraft doesn't support authentication, so it's turned off on the
+bundled server and you can choose any username you like.
+
+Give your bot a little time to connect.  You should see it appear in the world
+through your Minecraft client.
+
+Once your bot is in the world you're all set to play around.  At the moment the only
+action implemented is basic movement.  Move your bot around with `act/move`:
+
+    (act/move bot 2 0 1)
+
+The numbers are the x, y, and z distance you wish to move.
+
+If the bot doesn't appear to move, you may have tried to make an illegal move (like
+moving into a block).  Try some other numbers.
+
+If you move into the air and don't "fall" quickly enough by making subsequent moves
+in the negative y direction the server will kick you.  Watch the terminal window with
+the server output for more details.
+
+Have fun!
Binary file bundled/minecraft_server.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bundled/runserver.sh	Thu Jul 21 22:01:34 2011 -0400
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+cd bundled
+java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bundled/server.properties	Thu Jul 21 22:01:34 2011 -0400
@@ -0,0 +1,15 @@
+#Minecraft server properties
+#Thu Jun 23 16:55:53 EDT 2011
+level-name=world
+allow-nether=true
+view-distance=10
+spawn-monsters=false
+online-mode=false
+spawn-animals=true
+max-players=20
+server-ip=
+pvp=true
+level-seed=
+server-port=25565
+allow-flight=false
+white-list=false