Electric Mob Trap
alaindustrial:electric_mob_trap
Summary
The Electric Mob Trap (tier I) is the opposite of the repeller: the repeller drives hostile mobs away, while the trap gathers them and turns them into a resource. It weakly pulls mobs from a cube 12 blocks wide (6 blocks from the centre along every axis), shocks the ones that come within 3 blocks of its ring, and collects everything they drop: items into a nine-slot buffer, experience into a tank of liquid experience. Pipes take the haul out. Cables and pipes join the four sides and the bottom; the top joins nothing.
The trap does not create mobs. The player controls spawning — a dark platform, light, area and height, as in ordinary mob farms; the trap only collects whatever spawned there.
Quick example: above a dark spawning platform, place the trap, run an item pipe from under it to a chest and an LV cable to one of its sides. Zombies, skeletons and spiders from the platform drift to the ring, take a shock, and the bones, gunpowder and string land in the chest on their own.
Who it affects and who it does not
The trap acts on every monster — angry and calm neutral ones alike (owner's decision 2026-10-15) — with exceptions of its own. In this it is wider than the repeller: the repeller leaves calm neutral mobs alone so as not to raise a pack of zombified piglins. The trap runs no such risk: it makes nobody a target, so a shock on a calm zombified piglin does not wake its neighbours.
| Who | What happens |
|---|---|
| Ordinary monsters (zombies, skeletons, creepers, spiders…) | Pulled in and shocked |
| Neutral monsters (enderman, zombified piglin, piglin, spider by day) | Pulled in and shocked, even calm ones |
| The mod's oil slime | Affected like any hostile mob — a rubber farm is allowed |
| Slimes, phantoms and other mobs with no pathfinding | Pulled by a nudge (see below), shocked |
| Piglins, hoglins, zoglins, breeze, creaking (brain-driven mobs) | Pulled: the trap sets a walk target straight in their brain |
| A mob currently chasing a player (its target is a player) | Forgets the player and is pulled: otherwise a farm with a player standing by would pull nobody |
| Enderman | Shocked and does not teleport: its discharge comes on behalf of the trap's fake player (see "Loot and experience") |
| Shulker | Excluded entirely: neither pulled nor shocked |
| Bosses: Ender Dragon, Wither, Warden | Excluded entirely: neither pulled nor shocked |
| A player in survival or adventure | Shocked when standing within the strike radius (owner's decision 2026-10-15); not pulled |
| A player in creative or a spectator | Not affected |
| Villagers, pets, passive mobs | Not affected |
| A mob inside the field of an active repeller | Not affected (see "A repeller in the same zone") |
Bosses have to be excluded by a list of types: the general hostility filter lets them through, and the game has no "boss" tag. The shulker is excluded the same way. A boss from another mod is not covered by this list — that is its own affair.
Energy
An LV consumer. There is no idle draw: energy is paid only for a strike that landed.
| What | Value | Config knob |
|---|---|---|
| Cost of a strike | 100 EU/FE | |
| Energy buffer | 10000 EU/FE (about 100 strikes) | (applies to newly placed blocks) |
| Intake | up to 32 EU/FE/t (LV) | — |
- A cable connects to the four side faces and the bottom. The top is where the mobs come from: a cable does not connect to it and draws no arm towards it. On a side a cable meets the trap low, as it meets a solar panel: the arm drops to the base plate and runs on above it to the plate under the spark gap, instead of going into the open side between the insulators. From below a cable comes in at the centre of the cell, as to any block.
- One strike costs 100 EU/FE. It is paid only for a strike that landed: if no damage went through (an invulnerable mob, the invulnerability window after a previous hit), no energy is spent. A 20-health zombie costs about 500 EU/FE. At its peak the trap asks for 40 EU/FE/t (8 strikes × 100 EU/FE / 20 ticks) — above the LV ceiling (32 EU/FE/t): the 10000 EU/FE buffer holds the peak, and over the long run LV power gives about 6 strikes a second.
- Without energy the trap does nothing: it neither shocks nor pulls. If there are targets in the zone but the energy is not enough for one strike, the pulse ends with the "Not enough energy" status before anything is pulled. Energy is checked in full for every strike.
Pulling
The pulse. The trap works in pulses every 20 ticks; between pulses it sleeps, but never past the next pulse. The schedule is not saved: after a world reload the trap acts on its very first tick. One pulse goes like this:
- It takes every suitable mob whose box intersects the zone cube (see "Who it affects").
- No targets — the "Waiting for mobs" status, nothing is spent.
- Less energy than the cost of one strike — the "Not enough energy" status, nothing else is done.
- No room in the buffer (no empty slot and no stack below its cap) — the "Buffer full" status, nothing else is done: a full buffer stops both the strikes and the pulling.
- Otherwise the targets are sorted by distance to the block's centre, equal distances by UUID (the order does not depend on the order the world returned them in). Then each mob is either shocked (it stands within the strike radius) or pulled.
The "Shocking" status only if at least one strike landed during the pulse. The lit state does not depend on the pulse's result: it shows that the trap is powered (see "Block properties").
- It works on the server only, once per pulse.
- The zone is a cube 12 blocks wide (6 blocks from the block's centre along every axis, knob ). There is no separate vertical reach: the shared zone preview carries a single number, and the cube it draws is exactly what the trap acts on.
- Per pulse the trap leads at most 16 mobs, counting only those that were actually set moving: the nearest to the centre first, equal distances by UUID. This caps path recalculations on the server.
- The pull is weak, and it does not replace a well-built platform; the trap leads the same mob no more often
- a mob that was chasing a player forgets the player — otherwise a farm with its owner standing by would pull nobody; a few ticks later the mob may notice the player again, and the next pulse leads it away again;
- mobs with pathfinding (every
PathfinderMob) are led by navigation to the block at their own normal pace; if there is no path, the mob does not count as pulled; - for brain-driven mobs (piglins, hoglins, zoglins, breeze, creaking) the trap writes a walk target straight into the brain and clears their attack target — their brain would overwrite an ordinary navigation path at once;
- mobs without pathfinding (slimes, phantoms and the like) get a small horizontal nudge towards the centre once a pulse — otherwise a rubber farm on oil slimes would not work;
- there is no teleporting.
- Mobs already within the strike radius are not pulled — they are shocked.
Shock
- It shocks mobs standing within 3 blocks of the block's centre (the distance is taken from the mob's position), not only the pulled ones — mobs that walk up on their own are shocked too.
- At most 8 strikes per pulse: the nearest to the centre first, equal distances by UUID.
- Damage per strike is 4 (two hearts,), of the "electric shock" damage type (
electric_shock, the same as a cable's), armour counts. This is damage, not an instant kill: a 20-health zombie dies in about five seconds, an armoured mob takes longer. - Every strike re-checks the energy and the room in the buffer: if there is not enough energy for the next strike or the previous one filled the buffer, the rest of the pulse's strikes are not dealt (pulling carries on within the same pulse).
- A discharge is visible as a flash of the node, blue zigzag arcs running down the four open sides (drawn by the block's renderer, about 0.4 s),
ELECTRIC_SPARKsparks at the mob and a short crackle (the vanilla lightning impact sound, quiet and high-pitched).
Loot and experience
The death is an ordinary one: the mob dies as from any damage, and armour, heads, special drops and death events all fire. The loot and the experience orbs fall to the ground, as at any death, and the trap then draws them in the same way as the vacuum collector:
- Every 5 ticks the trap looks over its zone (the same cube as for pulling) and acts on at most the 16 nearest items and experience orbs.
- An item or orb that has touched the block is taken: items into the buffer (as much as fits), an orb into the liquid-experience tank (whole only). One further out gets a push towards the trap, as from the electromagnet — it flies to it by physics, with no teleporting.
- An item with a pickup delay (a fresh drop, an item thrown by a player) waits for the delay to end; an item in lava is not touched. A drop that has stopped getting closer (behind a wall, in a pit) is let go for a while.
- The drawing in is free — it is part of the trap's work. The trap draws in any items in its zone, not only the loot of its own mobs: do not keep anything spare near it.
- The loot is ordinary. Before every strike the mob is marked "recently hit by a player" — by the trap's nameless fake player
[Electric Mob Trap](it lives in memory and never enters the world), so drops with the "killed by a player" condition fall (bones, gunpowder, string — as when killed with a sword) and experience drops. The trap has no Looting enchantment: tier I gives the base drop. - The Soul Vessel does not grow. The damage source has no entity and is not a player: the Soul Vessel counts only personal kills, so levelling the repeller stays with the player. The death message, if shown, reads "was electrocuted"
- The enderman is an exception by source. From damage with no living attacker an enderman teleports away, so its discharge is dealt on behalf of the trap's fake player. The Soul Vessel does not grow then either (the fake player has no vessel), and the trap clears at once the anger the strike caused.
- No mastery points are awarded (like the repeller): the trap does not become a points farm.
- Items go into the nine-slot buffer. While the buffer has no room, the trap neither shocks nor pulls. Details of the buffer are below.
- What does not fit into the buffer stays in the world as an ordinary item and does not vanish; the trap comes back to it once room frees up.
- Experience is turned into liquid experience at 20 mB per point and kept in an internal 8000 mB tank, that is 400 points (applies to newly placed blocks) — about 80 zombies. The liquid is called and is in the
c:experiencetag, so it is compatible with other mods. It has no bucket and no liquid block, like steam: it exists only inside tanks and pipes and cannot be poured into the world. The tank hands the liquid to fluid pipes (through the four sides and the bottom, not the top) and accepts nothing. - Tank full — the orbs stay in the world. Experience does not vanish silently: the player can pick it up, and the visible reason is the orbs on the floor round the trap. An orb is taken whole or not at all: an orb that does not fit into the tank whole stays in the world. A full tank does not by itself stop the strikes.
- Experience orbs fly to a player on their own when one is closer than 8 blocks: standing by the trap, a player may catch the experience before it does.
Buffer and transport
- 9 output slots; a slot's cap is the item's stack size but no more than 64, so up to 576 ordinary items.
- The GUI is a machine screen: a 3×3 grid of take-only slots, an energy bar on the left, the liquid-experience tank on the right (with a "liquid: N / capacity mB" tooltip), a status line and an "eye" button that previews the zone (as on the repeller and the vacuum collector; it shows the zone cube). There is no upgrade panel: the trap has nothing a chip could speed up beyond the pulse period. Status line values: "Shocking", "Waiting for mobs", "Buffer full", "Not enough energy" (the last two are blocking and highlighted as a stop).
- Items can be taken out but not put in — not by hand, hopper or pipe.
- The trap pushes nothing anywhere itself. Item pipes take from the buffer on their own, fluid pipes take liquid experience from the tank. A cable, an item pipe and a fluid pipe connect to any of the four side faces and to the bottom: each of these five faces takes energy and gives out both the loot and the liquid experience. On a side the pipes, like the cable, meet the trap low. The top connects to nothing: no energy, no items, no liquid; neither a cable nor a pipe draws an arm towards it.
- With no pipes the buffer fills up, and the trap stops shocking and pulling until the player frees some room.
A repeller in the same zone
The repeller takes priority. Every sweep of a repeller renews a short "lease" on its zone (two scan intervals plus one tick). A mob whose box intersects the zone of such a live lease is neither pulled nor shocked by the trap. A repeller that is broken, switched off by redstone or out of energy stops sweeping, the lease expires within a couple of sweeps, and the mob becomes the trap's target again. So do not place the trap inside a repeller's field — the mobs will be driven away before they reach the ring.
Block properties
The model is the chosen concept E "Spark Ring" (tools/model_sources/electric_mob_trap_concepts/e_spark_ring/): a copper ring on four strings of ceramic insulators, with a spark-gap node on a post in the centre. The model is 16×12×16 pixels; the selection and collision are the same 16×12×16 box, built once. There is no facing: the ring looks the same from every side. The block is not a full cube, so its occlusion shape is empty and light passes through (as on the vacuum collector: neighbours do not lose their faces, and the cell casts no corner shade); is not used.
| What | Value |
|---|---|
| Shape | a ring on insulators, 16×12×16 px, the whole box is solid |
| Connections | the four sides and the bottom — energy, items, liquid experience; the top — nothing. On a side cables and pipes meet the block low (arm at 2..8 px); a cable carries its arm 5 px on inside, to the plate under the spark gap |
| Hardness | 3.0 / 6.0, metal; tool — pickaxe |
| State | lit — the buffer holds enough energy for a strike (the trap is powered) |
| Animation | while the trap is powered the node pulses (animated texture, .png.mcmeta); without energy the node is still; at the moment of a strike — a flash of the node |
| Rendering | the block's renderer draws blue zigzag arcs down the four open sides (about 0.4 s); at the mob — vanilla ELECTRIC_SPARK particles |
| Sound | no mod sounds of its own; a strike plays the vanilla LIGHTNING_BOLT_IMPACT (volume 0.35, pitch 1.8) |
Recipe
A 3×3 crafting grid, full: the vacuum collector in the centre, a lightning rod above it, an electronic circuit below it, copper coils on the sides and ceramic plates in the corners.
[Ceramic plate] [Lightning rod] [Ceramic plate]
[Copper coil] [Vacuum collector] [Copper coil]
[Ceramic plate] [Electronic circuit][Ceramic plate]
- Ceramic plate — the ring's insulators.
- Copper coil and electronic circuit.
- The lightning rod is vanilla (
minecraft:lightning_rod).
This is the only way to obtain it: the trap is not grown and not upgraded. This specification covers tier I only.
Progression
Tier I is a "weak" trap for ordinary farms. The liquid experience in its tank goes back to the player as orbs through the Tap: hung right under the trap or at the end of a fluid pipe. Possible development (separate tasks, outside: looting from an enchantment, the species journal from
Related
- Small Mob Repeller — the trap's opposite; takes priority over it.
- Soul Vessel — the trap does not fill it.
- Vacuum Collector I — the model for the design and an ingredient of the recipe.
- Task — the owner's decisions and the research.
- Task — connections on every face but the top.
Crafting
Shaped Crafting
▶
Electric Mob Trap