Nexo
Overview
Nexo adds custom items, blocks and furniture to your server. This extension brings them into TypeWriter: a quest can ask players to break a custom ore or place your furniture, a sequence can start when a player hits a block, and criteria can check what a player holds or looks at.
Everything is addressed by the Nexo item id, for example ruby_ore or oak_chair. You still define the content in Nexo; this extension only reads and reacts to it.
Features
- Block events — break, place, interact, damage (a player starts mining) and loot drop for custom blocks.
- Furniture events — break, place, interact and damage for furniture, with an optional BetterModel id filter.
- Counting objectives — break or place custom blocks and furniture as a quest objective.
- Item inventory tools — give or remove Nexo items, and react to picking up, dropping or consuming them.
- Item facts — held item, item count, and whether the held item uses a given mechanic.
- World facts — block looked at or stood on, furniture looked at, furniture light state, and the time needed to break a block.
- Variables — ids and properties of held items and of blocks and furniture in view, plus registry and tag lists.
- Sound entry — use a Nexo sound id wherever TypeWriter asks for a sound.
Installation
- Install Nexo on your server. This extension does not load without it.
- Make sure the TypeWriter Quest and Basic extensions are installed.
- Download the extension from the stores (see the buttons in the panel above) and put the JAR in
plugins/Typewriter/extensions/. - Restart the server.
Getting started
This walkthrough starts a sequence when a player right-clicks a custom block, and counts furniture for a quest.
- On a sequence page, add a Nexo Block Interact event.
- Set
blockIdto the Nexo block id, setactiontoRIGHT_CLICK, and linktriggersto the entries to run, for example a dialogue. - For a counting task, create a quest and a progress fact, then add a Place Furniture objective.
- Set
quest,fact,itemto the furniture id andamountto5. Filldisplaywith the tracker line, and linkonCompleteto a reward sequence if you want one. - Publish and test with a player who has the quest active.
The Registry IDs variable lists every item, block or furniture id that Nexo has loaded. The Tag Items variable lists the items of a Nexo tag.
How it works
Events pass what happened to the triggered entries: the block or furniture id, its position and, for furniture, the BetterModel id. The loot drop event also passes how many stacks and items dropped.
Objectives count each position once per player, so placing and breaking the same spot again does not add up. They count only while the player has the linked quest active. Cancelled actions are ignored.
The betterModelId filter on furniture events and objectives matches the bettermodel_id key of the furniture in your Nexo configuration. Leave it empty to ignore it.
Configuration
The objective lines in the quest tracker are built from two TypeWriter snippets:
| Snippet | Default |
|---|---|
advancedQuest.display | <display> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>) |
advancedQuest.completed | <green>✔</green> <st><display></st> <dark_gray>(<gray><current><dark_gray>/<gray><required><dark_gray>) |
Entries
35 entries, generated from the extension source.
Actions2
- Nexo Give Item ActionGive a Nexo item to the player
- Nexo Remove Item ActionRemove a Nexo item from the player
Events12
- Nexo on Customblock Break EventTriggers when a Nexo custom block is broken
- Nexo on Customblock Damage EventTriggers when a player starts breaking a Nexo custom block
- Nexo on Customblock Drop Loot EventTriggers when a Nexo custom block drops loot
- Nexo on Customblock Interact EventTriggers when a Nexo custom block is interacted with
- Nexo on Customblock Place EventTriggers when a Nexo custom block is placed
- Nexo on Furniture Break EventTriggers when a Nexo furniture is broken
- Nexo on Furniture Damage EventTriggers when a player hits a Nexo furniture
- Nexo on Furniture Interact EventTriggers when a Nexo furniture is interacted with
- Nexo on Furniture Place EventTriggers when a Nexo furniture is placed
- Nexo on Item Consume EventTriggers when the player consumes a Nexo item
- Nexo on Item Drop EventTriggers when the player drops a Nexo item
- Nexo on Item Pickup EventTriggers when the player picks up a Nexo item
Objectives4
- Nexo Break Customblock ObjectiveAn objective to break Nexo custom blocks
- Nexo Break Furniture ObjectiveAn objective to break Nexo furniture
- Nexo Place Customblock ObjectiveAn objective to place Nexo custom blocks
- Nexo Place Furniture ObjectiveAn objective to place Nexo furniture
Facts8
- Nexo Break Time FactTicks this player needs to break the Nexo block they are looking at
- Nexo Furniture Light State FactWhether the Nexo furniture the player looks at is lit
- Nexo Holding Item FactWhether the player is holding a Nexo item
- Nexo Item Count FactHow many of a Nexo item the player carries
- Nexo Item Has Mechanic FactWhether the held Nexo item uses a given mechanic
- Nexo Looking at Block FactWhether the player is looking at a Nexo custom block
- Nexo Looking at Furniture FactWhether the player is looking at Nexo furniture
- Nexo Standing on Block FactWhether the player is standing on a Nexo custom block
Variables8
- Nexo Furniture Property VariableA property of the Nexo furniture the player is looking at
- Nexo Item in Hand ID VariableThe Nexo ID of the item the player holds
- Nexo Item Property VariableA property of the Nexo item the player holds
- Nexo Looking at Block ID VariableThe Nexo ID of the block the player is looking at
- Nexo Looking at Furniture ID VariableThe Nexo ID of the furniture the player is looking at
- Nexo Registry Ids VariableThe list of IDs Nexo has loaded
- Nexo Standing on Block ID VariableThe Nexo ID of the block the player stands on
- Nexo Tag Items VariableThe Nexo items carrying a given tag
Sounds1
- Nexo SoundNexo Sound
Troubleshooting
The extension does not appear in the panel. Nexo is not installed or did not enable. Every entry calls the Nexo API, so the extension refuses to load without the plugin.
An event never fires. Use the Nexo item id exactly (ruby_ore). An empty id matches anything. If you filled location, only that block position matches. Events that were cancelled by another plugin are ignored. For furniture, a betterModelId that does not match the furniture's bettermodel_id blocks the event.
The objective does not move. The player must have the linked quest active, and fact must be set. Each block position counts only once per player.
Registry or tag variables are empty. Nexo loads its items in the background. These variables return nothing until Nexo has finished loading, so do not read them during server startup.
A fact always returns 0. The item or block is not a Nexo one. Block facts check the first block within range blocks (5 by default). The break time fact returns 0 when the target block is not breakable by Nexo. The mechanic fact needs the exact Nexo mechanic id.
Give Item gives nothing. The itemId is unknown to Nexo, so no item is built. Leftovers that do not fit are dropped at the player's feet unless dropOverflow is off.
Related extensions
- ItemsAdder and Craft Engine — the same integration for the other custom content plugins.