From wiki.vg
Revision as of 09:33, 25 September 2013 by BizarreCake (talk | contribs)
Jump to navigation Jump to search
hCraft's "overhang" world generator

hCraft is a custom server written in C++ by BizarreCake, currently implementing the 78th version of the protocol (1.6.4).

Although hCraft is designed to become a general purpose server, it is currently leaning towards classic/creative functionality. Inspired by many classic custom servers, such as: WoM 2009, the new WoM (WoM Realms), D3, MCSharp/MCZall/MCLawl, and fCraft.

Website: www.hCraft.org (Outdated at times)
Source code: www.github.com/BizarreCake/hCraft.
IRC: #hCraft @ irc.panicirc.net/6667
A 32x32 flatgrass world.

hCraft has been designed to be a fully multiworld server from the grounds up. Players can create worlds, switch between them at any time, backup them, restore them from backups, regenerate, resize, etc...

Every world has its own world generator, provider (determines the format from which the world is loaded/saved to) and set of physics threads.

And just like the good ol' classic days, worlds can have a finite size and have that neat border (although they can be infinite as well).

Some world-related commands:

/wcreate [-a] [-l] [-g <generator>] [-p <provider>] [-s <seed>] [-w <width>] [-d <depth>] <world name>
Creates a new world named <world name>, optionally loading it if -l is present.
/wload [-a] <world name>
Loads the world <world name>. The -a option will insert the world into the "autoload" list.
/wunload [-a] <world name>
Unloads the world <world name>. The -a option will remove the world from the "autoload" list.
/goto <world name>
Teleports the player into the specified world.
Block physics
D3-style sand physics

hCraft has a very powerful block physics system in place.

Initially, all worlds share a single block physics thread spawned by the server at startup time. At any time, the user may choose to allocate a set of threads for any world - from one thread up to 24 (although I doubt anyone would need that many, ...unless you have a 12-core system).

hCraft supports various custom blocks - regular blocks that have a special behaviour associated with them. Internally, they are usually assigned a custom ID (starting at 2000), and are converted transparently to the right type of blocks when sent to the player. Currently implemented custom blocks include: activewater (the type of water that existed in classic Minecraft), Langton's ant, sharks, fireworks, etc...

Custom block behaviour can be also attached to regular blocks, using the /bt (block type) and /bp (block physics) commands. It is possible to convert any selected blocks into doors (that is, classic MCSharp/MCZall doors) just by selecting a bunch of blocks and typing /bt door.

World physics can be stopped, paused, and resumed at any time using the /physics command.

Building and selections
An empty cuboid selection
The same selection after being filled with obsidian
Empty spheroid selection
Same selection filled with red wool

Very similiar to action blocks in MinerCPP, and selections in WorldEdit (except that selections in hCraft are visible).

Selection manipulation is mostly done using only one command, the /select command, or just /s for short, here are some things that you can do:

/s new [@<name>] <cuboid/sphere>
Creates a new selection of the specified type, optionally assigning it the given name.
/s 1/2/3/...
Sets the selected point to the player's current location.
/s show/hide <@name>/all/visible/hidden
Shows or hides the specified selection(s).
/s move x/y/z/xy/xz/yz/xyz <num>
Moves all visible selection <num> blocks in the specified direction(s).
/s contract/expand x/y/z/xy/... <num>
Expands or contracts all visible selections <num> blocks in the given direction(s).
/s delete <@name>
Removes the specified selection.
/s clear
Clears all selections
/s all [but/except] <block types....>
Very powerful command! Filters the specified blocks from all visible selections and creates a new composite selection containing only the selected blocks.
Examples: /s all but air, /s all grass stone wood.

Once the selection(s) have been created, the user may then continue to manipulate them using several commands, some include:

/fill [-r 0-100] [-f <max>] <block>
Fills all visible selections with the specified block.
/fill <old> <new>
Like the regular fill (accepts the same options too), but instead replaces blocks of type <old> with <new>.
/bt <type>
Converts all non-air blocks in all visible selections to the specified block type.
/bp <type> <physics>
Applies custom block physics to all blocks of type <type>.

Aside from selections, there is another way to fill world regions with some block - the same way it has been done in most classic custom servers. Instead of creating selections and marking the points using /s 1 and /s 2, the second type of building commands require the user to mark the blocks by either placing or destroying a block.
These commands include:

  • /cuboid or just /c
  • /sphere [-f] <block> [radius]
  • /circle [-f] <block> [plane] [radius]
  • /ellipse [-f] <block> [plane] [a] [b]