Repository navigation
Datapacks and commands
Field Emitters includes two presets you can apply to an existing field. They work on all five 1.4.0 builds. You need operator permission level 2 to run the commands.
- Stand beside a powered field. Make a note of the base block's X, Y and Z coordinates. Choose a field you can change because applying a preset changes its network settings.
- Run
/fieldemitters presetsto list the available presets. Use your base coordinates in place of0 64 0below. - Run
/fieldemitters apply 0 64 0 fieldemitters:smart_tripwire. This preset opens the barrier to passage and selects crossing pulses on a fresh field. - Walk across and run
/fieldemitters status 0 64 0. Check the crossing count. To connect a lamp, see Sensors and redstone. - To use a hostile-mob wall instead, apply
fieldemitters:hostile_barrier.
In an existing datapack, save the following file at data/workshop/fieldemitters/presets/blue_gate.json. This example changes only the color and the enabled switch. It keeps the network's filters.
{
"color": "#4579FF",
"enabled": true
}Run /reload, then /fieldemitters apply 0 64 0 workshop:blue_gate. Open the tuner and check the color. Reapply a preset after editing its file if you want the edits on an existing field. To build a preset from a field you already configured, /fieldemitters export 0 64 0 prints its settings as JSON.
A pack can set "locked": true to keep the field's settings fixed. An operator can reopen editing with /fieldemitters unlock 0 64 0.
On NeoForge 1.21.1, Forge 1.20.1 and Fabric 1.20.1, the optional KubeJS integration can react to a completed crossing, contraband, power changes and passage decisions. Put scripts in kubejs/server_scripts/. Use the crossing event for something that should happen once per crossing. A passage decision can run repeatedly as an entity approaches.
The repository reference includes the filter JSON format, command results, compatible KubeJS builds and complete server script examples. Datapack and KubeJS reference
Getting started
Builds
Tuner guides
- Using the Field Tuner
- Blocking filters
- Sensors and redstone
- Access cards and permissions
- Inventory checkpoints
- Contact damage
- Appearance and sounds
Reference