Gates

From MinecraftOnline
(Redirected from Gate)
Jump to navigation Jump to search
Mapmarker labicon.png Gate
Gates2.png

Display of the four available Gate types, from left to right: [Gate], [IronGate], [GlassGate], and [NetherGate]

About
ID Gate
Self Triggered No
Clickable Yes
Input Yes
Output No
Rail No
Block Fences, Iron Bars, Glass Panes(not Stained), or Nether Brick Fences
Sign post icon.png Sign Format
Second line [Gate], [IronGate], [GlassGate], or [NetherGate]
Craftbook Page

Gates are CraftBook ICs that serve as decorative alternatives to conventional Doors and CraftBook Doors, and can be a great way to control access to your castle or city, to contain your farm animals, and much more!

Construction

Steps for Building Gates:

  • A gate is created by placing a sign with one of [Gate], [IronGate], [GlassGate], or [NetherGate] written on the second line. This may be a Wall Sign or a Standing Sign, within 8 blocks of the gate.
  • A Gate may only be made of Fences, Iron Bars, Glass Panes (including Stained Glass Panes), or Nether Brick Fences. Cobblestone "Walls" do not work. The basic [Gate] sign will operate on any of these materials, or several at once, where the other versions are limited to only their own subtypes of blocks -- for example, you may want to use [IronGate] so that it will not remove some nearby window panes.
  • The Top Blocks are not removed when the Gate is open.
  • Place a chest within 8 blocks of the sign horizontally or vertically, and load it with enough of the blocks specified on the sign to extend all the Top Blocks down to the floor underneath them. It will hold the blocks removed when the Gate is open.
  • The Gate extension with also work over water or lava, replacing them. This can remove Water or Lava source blocks as well as "flowing" blocks.
  • The Gate will not extend down into any block occupied by a torch, sign, or ladder.

Operation

It is common to use [Gate] on a straight row of fence blocks to make a gate in a castle entry way, but one could make a maze of walls, animal pens, or traps using it. It is even possible to make an air-lock type of device: make a gate and activate it, so that the gate is filled in. Now place another row of Top Gate Blocks that do not connect to the first gate. Now clicking the sign will close the second gate as it opens the first one. This effect can be used to create a pulsing flow of water, to control access to secure locations etc.

Gates are operated by either by Right-Clicking the Sign, or powering the Sign with a Redstone signal.

The Gate does not need to be next to the Sign to work, as seen in these images:

Manual Operation

Right-clicking the Sign will toggle the state of the Gate from open to closed and back.

Redstone support

When a Redstone signal leading directly into the Sign is changed, it will either open all gates (when powered), or close all gates (when unpowered). Note that this is incompatible with using a single Sign to create the "airlock" where one gate closes as the other gate opens.

Notable and Practical Uses

  • Castle Gates
  • City Gates
  • Animal Pens
  • Racetrack Starters
  • And whatever else you can think of!

Technical Details

The Gate searches for gate areas, then finds "top blocks", the places/removes blocks under these top blocks. Here we will assume you want your gate to be "stable"; not simply removing the blocks, but also able to place them back in the same location. So then as you think through this, it will be helpful to always think of what the gate blocks will look like when "open", with the minimum number of blocks placed.

The below is at attempt to explain the observed behavior of [Gate] signs, without actually viewing the code behind it, so some things might not be perfectly accurate.

  1. Search - a box is searched around the Sign for any matching gate blocks. This box is 10 blocks above the Sign (Y), and 5 blocks in all other directions.
    • So if your finished gate is far from the [Gate] sign, then at least one "top" block must be within this box.
  2. Expand - the search is extended from these initial matching blocks, to find "connected" gates much farther away. This appears to be using a "flood fill" algorithm, modified to allow diagonal connections.
    • So if your finished gate is far from the [Gate] sign, then it must connect from the initially searched box, up to the rest of the gate, no more than 1 block up for each block over (like stairs).
    • There does not appear to be a real limit to the distance this allows; I tested it up to 25 blocks past the normal bound (35 blocks above the initial Sign). To illustrate this, you could surround your town with a fence 3 blocks high, going up and down over gentle slopes -- never more than a 1 block rise per block sideways to the top of the fence. Then have a single [Gate] sign that would remove all but the top-block of the entire fence, even if the top of the town was 2
  3. Place/remove - if any of the "top blocks" in this one "gate" contain blocks directly beneath them, then the gate will be "opened" , removing those blocks. Otherwise, the gate will be "closed".
    • Blocks may be placed or removed below the "top block" any distance (tested to over 90), and this is regardless of the distance from the Sign itself.
  4. Multiple Gates - the expansion will mark a set of connected blocks as one "gate", but one activation will search for other gates as well.
    • If closing a newly found gate would cause it to connect to a gate that was already updated with this activation, then it will be skipped - no blocks will be placed.
    • When activated by right-click, each gate may be opened or closed independently.
    • When activated by redstone, a powered signal will open the gate, and an unpowered signal will close the gate.
  • When activated the Top Blocks in the Gate Zone are extended all the way down to the first solid block below them, to a maximum of 15 blocks down.
Gate Example.png

See Also

  • Bridge - Simple bridge, vertical equivalent of Door
  • Doors - Simple door, horizontal equivalent of Bridge
  • MCX208 - Advanced Door
  • MCX207 - Advanced Bridge, Horizontal equivalent of MCX208