Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

Being a programmer doing tedious tasks always make me want to script it.

Is there a way to intelligently script Minecraft, reacting to the surroundings. Something like do this sequence of digging until something interesting happens?

share|improve this question
6  
It's possible to write a script to interact with Minecraft, sure. Are you asking if Minecraft directly supports scripting? –  Matthew Read May 30 '11 at 19:19
    
Whatever works best, one important criterion is that its really interacting i.e. possible to react at what's around the miner. Only fixed sequences of commands have limited use and fun value. –  Peer Stritzinger May 30 '11 at 19:22
    
Hard to choose an answer ... –  Peer Stritzinger May 31 '11 at 10:49

7 Answers 7

up vote 7 down vote accepted

In terms of automation, I've found quite a few interesting articles concerning using Autohotkey with Minecraft. Here's a nice forum thread for example. Obviously this isn't enough to react to what's happening in the game, the only way to do that is via a mod (I can't find any scripting mods), but it'll still allow for longer Minecraft sessions before the RSI kicks in.

share|improve this answer

The only possibility I know of would by Scripting via the mod WorldEdit (available both SSP and SMP via bukkit). It's using JavaScript for Scripts.

You can of course also figure out modding itself, using Java, which allows you to do anything. But be aware that Notch apparently re-obfuscates the code from version to version...

share|improve this answer
13  
Help! I'm trapped inside an unclosed parenthetical! –  SevenSidedDie May 31 '11 at 18:22
1  
@Seven ) yes indeed :P –  Zommuter Jun 1 '11 at 4:51
1  
@SevenSidedDie you're finally freed :-7 –  Zommuter Feb 5 '12 at 20:25
3  
@TobiasKienzler xkcd.com/859 –  Resorath Feb 5 '12 at 21:09
1  
@Resorath good point - here's some left-over ones to assist your quest :-) –  Zommuter Feb 6 '12 at 6:15

There is no scripting interface for Minecraft, however Notch mentioned he plans to add support for official mods which then you can make Minecraft do whatever you want, even to the point of writing your own scripting engine.

share|improve this answer
    
Why "of course"? –  user7220 May 30 '11 at 21:34
    
Because the vast majority of games, as a matter "of course", do not have a scripting interface? –  SevenSidedDie May 31 '11 at 0:56
    
or just poor wording –  Resorath May 31 '11 at 6:17

Not really. You could try making a mod that adds a scripting interface, but I'm pretty sure it would require enough code that it would make more sense to just do the stuff yourself. You might want to check out the MineColony mod if you just want resources gathered.

share|improve this answer

Without an official and stable modding api, much effort for similar goals is wasted on reverse engineering and clearing up the messy architecture. Golem was an attempt at creating such automation but it is broken because Notch changes stuff. Things will be much better if Notch releases his modding api.

share|improve this answer

You can run a local server, install Bukkit, and code in Java against that.

Bukkit's a fairly flexible platform, but anything written against it will be a server-side plugin not client-side. The distinction's a bit blurry when you're playing alone, so this might not give you everything you want to be able to do.

share|improve this answer

The (somewhat unimaginatively named) "Macro / Keybind Mod" is a client side mod that makes it possible to write relatively complex scripts which you can execute on any server (eg. vanilla).

It's currently awaiting an update to Minecraft 1.7 though (however it is normally only a few weeks behind when new versions come out).

I have used it to write tree-farming and wheat-farming scripts. Some people have written automatic miners too.

My most complex script got bones from a skeleton drop farm, crafted them into bonemeal, used the bonemeal to make wheat, and then traded the wheat with a villager for emerald.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.