Difference between revisions of "HCraft"

From wiki.vg
Jump to navigation Jump to search
(hCraft)
m (Dead link)
 
(15 intermediate revisions by one other user not shown)
Line 7: Line 7:
 
CONTENT =
 
CONTENT =
 
[[Image:HCraft-overhang.png|thumb|border|right|top|300px|hCraft's "overhang" world generator]]
 
[[Image:HCraft-overhang.png|thumb|border|right|top|300px|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).
+
'''hCraft''' is a custom server written in C++ by BizarreCake, currently implementing the 4th version of the new protocol (1.7.2).
  
Although hCraft is designed to become a general purpose server, it is currently leaning towards classic/creative functionality.
+
Although hCraft is designed to become a general purpose server, it currently functions as a mostly classic/creative server (survival features are planned though).
 
Inspired by many classic custom servers, such as: WoM 2009, the new WoM (WoM Realms), D3, MCSharp/MCZall/MCLawl, and fCraft.
 
Inspired by many classic custom servers, such as: WoM 2009, the new WoM (WoM Realms), D3, MCSharp/MCZall/MCLawl, and fCraft.
 +
 +
hCraft uses MySQL for most of its needs.
  
 
===== Links: =====
 
===== Links: =====
:Website: [http://www.hCraft.org/ www.hCraft.org] (Outdated at times) <br />
+
:Public Test Server: '''devbox.hCraft.org:25565'''
 +
:Website: [http://www.hCraft.org/ www.hCraft.org] (Dead link) <br />
 
:Source code: [http://www.github.com/BizarreCake/hCraft www.github.com/BizarreCake/hCraft].
 
:Source code: [http://www.github.com/BizarreCake/hCraft www.github.com/BizarreCake/hCraft].
 
:IRC: #hCraft @ irc.panicirc.net/6667
 
:IRC: #hCraft @ irc.panicirc.net/6667
Line 26: Line 29:
 
HEADING = '''Multiworld''' |
 
HEADING = '''Multiworld''' |
 
CONTENT =
 
CONTENT =
[[Image:HCraft-multiworld.png|thumb|border|right|top|400px|A 32x32 flatgrass world.]]
+
[[Image:HCraft-multiworld.png|thumb|border|right|top|300px|A 32x32 flatgrass world.]]
 +
[[Image:HCraft-super-overhang.png|thumb|border|right|top|300px|The "experiment" world generator (super overhang biome)]]
 
hCraft has been designed to be a fully multiworld server from the grounds up.
 
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...
 
Players can create worlds, switch between them at any time, backup them, restore them from backups, regenerate, resize, etc...
Line 44: Line 48:
 
; /goto <world name>
 
; /goto <world name>
 
: Teleports the player into the specified world.
 
: Teleports the player into the specified world.
 +
; /world regenerate <generator>
 +
: Changes the world's generator, and completely overwrites all chunks.
 +
; /world resize <width> <depth>
 +
: Resizes the world (this preserves all existing chunks)
 +
; /world backup
 +
: Stores a backup of the world.
 +
; /world restore <num>
 +
: Restores backup number <num>.
 
}}
 
}}
  
Line 60: Line 72:
 
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...
 
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.
 
World physics can be stopped, paused, and resumed at any time using the '''/physics''' command.
 +
}}
 +
 +
{{Box|
 +
BORDER = #72F29B|
 +
BACKGROUND = #16F2CA|
 +
WIDTH = 100%|
 +
ICON = |
 +
HEADING = '''Building and selections''' |
 +
CONTENT =
 +
[[Image:HCraft-selections1.png|thumb|border|right|top|250px|An empty cuboid selection]]
 +
[[Image:HCraft-selections2.png|thumb|border|right|top|250px|The same selection after being filled with obsidian]]
 +
[[Image:HCraft-selections3.png|thumb|border|right|top|250px|Empty spheroid selection]]
 +
[[Image:HCraft-selections4.png|thumb|border|right|top|250px|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. <br />
 +
These commands include:
 +
* '''/cuboid''' or just '''/c'''
 +
* '''/sphere [-f] <block> [radius]'''
 +
* '''/circle [-f] <block> [plane] [radius]'''
 +
* '''/ellipse [-f] <block> [plane] [a] [b]'''
 +
* '''/line [-c] <block>'''
 +
* '''/bezier <block> <cp>'''
 +
* '''/curve <block>'''
 +
 +
}}
 +
 +
{{Box|
 +
BORDER = #4AE859|
 +
BACKGROUND = #57BF11|
 +
WIDTH = 100%|
 +
ICON = |
 +
HEADING = '''Ranks''' |
 +
CONTENT =
 +
Groups (we will get to ranks in a moment) in hCraft are fully customizable, and can be changed by modifying the ''ranks.cfg'' file.
 +
When the server is first created, there will be ten initial groups (in descending order):
 +
# '''<span style="color:#FFAA00">Owner</span>'''
 +
# '''<span style="color:#FFFF55">Executive</span>'''
 +
# '''<span style="color:#AA0000">Admin</span>'''
 +
# '''<span style="color:#FF5555">Moderator</span>'''
 +
# '''<span style="color:#00AAAA">Architect</span>'''
 +
# '''<span style="color:#55FFFF">Designer</span>'''
 +
# '''<span style="color:#00AA00">Builder</span>'''
 +
# '''<span style="color:#55FF55">Member</span>'''
 +
# '''<span style="color:#AAAAAA">Guest</span>''' ''(default rank)''
 +
# '''<span style="color:#555555">Spectator</span>'''
 +
Again, these are fully customizable, and can be changed.
 +
 +
Ranks, are essentially a collection of groups, out of which one group is defined to be the main one.
 +
To change someone's rank in-game, one should use the '''/rank''' command:
 +
; /rank <player> <rank>
 +
: Changes <player>'s rank to <rank>
 +
The rank should be in the following form:
 +
: <group1>;<group2>;...;<groupN>
 +
Unless a @ is prepended to a group's name, the first group will be set as the main one.
 +
Thus, to change someone's rank to, say, Builder + Member, one would type:
 +
: ''/rank someone123 @Builder;Member''
 +
 +
}}
 +
 +
{{Box|
 +
BORDER = #B22222|
 +
BACKGROUND = #8B0000|
 +
WIDTH = 100%|
 +
ICON = |
 +
HEADING = '''Moderation''' |
 +
CONTENT =
 +
hCraft has a handful of commands to deal with pesky players:
 +
; /kick [-m <kick msg>] <player> [reason]
 +
: Kicks the specified player, and logs the given reason (or "No reason specified", if not present). Optionally shows the kicked player <kick msg> if specified.
 +
; /mute <player> <time>
 +
: Mutes the specified player for the given amount of time. (examples of <time>: 5, 10s, 8m, 3h20s, 2d5m, etc...)
 +
; /unmute <player>
 +
: Unmutes the specified player.
 +
; /ban [-i] <player/ip>
 +
: If the -i option is not present, issues a regular ban on the specified name; otherwise, issue an IP ban.
 +
; /unban [-i] <player/ip>
 +
: Unbans the specified player (or IP address, if -i is present).
 +
; /status <player>
 +
: Displays all kinds of information about <player>. Such as their IP address, blocks destroyed, first login, etc...
 +
 +
Handling griefers is pretty easy, hCraft also offers the following commands:
 +
; /whodid
 +
: Displays the selected block's modification history (who destroyed/created it, when, what type it was before it got destroyed, etc...)
 +
; /undo <player> <time>
 +
: Undoes all block modification made by the specified player in the past <time> (<time>'s format is the same one used by ''/mute'')
 +
 
}}
 
}}

Latest revision as of 16:53, 8 May 2022

Introduction
hCraft's "overhang" world generator

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

Although hCraft is designed to become a general purpose server, it currently functions as a mostly classic/creative server (survival features are planned though). Inspired by many classic custom servers, such as: WoM 2009, the new WoM (WoM Realms), D3, MCSharp/MCZall/MCLawl, and fCraft.

hCraft uses MySQL for most of its needs.

Links:
Public Test Server: devbox.hCraft.org:25565
Website: www.hCraft.org (Dead link)
Source code: www.github.com/BizarreCake/hCraft.
IRC: #hCraft @ irc.panicirc.net/6667
Multiworld
A 32x32 flatgrass world.
The "experiment" world generator (super overhang biome)

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.
/world regenerate <generator>
Changes the world's generator, and completely overwrites all chunks.
/world resize <width> <depth>
Resizes the world (this preserves all existing chunks)
/world backup
Stores a backup of the world.
/world restore <num>
Restores backup number <num>.
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]
  • /line [-c] <block>
  • /bezier <block> <cp>
  • /curve <block>
Ranks

Groups (we will get to ranks in a moment) in hCraft are fully customizable, and can be changed by modifying the ranks.cfg file. When the server is first created, there will be ten initial groups (in descending order):

  1. Owner
  2. Executive
  3. Admin
  4. Moderator
  5. Architect
  6. Designer
  7. Builder
  8. Member
  9. Guest (default rank)
  10. Spectator

Again, these are fully customizable, and can be changed.

Ranks, are essentially a collection of groups, out of which one group is defined to be the main one. To change someone's rank in-game, one should use the /rank command:

/rank <player> <rank>
Changes <player>'s rank to <rank>

The rank should be in the following form:

<group1>;<group2>;...;<groupN>

Unless a @ is prepended to a group's name, the first group will be set as the main one. Thus, to change someone's rank to, say, Builder + Member, one would type:

/rank someone123 @Builder;Member
Moderation

hCraft has a handful of commands to deal with pesky players:

/kick [-m <kick msg>] <player> [reason]
Kicks the specified player, and logs the given reason (or "No reason specified", if not present). Optionally shows the kicked player <kick msg> if specified.
/mute <player>
Mutes the specified player for the given amount of time. (examples of
/unmute <player>
Unmutes the specified player.
/ban [-i] <player/ip>
If the -i option is not present, issues a regular ban on the specified name; otherwise, issue an IP ban.
/unban [-i] <player/ip>
Unbans the specified player (or IP address, if -i is present).
/status <player>
Displays all kinds of information about <player>. Such as their IP address, blocks destroyed, first login, etc...

Handling griefers is pretty easy, hCraft also offers the following commands:

/whodid
Displays the selected block's modification history (who destroyed/created it, when, what type it was before it got destroyed, etc...)
/undo <player>
Undoes all block modification made by the specified player in the past