Tutorials/Trap design

Traps deal damage to the target without the assistance of the player. Not all traps are hidden and visible traps can induce a sense of safety in the target before they trigger the main one. In the following, the target is either the player or a mob, and not all traps are equally effective against them.
== Video ==
==Trap Parts==
There are three or four parts that can be seen in most traps:
*Trigger. The trigger is what starts the trap. It tends to be triggered by the target.
*Complication. These make the trap more efficient, but are not strictly necessary.
*Method. The method is the way the target is dispatched. The method is how the damage is dealt.
*Bait. This is usually how you lure players in. This can be, for example, valuable objects, or it can be something highly visible, like black wool in the desert. This can be added to your trap or incorporate a small modification to a building being trapped.
===Trigger===
A trigger is what activates the trap. Triggers tend to use redstone, but analog triggers are also possible (water breaking torches, for example). Triggers can be effective if hidden in plain sight. This can be a button beside a door, or a pressure plate infront of a door which triggers more than expected.
*Pressure plates send a trigger whenever a player or mob steps on it and the signal is turned off when the player moves. A pressure plate can be attached to an RS NOR latch to stabilize the signal. Hiding a pressure plate can be done by keeping a low light level in the area and placing the pressure plate in the path of any player going through that area.
*Buttons creates a short pulse and can be attached to an RS NOR latch or T flip-flop to stabilize the signal. If a button is used as a trigger, the target must be tricked into believing the button does another task (such as open a door or toggle lights).
*If a block is mined with a redstone torch on it (the torch being out of sight), the destroyed torch can be used as a trigger. The trick is to have the target mine the block on their own free will, which can be done by using a valuable or rare block such as diamond or gold.
*Water currents can be updated by an adjacent block update. This can be seen when redstone redirects water but also works with doors activated by hand and furnaces. The updated water flow would then knock out a redstone torch, creating the signal.
*A BUD switch can be used to trigger a trap if a door, or chest is opened. They can also detect other block state changes
*Some players have experimented with the ability to pick up an item through a corner. The item is placed on a wooden pressure plate, the deactivation of which creates a signal. The item will disappear after 5 minutes, so the trap is unstable without a pre-trigger complications, but this can be avoided by redispensing it. This trigger also assumes the target has room in their inventory for the item being used. Arrows tend to be used because many players carry arrows and probably wouldn't notice an extra. This trigger is much more hidden than others, almost any corner can be a trigger. A tutorial video explaining this type of trigger is shown below.
===Complications===
A complication is any part between the trap triggering and the method being employed. Many more complications exist than just those below. Complications tend to add a delay to the trap, which is usually not desirable.
*A redstone clock can be used to generate periodic pulses. This is almost always used with arrow dispensers or a trap that is triggered periodically such as a piston grinder.
*RS NOR latch / T flip-flop. These circuits take a short pulse and stabilize it. An RS NOR latch uses two inputs, one to set the signal, and another to reset it. The reset switch would be away from the target. A T flip-flop uses only one input which toggles the signal. This is less common in traps than an RS NOR latch because the target could have a chance to reset the trap before they are killed.
*False walls (pistons/gravity). False walls hide important parts. This is a complication in that it does not deal damage, but hides the method, thus giving the target a false sense of security. Pistons can easily place and replace false walls, but redstone wiring can be difficult to hide in an open area. Sand and gravel can be used as an airlock to reveal important parts by using water to knock down the supporting torch, but this requires manual reseting every time the trap is triggered.
*A hole can be considered a complication because it forces the target into a smaller area rather than deal the killing damage. For the sake of this tutorial, a hole is a non-fatal fall, and a pit is a fatal fall. Like a pit, the target is often pushed into it.
*Water has limited pushing power which can be effective if the target doesn't react, such as with mobs. These are very common in mob farms as canals, but are almost entirely ineffective when used to transport players.
===Method===
The method is any reliable way of dealing damage to the target. The method is usually hidden so the target doesn't suspect impending danger. For more detail about damage calculation, see Health and Damage
*Falling uses a pit. When the target falls more than 3 blocks, they take damage on impact. The greater the distance, the more damage. Falling is generally combined with either a piston or a dispenser to push the target into the pit. These traps are easy to build, and mobs can be lured/pushed into them, but are large and can be difficult to gather drops. Chickens do not suffer fall damage. False floors are generally required if a player is the target.
*Lava is a dangerous fluid to use. Any mob caught in lava will take periodic damage from it as well as periodic fire damage. Since lava spreads slowly the lava source should be close to the target, so it doesn't have much time to attempt an escape. Lava will destroy any item that falls in it. It can be used effectively in an enclosed space and triggered by a ceiling floodgate. Alternatively, a hole filled with lava that the target is pushed into doesn't require time for the lava to spread. It is also advisable to line such a hole with a block such as a furnace, so that the victim cannot place blocks to escape.
*Water is difficult to use because there can be air pockets if the source blocks are too spread out. All players and mobs have an air meter than must run out before they begin taking damage, players may have enough time to mine an air pocket and escape unharmed. Drowning is uncommon in traps for players but is often found in mob traps or mob grinders.
*Suffocation. A player or mob whose upper body is in a solid block will take suffocation damage. This can be accomplished by dropping sand or gravel in the target. However, players are pushed into an open space if possible to avoid suffocation damage. If a player can quickly mine out the block causing the damage, that player will stop taking damage and may be able to escape. Using pistons to push the block into the player is an effective method if you know exactly where the player will be.
*Arrows can deal damage to players either by being propelled by TNT, dropped from a trapdoor, or most commonly, from a dispenser. Arrows from TNT cannot be reliably directed. Arrows dropped from a trapdoor can only cause minimal damage to the target. Dispensers can fire very rapidly, and far which makes them ideal for an enclosed space like a tunnel. The dispenser must be reloaded from time to time.
*Hostile mobs can be used to deal damage to the target, assuming the target is a player. The trapper collects mobs either by a [mob farm] or manually lures them into a hole. The target is either dropped into the hole with the mobs or the mobs are released into the same room as the target. The mob sounds could make the target more cautious.
*TNT is a common way to dispatch the target. It deals major damage to the target and has a fairly short fuse, which means less time for the target to react. It doesn't destroy the items dropped by the target. TNT does, however, destroy surrounding blocks unless it detonates in a fluid (water or lava). Many players use this property to create traps that can be reused. Players also may make traps that purposefully destroy massive areas by chaining TNT together. When TNT is ignited, it becomes an entity which means it no longer supports other blocks. This can be used as the trigger for an airlock which can trap the player in the area until the TNT explodes.
*Cactus deal damage whenever the target is in contact. Like lava, cactus destroy any items that comes into contact with it. Cacti must have all four cardinal blocks empty to be legally placed. Having the cactus grow into an illegal block is how cactus farms are built, and sending mobs through a cactus farm may be an effective grinder.
*Not all traps have a method. Traps can be used to live capture players or mobs. Since players can mine and place blocks, they are much more difficult to live capture.
==Using the Terminology==
Let's create some simple traps to describe the parts we just discussed:
Example 1
A miner is digging away a 2x1 tunnel. They find gold ore, but once they mine it arrows are relentlessly shot at him.
On the back of the ore is a redstone torch that acts as the trigger by sending a signal once broken. This signal allows a rapid pulsar (complication) to repeatedly send power to a dispenser, the method.
Example 2
An explorer comes across a cave. They drop down a few blocks when they notice it's getting lighter instead of darker. They jump to their next ledge just before a flow of lava engulfs their previous position.
Since our trapper can't maintain the trap consistently without drawing suspicion, let's assume they set up a redstone clock to a dispenser. Every four and a half minutes a new item will be dispensed, maintaining the trap. Clocks are generally a complication, but since it is used to stabilize the trigger we'll call it part of the trigger.
This trap is hidden in a natural location and uses an invisible trigger (an item through the wall). This opens a flood gate of lava (method) in the entrance, it will spread and trap the explorer in the cave.
Example 3
The owner of a large underground mansion is being chased by another player. The owner escapes through an iron door controlled by a pressure plate. On the other side, they hit a button.
The pursuer sees him open the door by the pressure plate and follows him, but the door doesn't open. Instead, a series of pistons opens a hole and pushes the assailant into it. Once the pistons extinguish the light from the opening, it is pitch black.
The button on the far side of the door is a safety attached to a T-flip flop. It engages the trigger (the pressure plate), which, until a moment ago, was pretty uninteresting. Both sets of pistons (The ones that opened the hole and the ones that pushed the assailant) are complications. The obsidian jail is a live-capture method.
Example 4
A robber has snuck into a large obsidian-reinforced storage facility and walks into a room with a red wool floor. They hear an audible click before the opposite wall is pulled away revealing dispensers that start to pelt him with splash potions of poison and slowness. Before they can get away, a 9 block TNT charge goes off but since the room is reinforced the facility as a whole escapes unscathed.
The pressure plate in the door is the trigger. The piston-removed false wall is a complication. The dispensers are a method. However, there is a 6-second repeater delay (complication) connected to a secondary method (bomb).
Example 5
A player in a faction server is wandering about, searching for bases to raid. They are in a plains biome and sees a house made of andesite (flat biomes are great to put baited traps in because of high visibility). The player has left a door open (usually players will not mine on factions servers). The player walks inside cautiously and finds medium-tier loot. Thinking it is the house of an unexperienced player (try to make your trap's bait appeal to the server, nobody will walk into a giant obsidian monolith with no backup), they walk into the basement. However, upon opening the spruce door (opaque) to enter the basement, the blocks before and after the door are opened up, and the player is quickly funneled into a hay-based creeper-proofed capturing trap, and can't teleport away. The player's friends can't rescue him before the trapper claims the land and demands a ransom.
Obviously this trap works best on factions with a lot of ranked players.
==Safety==
Any trap that uses redstone can be given a lever to create a safety switch. This switch may be activated to allow the trapper to perform maintenance or pass safely. The simplest way to do this is to construct an AND gate, using a lever as one of the power sources. When active, the AND gate functions as a double NOT gate.
Generally, the AND gate is placed between the trigger and the rest of the wiring, but this may not be the case for all traps.
==Disarming Traps==
Traps are not designed to be found and immediately lose effectiveness once discovered. That being said, disarming a trap will require an understanding of the trap and there is no guarantee you'll survive the disarming process.
The more traps you disarm, the more proficient you'll be at it.
But if you come across a something suspicious that you don't recognize, here are a few tricks:
*Don't alter any redstone (either active or inactive) unless you can see the entire circuit. Even inactive redstone can be part of a really long clock.
*If you find the method, disable that (take arrows out of a dispenser, take TNT, knock down cacti, take/fill in lava). It may be a two method trap, so you're not necessarily safe yet.
*If all else fails, try to safely trigger the trap. Either step on the trigger and run, or use redstone to trigger it from a distance. It is best to have a good understanding of the nature of the trap before attempting to trigger it, as one can easily underestimate its size.
* Another way to disarm a trap is to explode it with TNT. This doesn't work with bedrock and obsidian.
Anti-tampering complications are rare. So when a player incorporates one into their trap, it will often be something of their own design. Synchronized clocks are probably the most common and will trigger a defense mechanism if one is desynchronized.
==Mob grinder==
Mob grinders are an integral part of a mob farm. One way to think of a mob farm is as one entirely self-sufficient trap. The spawning of mobs is the trigger, canals are a complication and the grinder is the method. We'll only be looking at mob grinders here, for a tutorial on Mob farms, see Mob Farm.
Water streams push the target into the grinder. Grinders don't work well with players because they can fight the current or disrupt it by placing blocks.
*A piston smasher trap uses a piston to periodically suffocate trapped mobs. Mobs can be packed together by dropping them into the smasher. The design to the right cannot process a massive amount of mobs at once, since mobs will push against each other and clog the machine. The smasher to the right will eventually work through a buildup of mobs though. Also, this design doesn't work for spiders.
*Lava grinders push the mob into a suspended stream of lava. Most items will be preserved and can be collected using additional water streams. Since lava grinders are a light source, it must be put away from the spawning pads as to not interfere with mob spawning.
*Drowning grinders use water to deal damage to mobs. Mobs will float when in solid water source blocks and eventually drown if they don't find an air pocket.
*Sunlight chamber deal damage to zombies and skeletons. A benefit of this is the ability to sort out creepers, spiders and endermen. The obvious disadvantage to this is it only functions half the time.
de::technik:Spieler-Fallenanlage
ja:チュートリアル/トラップの設計