CivRealm:Bastion

Bastions are factory-made blocks that prevent unauthorized block placement in the area around them.

On a Civ-genre server, it is critical that sturdy anti-griefing mechanisms are in place which make grief extremely difficult but still possible with enough effort. Alongside Citadel, Bastions provide this functionality. Bastion blocks allow players to extend their protection within a region, placing more restrictions inside it to those who are not part of their NameLayer group.

Construction
Bastions are created via Bastion Factories, which are created (in a factory) from 4 exile pearls, 11 iron blocks, 64 obsidian, 10 Lapis Lazuli blocks, 4 slimeballs, 10 redstone blocks, 2 gold blocks and 2 stamina. It contains 3 recipes:


 * City Bastions are created with the same materials as the initial bastion factory. The recipe outputs 16 city bastions.
 * Claims Bastions are created with 2 exile pearls, 6 iron blocks, 32 obsidian, 5 Lapis Lazuli blocks, 2 slimeballs, 5 redstone blocks, 3 gold blocks and a single stamina. The recipe outputs 160 claims bastions.
 * End portal frames are created with 16 prismarine and 64 end stone. The recipe outputs 4 end portal frames (or "bastion utility tools").

Functionality
Bastions will restrict building within their field, which is a square shaped region centered around the block. Their effects apply from the y-level they are placed on up until y=256, so it is generally advisable to place them as low as possible (on bedrock level). A notable exception are Vaults.

Players not part of the Bastion's corresponding NameLayer group will not be able to build while inside its field, at all. All blocks attempted to be placed will be removed. Players not in the group will also be blocked from using Citadel reinforcement within the field. Pistons cannot push into or within bastion fields. Players within its namelayer group can build freely, and normal building restrictions (as described in Custom CivRealms Physics) will be removed for them (except in Ocean biomes).

Maturation
Bastions will take 24 hours to become "mature"; during this time, they will not be functional at all (including in the removal of building restrictions).

Breaking Bastions
Bastions can be broken in two ways: by literally breaking the block (note that bastions can be reinforced just like any other block), or by attempting to place a block without permission. Bastions have a certain amount of "health", based on their reinforcement type. Each place attempt will take 1.5 health away on a claims bastion, and 0.3 on a city bastion. A fully reinforced claims bastion will take ~30 minutes to break at one block place per second, and ~4 hours for a city bastion. Per day, bastions will restore 200 health.

Region size and overlap
City bastion's fields are a cuboid with a square bottom face of 201x201 blocks. For claim bastions, 21x21. Claims bastions cannot overlap each other at all. City bastions can overlap claims bastions freely, and can overlap other city bastions, as long as the bastion is placed more than 10 blocks outside another city bastion's field. In an overlap region between bastions of different namelayer groups, nobody will be able to build, unless they are on both groups.

Other Functionality
Bastions cannot be placed in Deep Ocean biomes within the New World.

End Portal Frames
End portal frames, or "Bastion utility tools", are special blocks which can be created in the Bastion factory. When holding one, left click on any block to see whether it is currently in a bastion field, what the bastion coordinates for that field are, and whether you are in the bastion's group or not. If you try to place an end portal frame within a bastion field, it will damage the bastion (with a 2 second cooldown), regardless of whether you are in the bastion's group (so you can damage your own bastions with end portal frames). End portal frames also allow "overhang damage"; see Custom CivRealms Physics.

Usage
A bastion must be reinforced to be functional, either on or after placement with /ctf or /ctr (see: Citadel). Whatever group you reinforce it in will be the bastion's group. Then, simply wait for the 24 hour maturation period to pass, and your bastion will be fully functional.

Commands
There are a few bastion related commands. Each one puts you in a certain "mode".


 * : "Info mode". When you right click on a block, it will tell you whether a bastion restricts you there or not. If you are in the bastion's group, you will get some info about it.
 * : "Delete mode". When you right click one of your own bastion blocks, its entire field will be removed. This cannot be undone. Use with caution, obviously.
 * : "Normal mode". Disables the other modes.