Custom servers/LuaCraft 09

From Minecraft Wiki
Jump to: navigation, search
The contents of this page are not supported by Mojang, the Minecraft Wiki, the Minecraft IRC Channel or the Minecraft Forums.
Please note that this is NOT Beta server software which means NO Beta and Official Release support (only Classic, outdated!)

[edit] About

LuaCraft (referred to as LuaCraft '09 to distinguish between the more recent C++ server of the same name) is a custom server coded in C in late 2009 by GreaseMonkey. It uses Lua as a scripting language and was developed on Linux.

It was first announced by asiekierka before the code was released to the public, bragging in #minecraft that he had the code, which, alongside with other behaviour, resulted in a ban. The code was made available soon afterwards, but appears to have been mostly overlooked - this was during a period where custom servers were not widely used, let alone released.

Development stopped late 2009 / early 2010 when the author quit the community, but was restarted in May 2010 when the author returned. Since then, it has had multiworld support added, and some old code (mostly unused fluid handling and map generation code on the C side) cleaned up.

It is single-threaded on the C side, makes use of select() and nonblocking sockets, and the C code consists of a single file. Network traffic is throttled by the server to prevent lagging the client machine when played over a LAN and to prevent the client ignoring block updates on a heavy update; however, due to a lack of a priority queue, lag tends to occur when the whole map is flooded with lava.

There are two map formats supported. One is server_level.dat, and the other is a custom format called MCTA (MineCraft / Team AScii) which uses a mix of LZ77 and RLE compression. Both loaders and the MCTA saver are coded entirely in Lua.

As of 21 May 2010, the C code is 2133 lines long. The updated multiworld API has yet to be tested over a network, but has been tested with a local copy of the Minecraft client and a simple dummy Python client.

[edit] Features

The current set of Lua scripts are quite limited as of 21 May, and most likely highly prone to abuse.

The API available to Lua has hooks for player connection and disconnection, joining and leaving a world, placing a block, chatting, and a general 10Hz timer. All parameters and return values are either strings, integers, booleans, or nils, and the hooks are looked up from a string at runtime.

[edit] Links

Personal tools
Namespaces
Variants
Actions
Minecraft Wiki
Minecraft
Toolbox

Recent Community Articles

Mojang Tweets

    Getting your tweets...