World logic
World logic is a list of rules that adds gameplay to a map. You write no code. The editor exports the rules as data (scene.json), and the server plugin NP Scene runs them as they are.
A rule runs in the following order.
| Order | Part | Meaning | Example |
|---|---|---|---|
| 1 | Trigger | What starts the rule (one) | On zone enter · Right-click actor · On block break · Timer |
| 2 | Filters | Rule limits | Once globally · Once per player · Cooldown · Permission |
| 3 | Conditions | Continue only when all are true | Time of day = night · Held item · Chance |
| 4 | Actions | Run in order from the top | Sound · Screen title · Show actor · Wait · Teleport |
When you add the Wait action (wait), the actions after it run later by the given number of seconds. If the same rule fires again while waiting, another copy runs separately.
The full list of triggers, conditions and actions and their fields is in World logic type list.
How to open
Section titled “How to open”| What | Where |
|---|---|
| World logic panel | Tools › World logic (the World logic tab in the bottom dock area. You can also turn it on from the Window menu) |
| Zone trigger wizard | Ctrl+Shift+T · Tools › Create zone trigger… · Zone trigger in the panel · Add › Zone trigger (wizard) |
| View the same rules as nodes | Tools › Logic graph — Logic graph |
Quick start
Section titled “Quick start”Use the zone trigger wizard to create an “on enter: sound + title” rule.
- Press Ctrl+Shift+T.
- Drag on the viewport floor to draw a zone. A plain click makes a 4×4 zone. Esc cancels drawing.
- Type
입구in Name in the wizard window. - Leave When set to When a player enters.
- Under Actions, click Play sound and Show title. Rows appear below.
- Check the one-line description in the Result field (for example “When a player enters “입구” → …”).
- Click Create. The zone actor and the rule are created together (one Ctrl+Z undoes both).
- To check it right away, click Create and test. Play starts.
World logic panel
Section titled “World logic panel”The panel is split into the rule list on the left and the property fields on the right.
Left: rule list
Section titled “Left: rule list”| Element | What it does |
|---|---|
| Zone trigger | Starts the zone trigger wizard (drag in the viewport for a new zone). |
| Variables | Opens the variables, enums and data types window — Variables, functions and data types |
| + | Creates a new rule (zone enter → message). |
| Duplicate · Delete | Duplicates or deletes the selected rule. |
| Up · Down | Changes the rule order. Rules triggered at the same moment run in list order. |
| Rule row | Enable icon · trigger icon · name · one-line description · error/warning icon |
| Fire (end of row) | Appears on rules whose trigger can only be fired manually. Runs the rule in Play as if that event had happened. |
Below the list are three more sections.
| Section | Contents |
|---|---|
| Zones | Show zones · blocking boxes in viewport · selected zone info · zone check |
| Simulation | Time of day (atmosphere preview time · day · night) · Weather (clear · rain · thunderstorm) · Has all permissions |
| History | Play test button and a log of fires, skips and actions (time in seconds) |
When you select a zone in the viewport or the Outliner, the rules that use it are highlighted in the list and the first one opens. If no rule uses it, an Attach actions to “Name” button appears.
Right: property fields
Section titled “Right: property fields”| Part | Contents |
|---|---|
| Header | Enable checkbox · trigger icon · rule name · Fire (manually fired triggers) · edit with wizard |
| One-line description | A plain description starting with →. It changes every time you edit. |
| id | The rule id in scene.json. Use only letters, digits, _, . and -. Press Enter to apply. |
| Trigger | type button + fields |
| Conditions | List of condition cards + Add condition |
| Actions | List of action cards + Add action |
| Filters | Once globally · Once per player · Cooldown · Permission |
- Clicking a type button opens a menu grouped by category (Zone · Flow · World · Screen · Actor · Collision · Block · Combat · Variable · Function).
- Triggers that can only be fired manually are marked (trigger button) in the menu.
- When you change the type, values of actor and text fields with the same name are carried over.
- Condition and action cards have number, Up, Down, Duplicate and Delete buttons.
- Required fields have a
*after the name. - An actor field lists only actors of the matching type.
- Check messages (errors and warnings) appear right below the field.
Filters
Section titled “Filters”| Field | scene.json | Meaning |
|---|---|---|
| Once globally | once | Runs only once on the whole server. |
| Once per player | once_per_player | Runs once per player. Ignored when Once globally is on. |
| Cooldown | cooldown | Seconds the same player must wait before running it again. |
| Permission | permission | Only players with this permission node run it (for example noplatea.vip). |
If a condition is false, no fire record (once · cooldown) is kept.
Zone trigger wizard
Section titled “Zone trigger wizard”When you drag on the floor to draw a zone, the wizard window opens. A yellow draft box appears in the viewport.
| Field | Choices |
|---|---|
| Name | Name of the zone (or blocker box) actor |
| Size | Cell counts for X (width) · Z (depth) · Y (height). Resizes around the center of the floor. |
| When | When a player enters · When a player leaves · On collide (bumps into blocking box) · When a block is broken |
| Block to break | For When a block is broken. Empty means any block; tags such as #minecraft:logs also work. |
| Who | Anyone · First person only (once per server) |
| Loop | Every time · Once only (per player) |
Clicking an Actions button adds a row. Rows run in order from the top.
| Action | Action it creates |
|---|---|
| Play sound | Sound |
| Show title | Screen title |
| Chat message | Chat message |
| Show actor | Show actor — choosing new text creates a hidden text actor above the zone. |
| Show blocks | Fill blocks — uses the area selected with the selection tool (4) as the range. |
| Play animation | Play animation |
| Teleport | Teleport — choosing a new destination creates a spawn actor. |
| Open doors | Turns the door range into air and restores it after the given seconds (open/close sound selectable). |
| Checkpoint | Action bar text + checkpoint — sets the respawn location (spawn actor). |
- Create creates the zone, any needed actors and the rule at once.
- When you edit an existing rule with the wizard, the buttons change to Save and Save and test.
- Actions the wizard does not know are kept as-is as Other action rows. Conditions, cooldown and permission are also kept.
- Choosing On collide creates a blocker box instead of a zone.
Where for block triggers
Section titled “Where for block triggers”Since 0.9.11: The On block break, On block place and On block right-click triggers have a Where field.
| Where | area | Check |
|---|---|---|
| Zones | zone | Blocks inside a trigger zone actor (same as before) |
| Selected block | blocks | Only the block cells selected in the viewport |
| Anywhere | anywhere | The whole world. No zone needed. |
To use Selected block:
- Select blocks in the viewport with the selection tool.
- Click From selection in the Selected block field. The cells, excluding air, are added.
- Click the eye button to reselect and show those cells in the viewport.
- Selected blocks are limited to 4,096 cells. For larger areas, use a zone actor.
- Old rules without Where are read as Zones.
- Use the Block field to filter by block type (empty means any block).
Checks
Section titled “Checks”Rules are checked every time you edit them. Error and warning icons appear on list rows, and messages appear below the field in the property area.
| Kind | Examples |
|---|---|
| Error | Missing actor · actor of the wrong type · missing clip · wrong sound id · zone buried in blocks that cannot be entered · function rules with the same name |
| Warning | Sound library · sound not in vanilla · signal with no receiving rule · signal loop without wait · zone no rule uses · zone whose rules are all disabled · unknown type |
An unknown type (a type from an event plugin this editor does not have) appears as read-only fields and is preserved as-is. It runs if the server has that plugin.
The console command logic prints the rule and clip lists and the check results as text.
Running on the server
Section titled “Running on the server”- When you create a
.npbuildin the export window, turn on Include scene (on by default).scene.jsongoes into the.npbuild— Export and import - When the
.npbuildis installed on the server, rotation, mirroring and position are applied and converted to server coordinates. - The server plugin NP Scene runs the rules. No new code is generated.
- Coordinates are exported relative to the building’s minimum corner (origin). The format is in scene.json format.
- State such as “once” records and flags is saved by the server in
state.json. - The Server command action runs only if an operator enables it in the server settings. The editor does not run it.
Options
Section titled “Options”| Option | Location | Default | Meaning |
|---|---|---|---|
| Show zones · blocking boxes in viewport | Panel Zones | On | Translucent trigger zone boxes + name and one-line rule, blocker boxes (hatched) |
| Time of day | Panel Simulation | Atmosphere preview time | The time the Time of day condition sees in Play |
| Weather | Panel Simulation | Clear | The weather the Weather condition sees in Play |
| Has all permissions | Panel Simulation | On | When off, permission filters and conditions are false in Play |
| Include scene | Export window | On | Puts scene.json in the .npbuild |
Shortcuts
Section titled “Shortcuts”| Key | Action |
|---|---|
| Ctrl+Shift+T | Create zone trigger (drag a zone → wizard) |
| Esc | Cancel zone drawing · close the wizard window |
| Ctrl+Z | Undo rule changes (text input is merged into one step) |
| 1–9 | Run a rule from the Fire list during Play |
Tips / notes
Section titled “Tips / notes”- When you have many rules, use the Logic graph to see the flow at a glance. It is the same data, so you can edit on either side.
- Rule edits made during Play take effect from the next Play. Play copies the rules when it starts.
- Triggers such as On block break and On damage are not fired by Play on its own. Test them with the Fire button or the number keys.
- The Cancel event action is meaningful only as the first action of a rule (before
wait). - Send signal runs the rules that receive that name immediately, on the spot. If several rules receive it, all of them run.