24,485 ARTICLES
ON THIS WIKI

Gate

(Redirected from Gates)


This article is about BuildCraft gates in general. You may be looking for the lowest tier of gate, the Basic Gate, or for the Minecraft Fence Gate.

Gates are placed on pipes to allow redstone signals to interact with Pipe Wire, and to detect whether or not items, power or liquid are flowing through the pipe. Autarchic gates can also replace Redstone Engines, allowing for much more compact pipe logic. All Gates are created with an Assembly Table, though it is possible to change an AND gate to an OR gate or vice versa by combining it with a Redstone Chipset in shapeless crafting. Some gates are among the items treated as Chips by GregTech 4.

Usage[edit]

Right-clicking a pipe with a gate in your hand places the gate on the pipe. Like pipe wires, gates do not take up a block of their own, but appear as a modification of the pipe.

Shift-right-clicking the pipe with nothing in your hand breaks the gate, but not the pipe, while left-clicking the pipe breaks both. Breaking a gate in either way drops it as an item.

Right-clicking a pipe that has a gate on it brings up a UI for setting the behavior of the gate. Inputs will be on the left, outputs on the right. Clicking an input or output box cycles through the signals available for that box. Right-clicking cycles through in reverse order.

The trigger events able to be selected change depending on what blocks are adjacent to the gate. For example, placing a gate beside a combustion engine adds engine blue, engine green, tank full etc events, while placing it beside a quarry adds work scheduled and work done.

The UI for Gold and Diamond gates also has a slot in each input/output pair for an item. This slot has a slash through it except when the input type is set to monitor items or liquids, e.g. Items Traversing or Space In Tank, in which case it can be used to detect a specific item or liquid type.

Gate Quality[edit]

The inputs and outputs available will depend on the type of gate. All gates can detect whether or not there is an item in the pipe and whether or not the pipe is receiving a redstone signal, and all gates can output a redstone signal. Iron and better gates can also detect and control Pipe Wire.

Gates also differ in the number of inputs and outputs they have. Plain gates have one input and one output, whereas iron gates have two inputs and two outputs. Iron gates and better, having multiple inputs and outputs, can be made as AND and OR gates, while plain redstone gates are a simple IF THEN structure.

If a gate's pipe is next to two different machines that can send a signal that the gate is listening for, the gate will perform an OR operation on those two inputs. This remains the case even for the more advanced gates that have AND variants. For example, a gate on a Wooden Waterproof Pipe pulling from a Still directly into an Iron Tank, if set to detect Tank Has Liquid, will activate if either the output side of the Still or the Iron Tank contains liquid.

Gate[edit]

Types: Gate

Input types:

Pipe Empty, [Items, Power, Liquid] Traversing
Redstone Signal On, Redstone Signal Off
If the pipe is next to...
  • an engine: Engine Safe, Engine Blue, Engine Green, Engine Yellow, Engine Red
  • a chest or machine that can hold items: Inventory Empty, Items in Inventory, Space in Inventory, Inventory Full
  • a machine that can store energy: No Energy, Energy Stored, Can Store Energy, Full Energy
  • a tank or machine that can store liquid: Tank Empty, Tank Has Liquid, Space For Liquid, Tank Full
  • a machine that can be powered by batteries: Discharging Empty Item, Discharging Partially Charged Item, Discharging Fully Charged Item
  • a machine: Machine On, Machine Off, Work Scheduled
  • a mass fabricator: Has Scrap, Out Of Scrap
If the pipe is next to the following machines, it can be configured to detect when the level of certain resources in the machine falls below 25% or 10%:

Output types: Redstone Signal

Input/Output pairs: 1

Iron Gate[edit]

Types: Iron AND Gate, Iron OR Gate

Input types: Red Pipe Signal On, Red Pipe Signal Off, plus input types of Gate

Output types: Red Pipe Signal, Redstone Signal

Input/Output pairs: 2

Gold Gate[edit]

Types: Gold AND Gate, Gold OR Gate

Input types: Blue Pipe Signal On, Blue Pipe Signal Off, plus input types of Iron Gate.

Adds the ability for itputs such as Item/Liquid Traversing and Items/Space In Inventory to detect specific item and liquid types.

Output types: Blue Pipe Signal, plus output types of Iron Gate

Input/Output pairs: 4

Diamond Gate[edit]

Types: Diamond AND Gate, Diamond OR Gate

Input/Output types: Adds Green and Yellow Pipe Signal to the capabilities of a Gold Gate.

Input/Output pairs: 8

Autarchic Gates[edit]

Types: Autarchic Gate, Autarchic Iron AND Gate, Autarchic Iron OR Gate, Autarchic Gold AND Gate, Autarchic Gold OR Gate, Autarchic Diamond AND Gate, Autarchic Diamond OR Gate

Input types: The same as the corresponding basic gate.

Output types: Pulse, which pulls items or liquid out of connected container, plus all the output types available to the corresponding basic gate.

An autarchic version of any gate can be crafted by placing the gate in an Assembly Table with a Pulsating Chipset and a Redstone Iron Chipset.

Etymology: From Wikipedia, "Autarchism (from Greek, "belief in self rule") is a political philosophy that upholds the principle of individual liberty, rejects compulsory government, and supports the elimination of government in favor of ruling oneself and no other." The idea seems to be that an autarchic gate rules itself, pulling items or liquids from a source of its own accord rather than asking a Redstone Engine to do the job for it. This is an amusing metaphor, but a limited one, since autarchic gates can be configured to be "ruled" or "rule others" by redstone or Pipe Wire signals, just like any other gate.

Gate Logic[edit]

Each time a gate ticks, it takes all of its outputs of a given type, checks each of their inputs, and performs its logic operation on those inputs to decide whether or not to output that signal. It does this for each output type that is set.

Depending on the configuration, it is possible to perform two ANDs or two ORs in a single gold gate, or up to four in a diamond gate. It is also possible to AND or OR together up to eight inputs to decide whether or not to turn on an output signal.

For example, consider a Gold AND Gate with the following configuration (with the last two I/O pairs empty):

Input Output
Pipe Empty Red Pipe Signal
Redstone Signal On Red Pipe Signal

This gate will only send a red pipe signal if the pipe is empty and the redstone signal is on.

However, if one of the outputs is changed:

Input Output
Pipe Empty Red Pipe Signal
Redstone Signal On Blue Pipe Signal

Then the redstone signal no longer participates in deciding whether or not the red pipe signal is sent. The gate will now send a red pipe signal whenever the pipe is empty and a blue pipe signal whenever it receives a redstone signal, with the two decisions independent of one another.

The behavior of an AND gate can therefore only be distinguished from that of an OR gate if two or more of the gate's outputs are the same.

Timing[edit]

Gates update twice per second, checking all of their conditions simultaneously. A rule that turns on a red pipe signal will not affect a rule that takes the red pipe signal as an input until the next update. A single gate can be made into a clock, turning different pipe signals and redstone on and off in sequence.

Because of the rate at which gates update, items accelerated by Golden Transport Pipes may not activate a gate that is set to detect items traversing. Counting items requires spacing them apart carefully and having them move slowly enough that they take at least half a second to traverse the pipe.

Issues[edit]

A gate outputting a redstone signal cannot directly control an iron pipe that it is attached to. A solid block placed next to or above the gate will receive the redstone power, however, and transfer it to the pipe, allowing signals in pipe wires to redirect the flow of items. It's not clear whether or not this is a bug.

A consequence of this, however, is that a gate set to turn on redstone if the redstone is off will not act as a clock, but will simply remain on as long as there is not an actual redstone signal or a block that can cause it to receive its own redstone signal. This can be used, for example, to keep a redstone engine permanently powered on without having a lever nearby.

Breaking a gate that is sending a redstone signal will not update nearby redstone.

On login, it is possible for a gate to get stuck in a state where it randomly turns a Pipe Wire on and off. The only way to fix this appears to be to remove and replace the gate.

Detection of Full Energy is unreliable for machines that are constantly being drained of energy. Even if the supply is greater than the demand, the machine's charge will sometimes bounce around between several values very close to its capacity, without ever actually sending the Full Energy signal to the gate. Whether or not this bug manifests seems to depend on the position and orientation of the machine relevant to its power sources and sinks. This may be a bug in the affected machines rather than the gate, and may not affect all machines; verified with at least Redstone Energy Cell.