# Home

## What is Nexo?

Nexo is an all-in-one Minecraft plugin that makes it easy for server admins to add their own items, blocks, armor, and furniture.\
By using simple file-based configuration, Nexo automatically handles Resource Pack generation. Nexo then dispatches the pack to all players on the server, allowing everyone to see the custom models and textures set up by the admin.

This documentation contains a complete list of features, as well examples of what Nexo can do. If you need further assistance, please join the Discord server with a proof of purchase.

{% hint style="info" %}
Nexo has been tested on Paper & Folia. Info about versions are supported can be found [Version Support](/version-support)
{% endhint %}


# Version Support

Nexo aims to support the latest releases of Minecraft as soon as possible.\
Below is a detailed list of which server-versions Nexo currently supports.

<table><thead><tr><th width="183">Version</th><th width="218">Status</th><th>Notes</th></tr></thead><tbody><tr><td>26.2</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <a data-footnote-ref href="#user-content-fn-1"><strong>Supported</strong></a></td><td>Nexo 1.25+</td></tr><tr><td>26.1-26.1.2</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <a data-footnote-ref href="#user-content-fn-2"><strong>Supported</strong></a></td><td>Nexo 1.22+</td></tr><tr><td>1.21.11</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <a data-footnote-ref href="#user-content-fn-3"><strong>Supported</strong></a></td><td>Nexo 1.16+</td></tr><tr><td>1.21.10</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <a data-footnote-ref href="#user-content-fn-4"><strong>Supported</strong></a></td><td>Nexo 1.13+</td></tr><tr><td>1.21.8</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <a data-footnote-ref href="#user-content-fn-5"><strong>Supported</strong></a></td><td>Nexo 1.10+</td></tr><tr><td>1.21.5</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <strong>Supported</strong></td><td></td></tr><tr><td>1.21.4</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span> <strong>Supported</strong></td><td></td></tr><tr><td></td><td></td><td></td></tr><tr><td>1.21.3</td><td><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> <a data-footnote-ref href="#user-content-fn-6"><strong>Unsupported</strong></a></td><td>Official support removed as of Nexo 1.25+<br>Can be used on Nexo 1.24 &#x26; older</td></tr><tr><td>1.21.1</td><td><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> <a data-footnote-ref href="#user-content-fn-6"><strong>Unsupported</strong></a></td><td>Official support removed as of Nexo 1.25+<br>Can be used on Nexo 1.24 &#x26; older</td></tr><tr><td>1.20.4, 1.20.6</td><td><span data-gb-custom-inline data-tag="emoji" data-code="26a0">⚠️</span> <a data-footnote-ref href="#user-content-fn-7"><strong>Unsupported</strong></a></td><td>Official support removed as of Nexo 1.13+<br>Can be used on Nexo 1.12 &#x26; older</td></tr><tr><td></td><td></td><td></td></tr><tr><td>1.20.5, 1.21, 1.21.2, 1.21.6, 1.21.7, 1.21.9</td><td><span data-gb-custom-inline data-tag="emoji" data-code="1f6d1">🛑</span> <a data-footnote-ref href="#user-content-fn-8"><strong>Unsupported</strong></a></td><td>These versions are labelled as "<strong>Unsupported"</strong> because they were quickly followed by a new release to fix bugs. There is no reason to use any of these versions in favor of the above-mentioned ones. Nexo might still work on these releases but in no way is it ideal to use</td></tr></tbody></table>

[^1]: Nexo 1.25+

[^2]: Nexo 1.22+

[^3]: Nexo 1.16+

[^4]: Nexo 1.13+

[^5]: Nexo 1.10+

[^6]: Official support removed as of Nexo 1.25+\
    Can be used on Nexo 1.24 & older

[^7]: Official support removed as of Nexo 1.13+\
    Can be used on Nexo 1.12 & older

[^8]: These versions are labelled as "**Unsupported"** because they were quickly followed by a new release to fix bugs. There is no reason to use any of these versions in favor of the above-mentioned ones.\
    \
    Nexo might still work on these releases but in no way is it ideal to use


# FAQ

A summary of the most common questions about Nexo

## 📦 ResourcePack

### Can I still use my own resourcepack with Nexo?

Yes, you can merge any resourcepacks into the ResourcePack generated by Nexo.\
You can do so by simply adding the .zip or folder to `Nexo/pack/external_packs`\
and the plugin will merge it into the final ResourcePack and send it to all players.\
Check out the [ResourcePack](/configuration/resourcepack) page for a detailed explanation

### NoteBlocks & Tripwires aren't working correctly?

Nexo uses NoteBlocks and TripWires for custom blocks, and thus disables all their vanilla behaviour.\
Noteblock-mechanic does have an option to re-enable this without losing custom blocks, if you go to Nexo/`mechanics.yml`\
If you do not care about Custom Blocks, you can also just disable the noteblock & stringblock-mechanics in `mechanics.yml`

***

## 🔧 Configuration

### How do I reference a ResourcePack file in a config?

Minecraft ResourcePacks follow a defined and consistent structure.\
ResourcePack files are also split into sub-categories; **sounds, textures, models, fonts, etc..**\
A full list of it can be found on the [Minecraft Wiki](https://minecraft.wiki/w/Resource_pack#Directory_structure), more info on ResourcePacks in [ResourcePack](/configuration/resourcepack)

The **namespace** is just another way to sort said sub-categories between different usecases.\
The **filepath** is the remaining path to your file itself

When you then want to make a reference to said file in say a NexoItem, this is how you do it;

{% code title="assets/nexo/textures/item/nexo\_defaults/forest\_axe.png" %}

```yaml
myitem:
  Pack:
    # assets/minecraft/models/item/paper.json
    model: minecraft:item/paper.json
    # assets/nexo/textures/item/nexo_defaults/forest_axe.png
    texture: nexo:item/nexo_defaults/forest_axe
```

{% endcode %}

Here is an example to reference a given PNG Texture **or** a JSON Model.\
This is the exact same for sounds, fonts etc. Only difference is the immediate folder after the namespace is not textures

**ItemModels:**\
assets/**NAMESPACE**/items/**PATH/FILE**.json -> `item_model: NAMESPACE:PATH/FILE`

**Models:**\
assets/**NAMESPACE**/models/**PATH/FILE**.json `model: NAMESPACE:PATH/FILE`

**Textures:**\
assets/**NAMESPACE**/textures/**PATH/FILE**.png `texture: NAMESPACE:PATH/FILE`

**Sounds:**\
assets/**NAMESPACE**/sounds/**PATH/FILE**.ogg `sound: NAMESPACE:PATH/FILE`

If your file is inside `assets/minecraft/...` , meaning your namespace is **minecraft**, specifying it in a config is optional. If no namespace is defined, it will assume you mean **minecraft**

### Why can't I hear Stone/Wood sounds?

Nexo replaces these sounds with empty ones in order to correctly play Custom Block sounds.\
Nexo will however, play a clone of the vanilla sound whenever the sound would normally play.\
Majority of the time when you cannot hear these sounds, is when you have a ResourcePack sent by Nexo, but you are on a server without Nexo. Like a Velocity/Bungee network where Server A has Nexo, but Server B does not.

The fastest fix is to disable `custom_block_sounds` in `mechanics.yml` for CustomBlock & Furniture.

### What is a Duration & how do I use it?

A duration is a dynamic way to specify time in a variety of ways.\
Normally plugins require you to specify in ticks or seconds only.\
Nexo allows you to more easily define a length of time with a Duration Format.\
An example is [Sounds](/configuration/sounds) which has a `duration` inside `jukebox_playable` to set the sound-length.\
The format for duration is a value + a suffix stamp for the DurationUnit. Some DurationUnits support non-integer values and will automatically format this into the correct values.

`duration: 20t` - 20 ticks\
`duration: 20ms` - 20 milliseconds\
`duration: 20.2s` - 20 seconds & 40 ticks\
`duration: 20.1m` - 20 minutes and 6 seconds\
You also have <mark style="color:yellow;">h</mark>ours, <mark style="color:yellow;">d</mark>ays, <mark style="color:yellow;">w</mark>eeks & <mark style="color:yellow;">mo</mark>nths


# ItemModels vs. CustomModelData

### What is an ItemModel?

In 1.21.4, Mojang added a feature to specify the ItemModel of an item.\
In short an ItemModel is the **base model** of an item, which decides when to show what.\
\
ResourcePacks can be split into a few different types of files:\
ItemModels - Tells the client when to show what for an item\
Models - All the visual data of an item, cubes, uv-mappings etc\
Textures - The textures used by Models and other files

An ItemModel in short just says "when X condition is satisfied, show this Model to the player"\
By default an item using PAPER as its material will use the vanilla ItemModel **minecraft:paper**\
When an item uses CustomModelData it then adds a custom entry into this vanilla ItemModel that says;\
"When an item with this ItemModel has the CustomModelData X, show this Model".

This is the ways custom items have been done ever since it was introduced, as there was no better way.\
It works fine in most cases but can cause some issues and conflicts when merging a lot of files together.

Now we can change the base ItemModel itself, and not rely on overriding the vanilla one.\
For servers which only support 1.21.4+ clients, this is the ideal way to handle it.\
It will cause no conflicts, open up for more customizability and stability, and is the intended way to do custom models.

### How do I start using custom ItemModels?

Nexo makes the process of swapping away from CustomModelData to ItemModels very easy.\
1\. Ensure you take a backup of your `Nexo/items` - folder\
2\. Go into `Nexo/settings.yml` and set `Pack.generation.prefer_item_models: true`\
3\. Go into your server and run the command `/nexo reset_custom_model_data`\
4\. Run the command `/nexo reload`

And that is it, your NexoItems should now all be swapped to their own custom ItemModel\\

```yaml
myitem:
  Pack:
    model: mymodel
  Components:
    item_model: nexo:mymodel
```

This ItemModel can be used on any item with any material in any plugin (that supports ItemModels) and will never conflict. Nexo will by default not set `Components.item_model` in the config. It will by default use `nexo:item_id` but you can set it to something else manually if you want to.

### When should I not use a custom ItemModel?

The only real time you should not use a custom ItemModel over CustomModelData is if your server tries to support clients older than 1.21.4. There is also some downsides when you have plugins which are still to allow such new features, and rely exclusively on CustomModelData for its features


# Video Tutorials

Nexo itself only has written documentation in the form of this wiki.\
There is however a community made set of videos, primarily by *Turretedash7,* for a large numbers of the features found in Nexo.

You can find a playlist for all the videos [here](https://www.youtube.com/playlist?list=PLDQSwTgJzz5SG3UUNVXpI5H0kp0s9KL-q)

{% hint style="info" %}
**These tutorials are community made so information in them might be outdated.**

As Nexo updates frequently. some things might be different, removed or added after the publication of a specific video-guide, so recommend checking the relevant wiki-page if you encounter issues

It is recommended to use them as a starting guide until you get to know Nexo.\
Especially if you find written guides harder to follow to begin with.
{% endhint %}

{% embed url="<https://www.youtube.com/playlist?list=PLDQSwTgJzz5SG3UUNVXpI5H0kp0s9KL-q>" %}


# Commands

A simple explanation to use the plugin commands

## 📋 Getting Started

All the nexo-commands can be found under `/nexo` or it's aliases `/n` `/nx`

## 🎁 Getting/Removing items

### 📦 Nexo Inventory

The main benefit of this method is that it allows you to see all the items at the same time in categories based on your `Nexo/items/filename.yml`\
You can grab copies of items here but cannot give it to other players.

#### Usage: `/nexo inventory` or `/nexo inv`

#### Permission: `nexo.command.inventory`

### 🎯 Give Item

This command will be mainly useful if you want to give an item to another player or when you want to automate the give

#### Usage: `/nexo give <item> [amount] [player]`

#### Permission: `nexo.command.give`

### 🫳 Drop Item

This command will be useful if you want to drop an item to another player

#### Usage: `/nexo drop <item> [amount] [player]`

#### Permission: `nexo.command.drop`

### 🫴 Take Item

This command will be useful if you want to remove an item from a player

#### Usage: `/nexo take <item> [player]`

#### Permission: `nexo.command.take`

### :printer: Dump Item

This command is useful for debugging a NexoItem or held item to find the Data & Components on it

#### Usage: `/nexo dumpitem <itemid>`

#### Permission: `nexo.command.dumpitem`

***

## 🎨 Dyeing Items

This command allows you to dye the item in your hand, whether it's a dyeable Nexo item or just a normal dyeable item.

#### Usage: `/nexo dye <color>`

{% hint style="info" %}
`color` can be dye names (red, green), rgb (`0,255,0` for pure green), or hex (`0xFF0000` or `#00FFFF`)
{% endhint %}

#### Permission: `nexo.command.dye`

***

## 🔧 Recipe Commands

This command allows you to add new recipes to the configuration directly from the game using recipes builder. For more information on how to use it, see [Recipes](/general-usage/recipes).

#### Usage:

```yaml
/nexo recipe builder <type>    # Start building a new recipe
/nexo recipe save <name>       # Save your recipe
/nexo recipe show all          # See all your recipes
/nexo recipe show <recipe>     # Check a specific recipe
```

#### Permission: `nexo.command.recipes`

***

## 📩 Manual Pack Sending

This command allows you to send the pack to a group of players.\
Useful if the automatic sending failed or for testing

#### Usage: `/nexo pack <player>`

#### Permission: `nexo.command.pack`

***

## ⬆️ Updating Items and Furnitures

This command allows you to update furnitures and items.\
Useful if the auto update failed or if you disabled it in settings

#### Usage:

```yaml
/nexo update furniture <radius>   # Update furniture in a radius
/nexo update item <player>        # Update the Nexo items in a players inventory
```

#### Permission: `nexo.command.update`

***

## 🔍 Item Info

This command allows you to print general info about a Nexo Item for debugging.\
An example of the output:

```yaml
ItemID: my_cool_item                 # this is the ID of the item
CustomModelData: 1000                # the custommodeldata of the item
Material: PAPER                      # the material used for the item
Model Name: minecraft:my_cool_item   # the name of the model, in the final pack you can find this in minecraft/models/my_cool_item.json
```

#### Usage: `/nexo iteminfo <itemid>`

#### Permission: `nexo.command.iteminfo`

## 🔍 Glyph Info

This command allows you to print general info about a Nexo Glyph for debugging.\
An example of the output:

```yaml
GlyphID: required                          # this is the ID of the glyph
Texture: minecraft:required/exit_icon.png  # the texture path of the glyph
Font: minecraft:default                    # the font that the glyph uses
Unicode: ꐏ                                 # the character used for displaying the glyph (you should use <glyph:id>)
```

#### Usage: `/nexo glyphinfo <glyphid>`

#### Permission: `nexo.command.glyphinfo`

## 🟩 Block Info

This command allows you to print general info about a Nexo Block for debugging.\
An example of the output for a noteblock:

```yaml
ItemID: my_cool_block  # this is the ID of the item that the block is tied to
Intrument: PIANO       # this is the instrument the noteblock uses
Note: 1                # the note
Powered: false         # the powered state
```

this is different for other block types

#### Usage: `/nexo blockinfo <iteminfo>`

#### Permission: `nexo.command.blockinfo`

***

## 🙂 Emoji List

This command opens a book with all the emojis (glyphs with `is_emoji: true`).

#### Usage: `/nexo emojis`

#### Permission: `nexo.command.emojis`

***

## 🔄 Reload

This command allows you to reload Nexo configurations.\
Reloading items updates any changes you might have made, and updates all old copies players might have.\
Reloading pack regenerates the resourcepack, and if `Pack.dispatch.send_on_reload` is enabled in `settings.yml`, will be dispatched to all players.

#### Usage

```yaml
/nexo reload           # Refresh everything - items, recipes, and pack
/nexo reload items     # Just update items
/nexo reload pack      # Rebuild and resend the resource pack
/nexo reload recipes   # Reload recipe configurations
/nexo reload configs   # Reload configs
/nexo reload dialogs   # Reload Dialog configs (new dialogs require a restart)
```

#### Permission: `nexo.command.reload`

***

## 🐛 Debug Mode

This command just toggles the debug-state of Nexo.\
In case you run into a bug or an error, you might be asked to toggle this to provide support with a more full error-log of the bug.

#### Usage: `/nexo debug`

#### Permissions: `nexo.command.debug`

***

## ℹ️ Nexo Version

This command simply shows you the version of Nexo.\
If using devbuilds, we might ask you to give us the full jar-file name.

#### Usage: `/nexo version`

#### Permissions: `nexo.command.version`

***

## ❌ Reset Custom Model data

This command deletes the custom\_model\_data from all of your Nexo Items.\
Mainly useful for swapping Nexo to a "ItemModel" based system for 1.21.4+ servers.\
You can get more info about the difference between ItemModels and CustomModelDatas, and why ItemModels are the recommended choice at [ItemModels vs. CustomModelData](/general-usage/faq/itemmodels-vs.-custommodeldata)

#### Usage: `/nexo reset_custom_model_data`

#### Permissions: `nexo.command.resetcmd`


# Recipes

Recipes can be created directly in the relevant file within the `Nexo/recipes` directory, or through the ingame RecipeBuilder.\
The RecipeBuilder can be accessed with the command `/nexo recipes builder`.\
Drag your desired items into the crafting slots to create your recipe. Make sure to set the "output" slot to the item you want to give.

Each Recipe-type has its own folder in `plugins/Nexo/recipes`, meaning you can organize recipes inside each folder into different files, sub-folders, etc.\
The RecipeBuilder will store recipes inside `plugins/Nexo/recipes/X/X_recipes.yml`, X being the type (shaped, shapeless, etc.)

### Available Recipe Types:

* SHAPELESS - Allows each ingredient to be put in any slot
* SHAPED - Requires ingredients to be in a specific shape
* FURNACE - Recipe for the Furnaces
* BLASTING - Recipe for the Blast Furnace
* SMOKING - Recipe for the Smoker
* STONECUTTING - Recipe for the Stone Cutter
* BREWING - Recipe for the Brewing Stand
* SMITHING - Recipe for the Smithing Table - This is added via [NexoAddon](https://nexoaddon.gitbook.io/docs/recipes/smithing-recipe)

### Disabling Recipes

There is also a new file for disabling recipes in `Nexo/recipes/disabled_recipes.yml` .\
In this file, simply add the Recipe-Key, `minecraft:vanilla_recipe` , and Nexo will disable it.

## Recipe-Type Examples:

### Shapeless

`amount` in result specifies how many of said item you should get. It is not available for ingredients.

```yaml
grass_block_shapeless:
  result:
    minecraft_type: GRASS_BLOCK
    amount: 2
  ingredients:
    A:
      minecraft_type: MOSS_CARPET
    B:
      minecraft_type: DIRT
    C:
      minecraft_type: DIRT
```

<div align="left"><figure><img src="/files/m3ChaaXNtCu468i8SFZf" alt=""><figcaption></figcaption></figure></div>

***

### Shaped

You can also use Minecraft tags and Nexo items in recipes

```yaml
forest_axe:
  result:
    nexo_item: forest_axe
  ingredients:
    A:
      tag: minecraft:leaves
    B:
      minecraft_type: STICK
  shape:
  - _AA
  - _BA
  - _B_

```

<div align="left"><figure><img src="/files/cgBKg4o5c7jHT62rwVxr" alt=""><figcaption></figcaption></figure></div>

***

### Furnace + Blasting + Smoking

```yaml
raw_iron_block_to_iron:
  result:
    minecraft_type: IRON_INGOT
    amount: 9
  input:
    minecraft_type: RAW_IRON_BLOCK
  cookingTime: 100
  experience: 20
```

<div align="left"><figure><img src="/files/s8C0L356IAQPOKoX2wbI" alt=""><figcaption></figcaption></figure></div>

***

### Stonecutting

```yaml
stripped_spruce_log:
  result:
    minecraft_type: STRIPPED_SPRUCE_LOG
  input:
    minecraft_type: SPRUCE_LOG
```

<div align="left"><figure><img src="/files/3qjaz9Gr92X6HZIiSbex" alt=""><figcaption></figcaption></figure></div>

***

### Brewing

```yaml
diamond:
  result:
    minecraft_type: DIAMOND
  input:
    minecraft_type: GLASS_BOTTLE
  ingredient:
    nexo_item: rainbow_ingot
```

<div align="left"><figure><img src="/files/enaG4fKiJS5DnDGl3eji" alt=""><figcaption></figcaption></figure></div>


# Oraxen → Nexo

This article explains how to migrate your Oraxen config to Nexo.\
The process will be mostly automatic, but first follow the steps below.\\

{% stepper %}
{% step %}
**Put Nexo JAR in your server's `plugins` folder**
{% endstep %}

{% step %}
**Copy the contents of `plugins/Oraxen` into `plugins/Nexo/converter/Oraxen`**

The `plugins/Nexo/converter/Oraxen` folder does not exist by default, so create the required folders yourself.\
Also make sure to keep the folder `plugins/Oraxen`, as this will be used later for the conversion process.\
On server reload, Nexo will empty the data from the `plugins/Nexo/converter/Oraxen` folder into a valid Nexo config and remove the folder.\
This step may be repeated for as many Oraxen packs as you would like to add, even at a future date.
{% endstep %}

{% step %}
**Take a backup**

It is recommended to make a backup of your server's world folders before swapping to Nexo, as there might be small oversights leading to minor loss of furniture/custom blocks.\\
{% endstep %}

{% step %}
**Remove Oraxen .jar file**

Make sure to only delete the jar files - keep the folder `plugins/Oraxen`.\\
{% endstep %}

{% step %}
**Start your server**
{% endstep %}

{% step %}
**Check console for conversion issues. And finally, test that the migration has worked by testing items, glyphs, and anything else that may be on your server!**
{% endstep %}
{% endstepper %}

### Resource Packs

There are small changes in how ResourcePacks work between Oraxen and Nexo.\
The main change is that Nexo does not have shortcut folders for `pack/models` etc.\
Instead, Nexo follows the file structure used in vanilla Minecraft resource packs.\
For example, instead of using `pack/models`, Nexo uses `pack/assets/minecraft/models` (etc.)\
This system allows for the easier importing of vanilla Minecraft resource packs.\
You may add any resource pack .zip or ResourcePack-folder (MyPack/assets/...) to `pack/external_packs` and it will be included in the final pack.

### Items

When a player joins, any Oraxen items in their inventory will be converted to Nexo items.\
These will also be scanned and converted where there have been changes to the config, most notably in how NoteBlock, StringBlock and Furniture-Mechanics are defined.

### Furniture

Placed Oraxen furniture will be automatically converted to Nexo furniture when they load.\
There might be some issues with item frame furniture due to Nexo only supporting ItemDisplay furniture.\
These can be manually replaced, although an automatic conversion feature may be added in a future Nexo update.\
\
Main config changes here are with how seats, lights, and [hitboxes](/mechanics/furniture-mechanic/hitbox) are defined.\
Nexo allows for multiple interaction hitboxes, seats, and lights. Read [Furniture Mechanic](/mechanics/furniture-mechanic) for more info.

### Custom Blocks

Custom blocks will be converted to Nexo, however there is a difference in the custom-variation calculation between Oraxen and Nexo. When importing OraxenItems, Nexo will correct this custom-variation.\
Example: `custom_variation: 1` -> `custom_variation: 51`\
There are also some minor changes in how these mechanics are defined.\
Examples can be found at [NoteBlock Mechanic](/mechanics/custom-block-mechanics/noteblock-mechanic) and [StringBlock Mechanic](/mechanics/custom-block-mechanics/stringblock-mechanic).\
\
\
**If there are any issues in the conversion process, let the developers know!**


# ItemsAdder → Nexo

This article explains how to migrate your ItemsAdder config to Nexo.\
The process will be mostly automatic, but first follow the steps below.

{% hint style="danger" %}
This page covers migrating to Nexo from ItemsAdder v4.\
If you are on ItemsAdder v3.x, you must update ItemsAdder before migrating to Nexo.
{% endhint %}

{% stepper %}
{% step %}
**Put Nexo JAR in your server's `plugins` folder**
{% endstep %}

{% step %}
**Copy the contents of `plugins/ItemsAdder` into `plugins/Nexo/converter/ItemsAdder`**

The `plugins/Nexo/converter/ItemsAdder` folder does not exist by default, so create the required folders yourself.\
Also make sure to keep the folder `plugins/ItemsAdder`, as this will be used later for the conversion process.\
On server reload, Nexo will empty the data from the `plugins/Nexo/converter/ItemsAdder` folder into a valid Nexo config and remove the folder.\
This step may be repeated for as many ItemsAdder packs as you would like to add, even at a future date.
{% endstep %}

{% step %}
**Take a backup**

It is recommended to make a backup of your server's world folders before swapping to Nexo, as there might be small oversights leading to minor loss of furniture/custom blocks.\\
{% endstep %}

{% step %}
**Remove ItemsAdder and LoneLibs .jar files**

Make sure to only delete the jar files - keep the folder `plugins/ItemsAdder`.\\
{% endstep %}

{% step %}
**Start your server**
{% endstep %}

{% step %}
**Check console for conversion issues. And finally, test that the migration has worked by testing items, glyphs, and anything else that may be on your server!**
{% endstep %}
{% endstepper %}

<mark style="color:red;">ResourcePack</mark> content from ItemsAdder is all bundled into `Nexo/pack/external_packs/ItemsAdder/namespace/...`\ <mark style="color:green;">Items</mark> are moved into `Nexo/items/itemsadder/...`\ <mark style="color:yellow;">Glyphs/Font</mark> Images are moved in `Nexo/glyphs/itemsadder/namespace/...`

### <mark style="color:yellow;">Known issues</mark>

Nexo won't be able to migrate everything, as some features are not compatible across both plugins.\
For example, non-Display Entity furniture placed in your world before conversion will NOT be automatically converted.\\


# Plugin settings

Various options impacting the plugin in its generality

## Item configurations

Nexo configuration is mainly divided into 3, items, resourcepack & glyphs.\
These folders contain the majority of custom configurations you need.

## Formatting

Nexo has some settings for toggling its handling of various packets. Most of these are for transforming Glyph-Tags in packets that handle text or Items.\
Some of these can in some cases cause desync or other issues for some servers.\
These can be toggled of in such cases without much downside.

## ResourcePack

### Obfuscation

Obfuscation works by renaming all models, textures and files into random namespaces and paths\
This is to make it very hard for someone to just download and use your pack outside of your server.\
It comes with three modes, SIMPLE, FULL & NONE\
\
There is also an option to cache the obfuscated pack.\
This makes it so unless there are changes, Nexo will not reobfuscate the ResourcePack.\
This makes it so players do not have to redownload the ResourcePack every time your server starts.\\

```yaml
Pack:
  obfuscation:
    type: FULL
    cache: true
```

**NONE** does no obfuscation on the ResourcePack

```makefile
📁ResourcePack
└── 📁assets
    └── 📁custom_namespace
        └── 📁models
             └── 📑custom_model.json
```

**SIMPLE** only obfuscates individual filenames, but retains the original pack-structure

```makefile
📁ResourcePack
└── 📁assets
    └── 📁custom_namespace
        └── 📑02a61ae4-2457-4dfa-91af-9598cd52fd9e.json
```

**FULL** obfuscates the entire path

```
📁ResourcePack
└── 📁assets
    └── 📁0d003f53-e176-4e74-a895-d392c82f50be
        └── 📁models
             └── 📑02a61ae4-2457-4dfa-91af-9598cd52fd9e.json
```

### PackServer

The ResourcePack Nexo generates needs to be hosted somewhere before it can be sent to players.\
Nexo has two built-in server-options, POLYMATH & SELFHOST

**POLYMATH** is Nexo's own remote server\
It is located in Germany and can therefore be slower depending on your server's location and players download speed\
\
SELFHOST is a locally hosted server on the machine and can therefore be faster if your players are closer to it. You will need to manually configure the IP-address to your servers.

```yaml
Pack:
  server:
    type: SELFHOST
      selfhost:
        public_address: 0.0.0.0   # Set to your server's IP
        port: 8082                # Set to a port you have opened on your server
      polymath:
        server: atlas.mineinabyss.com
        secret: mineinabyss
```

### Dispatch

This section is for handling when the pack should be sent to players.

```yaml
Pack:
  dispatch:
    # Sends the Resourcepack before the players loads into the server
    # Might cause issues with large packs due to long download/load times
    send_pre_join: true
    send_on_join: false
    send_on_reload: true    # Sends the pack to players after using reload-command
    delay: -1               # Delay before pack is sent, does not apply to PreJoin dispatches
    mandatory: true         # If declining the ResourcePack should kick the player
    prompt: "<#fa4943>Accept the pack to enjoy a full <b><gradient:#9055FF:#13E2DA>Nexo</b><#fa4943>experience"
```

## Misc

### Hiding Scoreboard & Tablist

This option lets you hide the red scoreboard numbers.

```yaml
hide_scoreboard_numbers: true
hide_scoreboard_background: true
```

{% hint style="danger" %}
This might not work for 1.21.8+ servers due to changes in core shaders by Mojang
{% endhint %}

## Nexo Inventory

Nexo has a `inventory.yml` which can be configured to tweak how the NexoInventory works.\
It lets you change between two types for sorting the inventory, FILE & DIRECTORY.\
FILE is the default and organized everything into one main-page where each item-config file is shown on the main menu.\
DIRECTORY organizes the menu into subpages, following the structure you have inside `plugins/Nexo/items`

You can also specify the menu\_layout to tweak the individual buttons irrespective of the type above.\
This lets you set the slot a button is in, the icon/item to display with it and the title of the sub-page it opens. By default Nexo sorts slots by a-z of filenames & icon defaults to the first item in the config.\
You specify it like below, with it referencing the path to the item. The path depends on if you use FILE or DIRECTORY.\
If using FILE, the path is just the `filename`. If using DIRECTORY it is the entire path `folder.filename`

```yaml
nexo_inventory:
  menu_title: <shift:-37><glyph:menu_items_search>
  search_title: <shift:256>NexoInventory Search<shift:256>
  style_default_names: true
  type: FILE
  menu_rows: 6
  menu_layout:
    my_item:
      slot: 1
      icon: itemid
      title: <main_menu_title>ItemID
```

The NexoInventory also has some other features & buttons which can be customized like below.\
This can reference a NexoItem or an ItemModel directly from the ResourcePack

```yaml
next_page_icon: next_page_icon
previous_page_icon: previous_page_icon
exit_icon: cancel_icon
search_icon: nexo:search_icon
directory_icon: nexo:directory_icon
```


# ResourcePack

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-file in a config-file [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

***

## 🗂️ ResourcePack-Structure

The ResourcePack in Nexo follows the vanilla structure but also letting you import and automatically merge full ResourcePacks\
This is in an effort to make importing third-party ResourcePacks a lot easier.\
Below is an example of the new structure.

{% code title="" %}

```
📁Nexo
└── 📁pack
    └── 📁assets
    │    ├── 📁minecraft
    │    │    ├── 📁models
    │    │    │    ├── 📁item
    │    │    │    │    └── 📑paper.json
    │    │    │    └── 📑custom_model.json
    │    │    └── 📁textures
    │    │         └── 🖼️something.png
    │    └── 📁custom_namespace
    │        └── 📁models
    │            └── 📑custom.json
    │  
    └── 📁external_packs
        ├── 📁DefaultPack.zip
        ├── 📁custom_resourcepack.zip
        └── 📁custom_resourcepack2
            └── 📁assets
                └── 📁custom_namespace2
```

{% endcode %}

Goal is to let users merge resourcepacks in via either ZIPs or directories, outside of the normal assets folder.\
This would dynamically merge in any conflicting files, like a paper.json or sounds.json, instead of migrating it to Nexo-configs to be generated.\
Meaning that pack-import instructions on your end now boils down to:\
Put `my_pack.zip` inside `Nexo/pack/external_packs`

***

## 🎭 Obfuscation

Nexo has a built-in way to "obfuscate" the content of your resource-pack.\
This is done by randomizing all file-names in an attempt to make it very hard and annoying to try and take stuff from it for pirates.\
It comes with three modes, `NONE`, `SIMPLE`, `FULL`\
\
**NONE** - Self-explanatory, does not obfuscate pack in any way\
**SIMPLE** - Obfuscates filenames only\
`namespace:model/path.json` -> `namespace:bba2d60b-8e3e-4051-9734-fef92766777f`\
**FULL** - Obfuscates namespace & filename;\
`namespace:model/path.json` -> `c491303e-ba1e-4037-a59d-62b5fdfb6bb8:bba2d60b-8e3e-4051-9734-fef92766777f`

***

## 📦 PackSquash-Integration

Nexo allows you to run PackSquash on the resourcepack without manually reuploading the pack.\
Simply download the latest [PackSquash](https://github.com/ComunidadAylas/PackSquash/releases) build and drop it in `plugins/Nexo/pack/packsquash` .\
Then drop your **packsquash.toml** in the same directory, an example can be found [here](https://gist.github.com/Boy0000/92149d2704b6086473fccb4d771c42b4).\
If you want it in another location, you can specify a path for the binary & settings

```yaml
Pack:
 generation:
    packsquash:
      enabled: true
      executable_path: plugins/Nexo/pack/packsquash/packsquash
      settings_path: plugins/Nexo/pack/packsquash/packsquash.toml
```

To enable Nexo's PackSquash-integration simply enable `Pack.generation.packsquash.enabled` in settings.yml. Then when the pack generates, it will start the PackSquash process. If it suceeds you should see somehting like the below.

<figure><img src="/files/2W3wmcvlakpp87xQixcv" alt=""><figcaption><p>Example of successful PackSquash process</p></figcaption></figure>

If it failed you should see some detailed info about which file and a reason for it.\
If Nexo's debug-mode is enabled, it will output info about all successful files aswell

{% hint style="info" %}
Depending on your TOML-configuration & ResourcePack size & complexity, the PackSquash process might take some time. Nexo will cache the output so that if the ResourcePack does not change, the PackSquash process will not need to be ran again
{% endhint %}

***

## 🌐 PackServer

Nexo supports several ways to upload & dispatch the ResourcePack it generates.\
Set the type via `Pack.server.type` in `settings.yml`.

### NONE

Does not send any ResourcePack to players. Use this on backend servers that should not dispatch a pack.

### POLYMATH

A dedicated upload server hosted by the Nexo team (Germany). The pack is uploaded and served automatically.

```yaml
Pack:
  server:
    type: POLYMATH
    polymath:
      server: atlas.nexomc.com
      secret: nexomc
```

### SELFHOST

Hosts the ResourcePack directly from your server machine. Requires an open port and a reachable public address.

```yaml
Pack:
  server:
    type: SELFHOST
    selfhost:
      port: 8082
      public_address: "http://your.ip.or.domain"
      dispatch_threads: 10
```

### LOBFILE

Uploads the pack to [LobFile](https://lobfile.com/). Requires an API key.

```yaml
Pack:
  server:
    type: LOBFILE
    lobfile:
      api_key: YOUR-API-KEY
```

### S3

Uploads the pack to any S3-compatible object storage (AWS S3, Cloudflare R2, Hetzner Object Storage, etc.).

```yaml
Pack:
  server:
    type: S3
    s3:
      public_url: "https://fsn1.your-objectstorage.com"
      endpoint_url: "https://fsn1.your-objectstorage.com"
      region: eu-central-1
      bucket: nexo-storage
      access_key: ACCESS
      secret_key: SECRET
      url_expiration: 7d
      path_style: false
      chunked_encoding: true
```

### Custom PackServer

The `NexoPackServer` interface can be implemented by third-party plugins and registered via `PackServerRegistry`, allowing you to add your own upload/dispatch logic.

***

## 🔗 Cross-Server/Proxy ResourcePacks

For Velocity proxy networks, use [NexoProxy](/addons/nexo-proxy) — a Velocity plugin that blocks duplicate ResourcePack sends when players switch between backend servers.

***

## 📥 Importing

Nexo lets you import Third-Party ResourcePacks in several ways.\
The recommended one is shown above, by adding a directory or .zip to `plugins/Nexo/pack/external\_packs`\
There is also `Plugin.import.from_location` in settings.yml, letting you specify a directory/zip relative to your plugins folder\
There is also `Plugin.import.from_url` in settings.yml, letting you specify any url that Nexo will download a directory/zip from and include


# MultiPack Feature

The Multipack feature allows for sending additional ResourcePacks to players with the base-pack.\
Each pack is defined as a **template**, which can be required, optional, or enabled by default.\
Players can toggle optional templates on/off, and Nexo re-sends the appropriate packs automatically.

## How it works

* Templates are standalone resource packs stored in `plugins/Nexo/pack/template_packs/` (or at a custom path).
* On startup/reload, each template is read, built, and hosted alongside the main pack.
* When a player joins, they receive the main Nexo pack plus any template packs that are enabled for them (required ones + their personal selections).
* Templates can declare conflicts with each other, meaning enabling one automatically disables the conflicting template(s).

***

## Configuration

All multipack configuration lives in `plugins/Nexo/multipack.yml`.\
Templates are defined under the `templates:` key, and the optional GUI menu under `menu:`.

```yaml
templates:
  my_template:
    required: false       # Always sent to all players, cannot be toggled
    default: true         # Enabled by default for new players
    conflicts_with:       # Disables these templates when this one is enabled
      - other_template
    path: ""              # Optional: custom path to the pack folder or zip
                          # Defaults to plugins/Nexo/pack/template_packs/<id>
  other_template:
    required: false
    default: false
    conflicts_with: my_template  # Can also be a single string

menu:
  # See the GUI / Menu section below
```

### Template options

<table><thead><tr><th width="148">Option</th><th width="117">Type</th><th width="108">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>required</code></td><td>boolean</td><td><code>false</code></td><td>Always sent to every player; cannot be toggled off</td></tr><tr><td><code>default</code></td><td>boolean</td><td><code>false</code></td><td>Enabled by default for players who have never toggled it</td></tr><tr><td><code>conflicts_with</code></td><td>string or list</td><td><code>[]</code></td><td>IDs of templates to disable when this one is enabled</td></tr><tr><td><code>path</code></td><td>string</td><td><code>""</code></td><td>Path to the pack. Accepts absolute paths, paths relative to <code>template_packs/</code>, or paths relative to the Nexo data folder. Defaults to <code>template_packs/&#x3C;id></code></td></tr></tbody></table>

## Pack folder structure

Place each template pack as a folder or zip inside `plugins/Nexo/pack/template_packs`.\
This follows the same logic as [ResourcePack](/configuration/resourcepack#resourcepack-structure)

If the pack has no `pack.mcmeta`, Nexo generates one based on the server's version.

***

## GUI / Menu

Nexo includes a built-in inventory GUI for players to browse and toggle their template selections without needing commands. The menu is configured under the `menu:` key in `multipack.yml`.

### Opening the menu

```
/nexo multipack
/nexo multipack menu
/nexo multipack menu <targets>
```

* Permission: `nexo.command.multipack.menu`
* Permission for opening for others: `nexo.command.multipack.menu.other`

Changes made inside the GUI are **batched**, meaning packs are only re-sent once when the inventory is closed, not on every click.

### Menu configuration

```yaml
menu:
  title: "<gold>My Resourcepack Menu"
  rows: 3          # 1–6

  slots:
    my_slot:
      offset: 5,2      # Column (x: 1–9) and row (y: 1–<rows>) of the top-left cell
      size: 1,1        # How many cells wide/tall this slot occupies (defaults to 1×1)
      # Only the top-left cell is interactive, remaining cells show an invisible copy
      all_slots_except_first_empty: false
      base_item:   # Fallback item shown when the action's state has no own item
        material: PAPER
        display_name: "<gray>My Pack"
      action:
        # See action types below
```

#### Slot options

<table><thead><tr><th width="220">Option</th><th width="100">Type</th><th width="100">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>offset.x</code> / <code>offset.y</code></td><td>integer</td><td><code>1</code></td><td>Column (1–9) and row (1–rows) of the top-left cell of the slot</td></tr><tr><td><code>size.x</code> / <code>size.y</code></td><td>integer</td><td><code>1</code></td><td>Width and height in cells. Useful for decorative multi-cell slots</td></tr><tr><td><code>all_slots_except_first_empty</code></td><td>boolean</td><td><code>false</code></td><td>When <code>true</code>, only the top-left cell is interactive; all others display an invisible placeholder that copies the base item's data components</td></tr><tr><td><code>base_item</code></td><td>item section</td><td>—</td><td>Fallback item used when a state has no own item defined. Required unless every action state defines its own item</td></tr><tr><td><code>action</code></td><td>section</td><td>—</td><td>Defines what happens when the slot is clicked (see below)</td></tr></tbody></table>

***

### Action types

#### TOGGLE

Displays one of two items depending on whether the target template is currently enabled, and flips it on click.

```yaml
action:
  type: TOGGLE
  target: my_template   # Template ID to toggle

  enabled_item:         # Item shown when the template is ON
    material: LIME_DYE
    display_name: "<green>Music Pack <gray>| <green>Enabled"

  disabled_item:        # Item shown when the template is OFF
    material: GRAY_DYE
    display_name: "<red>Music Pack <gray>| <red>Disabled"
```

`enabled_item` and `disabled_item` are merged on top of `base_item` if one is defined, so shared properties (e.g. lore) can be put in `base_item` and only the differences in each state item.

Required templates cannot be toggled — clicking their slot does nothing.

#### CYCLING

Cycles through a list of templates on each click, enabling exactly one at a time. Useful for mutually-exclusive choices like 2D vs 3D tools.

**Simple form** — template IDs only, inherits `base_item` for the display:

```yaml
action:
  type: CYCLING
  targets:
    - 2d_tools
    - 3d_tools
```

**Rich form** | each entry can carry its own item, merged on top of `base_item`:

```yaml
action:
  type: CYCLING
  targets:
    - id: 2d_tools
      material: PAPER
      itemname: "<aqua>2D Tools"
    - id: 3d_tools
      material: IRON_SWORD
      itemname: "<gold>3D Tools"
```

On click, the currently-enabled entry is disabled and the next one in the list is enabled (wrapping around). All other entries in the cycle are set to `false`.

***

### Item definition

Items in `base_item`, `enabled_item`, `disabled_item`, and cycling entries support three formats:

**Nexo item** | references an existing Nexo item by ID:

```yaml
base_item:
  nexo_item: my_item_id
```

**Item model** | An ItemModelBuilder, refer to [ItemModel Builder](/configuration/items/itemmodel-builder) for details. Can be used to create simple custom items without needing to set up a full Nexo item.

```yaml
base_item:
  item_model:
    type: "composite"
    models:
      - type: model
        model: "item/diamond_sword"
      - type: model
        model: "item/diamond"
```

**Inline item** | a standard Nexo `ItemParser` section (material, display\_name, lore, etc.):

```yaml
base_item:
  material: PAPER
  itemname: "<gray>My Pack"
  lore:
    - "<dark_gray>Click to toggle"
```

***

## Commands

MultiPack commands are under `/nexo multipack` and require the `nexo.command.multipack` permission.

### Open GUI

```
/nexo multipack
/nexo multipack menu
/nexo multipack menu <targets>
```

Opens the interactive template selection menu. If no `menu:` section is configured in `multipack.yml`, a warning is shown instead.

* Permission: `nexo.command.multipack.menu`
* Permission for targeting others: `nexo.command.multipack.menu.other`

### List templates

```
/nexo multipack list
```

Shows all configured templates and their current state (enabled/disabled) for the executing player.\
Required and default templates are labeled.

### Toggle a template

```
/nexo multipack toggle <template>
/nexo multipack toggle <template> <targets>
```

Toggles the given template on or off for the player (or targeted players).\
Re-applies packs immediately after toggling. Required templates cannot be toggled.

* Permission: `nexo.command.multipack.toggle`
* Permission for targeting others: `nexo.command.multipack.toggle.others`

### Debug

```
/nexo multipack debug
/nexo multipack debug <targets>
```

Prints detailed debug info: loaded templates, raw PDC selections, resolved enabled set, and per-template state flags.

* Permission: `nexo.command.multipack.debug`
* Permission for targeting others: `nexo.command.multipack.debug.others`

***

## Examples

### Toggling on/off a larger Music/SoundFX Pack | 2D/3D Tools

A common use case is offering players a choice to enable an addon for custom music, or swapping between 2D & 3D Tools

**`multipack.yml`:**

```yaml
templates:
  custom_music:
    required: false
    default: false
    path: "custom_music"
  2d_tools:
    required: false
    default: true
    conflicts_with: 3d_tools
  3d_tools:
    required: false
    default: false
    conflicts_with: 2d_tools
```

Players can switch between them in-game:

```
/nexo multipack list
/nexo multipack toggle custom_music
/nexo multipack toggle 3d_tools
```

Enabling `3d_tools` automatically disables `2d_tools` due to the conflict, and packs are re-sent immediately.

***

### Full GUI example

A 3-row menu with a music toggle and a 2D/3D cycling slot:

```yaml
templates:
  custom_music:
    required: false
    default: false
  2d_tools:
    required: false
    default: true
    conflicts_with: 3d_tools
  3d_tools:
    required: false
    default: false
    conflicts_with: 2d_tools

menu:
  title: "<gold>Resource Pack Options"
  rows: 3

  slots:
    music_toggle:
      offset:
        x: 3
        y: 2
      base_item:
        material: NOTE_BLOCK
        lore:
          - "<dark_gray>Click to toggle"
      action:
        type: TOGGLE
        target: custom_music
        enabled_item:
          itemname: "<green>Music Pack <gray>| <green>Enabled"
        disabled_item:
          itemname: "<red>Music Pack <gray>| <red>Disabled"

    tool_style:
      offset:
        x: 7
        y: 2
      base_item:
        material: STICK
        lore:
          - "<dark_gray>Click to switch style"
      action:
        type: CYCLING
        targets:
          - id: 2d_tools
            itemname: "<aqua>Tools <gray>| <aqua>2D"
          - id: 3d_tools
            itemname: "<gold>Tools <gray>| <gold>3D"
```


# Items

### Components

As of Minecraft 1.20.6, items now use what is called Components, or DataComponents, to specify specific features. This covers anything from consumable items, tool-properties and death protection.

You can see a complete list here: [Components](/configuration/items/components)

### ItemTemplate

This allows you to easily copy properties from a template-item onto other items.\
In the item you want to copy properties to, simply specify the ItemID\
It also supports a list of multiple items to merge several into one

```yml
template_item:
  itemname: Template Item
  material: DIAMOND

template_item1:
  template: template_item
  itemname: Template Item 1

template_item2:
  templates: 
    - template_item
    - template_item1
```

You can also use **Template Placeholder** to simplify configs even further\
\&#xNAN;**\<item\_id> -** Can be used to insert the ID of the item into the relevant part\
\&#xNAN;**\<item\_id\_capitalized> -** Insert the ID in a formatted format; `item_id` -> `Item Id`\
\&#xNAN;**\<lore> -** Insert the lore of the item at a point in the lore of the template

```yaml
item:
  template: template_item
another_item:
  template: template_item
  lore:
    - "some lore"
template_item:
  itemname: <item_id_capitalized>
  Components:
    item_model: nexo:<item_id>
  lore:
    - "template lore 1"
    - "<lore>"
    - "template lore 2"
```

### ItemModel Builder

This lets you generate an ItemModel for your NexoItem without needing to provide the ResourcePack file. You can directly reference all you need right in the config. More detailed info can be found at [https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/items/README.md#itemmodel-builder](https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/items/README.md#itemmodel-builder "mention")

### PersistentData

This lets you add custom data into the items PersistentDataContainer. These exist within the `PublicBukkitValues` of the item.\
Type is the type of data to add. Supported types can be found [here](https://jd.papermc.io/paper/26.1.2/org/bukkit/persistence/PersistentDataType.html#field-detail).\
Nexo also has some custom DataTypes which can be used, like UUID. These can be found [here](https://github.com/mfnalex/MorePersistentDataTypes#list-of-all-data-types)

```yaml
myitem:
  PersistentData:
    - type: STRING
      key: mynamespace:something
      value: "Hi this is a string"
```

There is also a CustomData [Components](/configuration/items/components) if setting things outside of the normal PublicBukkitValues-entry for the item is wanted

### Item Name

This allows you to change the name displayed of your item without interfering with renamed items.

```yaml
my_item:
  itemname: "<red><bold>Example"
```

### Material

This allows you to change the item type. Defaults to PAPER if unspecified.

```yaml
my_item:
  material: WOODEN_SWORD
```

### AttributeModifiers

This allows you to add minecraft attributes to your item. They are very powerful and allow you to make an item that adds hearts, increases the player's speed, etc.

{% tabs %}
{% tab title="1.21.6+" %}

```yaml
my_item:
  AttributeModifiers:
    - attribute: MOVEMENT_SPEED
      amount: 0.1 
      operation: ADD_NUMBER
      slot: MAINHAND
      display:
        type: override
        text: "Value: <red>0.1"
```

List of Attributes can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/attribute/Attribute.html)\
List of Operations can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/attribute/AttributeModifier.Operation.html)\
List of Slots can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/inventory/EquipmentSlotGroup.html)

The types of AttributeDisplay are; **default, hidden & override**\
Of these only **override** has an additional field, text, which is the new text to show
{% endtab %}

{% tab title="1.21.2+" %}

```yaml
my_item:
  AttributeModifiers:
    - attribute: MOVEMENT_SPEED
      amount: 0.1 
      operation: ADD_NUMBER
      slot: MAINHAND
```

List of Attributes can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/attribute/Attribute.html)\
List of Operations can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/attribute/AttributeModifier.Operation.html)\
List of Slots can be found [here](https://jd.papermc.io/paper/1.21.11/org/bukkit/inventory/EquipmentSlotGroup.html)
{% endtab %}

{% tab title="1.21.1" %}

```yaml
my_item:
  AttributeModifiers:
    # - attribute: Get the list here: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
    # - operations: 0 for ADD_NUMBER, 1 for ADD_SCALAR, 2 for MULTIPLY_SCALAR_1;
    # - slot: HAND, OFF_HAND, FEET, LEGS, CHEST or HEAD
    - attribute: MOVEMENT_SPEED
      amount: 0.1 
      operation: 0
      slot: HAND
```

{% endtab %}
{% endtabs %}

### Color

This allows you to change the color of an item made of a supported material (e.g. leather armor).

{% columns %}
{% column %}

```yaml
my_item:
  color: 3, 252, 136 #rgb
```

To change the color of your model, you need to set Tint property.\
How to set `Tint` property using BlockBench:

* Open the model in BlockBench
* Open Paint Tab
* Select face you want to change color
* Right click on the face and check `Tint` box
  {% endcolumn %}

{% column %}
![](/files/tRQXlufQgk21ATgxySx4)
{% endcolumn %}
{% endcolumns %}

### Lore

This allows you to add lines of text under the item name.

```yaml
my_item:
  lore:
  - "One line"
  - "<green>Another line"
```

### Disable Enchanting

This options allows you to prevent an item from being enchanted via anvils or enchantment tables.\
This does not prevent enchantments from being applied in the config.\\

```yaml
my_item:
  disable_enchanting: true
```

{% hint style="warning" %}
As of 1.21.2+ you should use Enchantable-Component (`Components.enchantable: 0`)
{% endhint %}

### excludeFromInventory

This option allows you to exclude an item from the nexo inventory. It will no longer be displayed but you can still get it using [nexo give command](/general-usage/commands#get-the-items). It is useful for items used in other plugins like inventory icons.

```yaml
my_item:  
  excludeFromInventory: true
```

### unbreakable

```yaml
my_item:
  unbreakable: true
```

### ItemFlags

{% hint style="warning" %}
As of 1.21.5+ this should be switched with `Components.tooltip_display` [https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/items/README.md#components](https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/items/README.md#components "mention")
{% endhint %}

This allows you to set ItemFlags to an item, get the list of available flags [here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html).

```yaml
my_item:
  ItemFlags:
    - HIDE_ENCHANTS
    - HIDE_ATTRIBUTES
    - HIDE_UNBREAKABLE
    - HIDE_DESTROYS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
```

### PotionEffects

{% hint style="warning" %}
This should be swapped with Consumable Component [Components](/configuration/items/components) for 1.21.4+
{% endhint %}

This allows you to add custom Potion Effects to your potion. Get the list of available effects [here](https://jd.papermc.io/paper/1.21.3/org/bukkit/potion/PotionEffectType.html).

```yaml
my_item:
  PotionEffects:
    # - type: Get the list here: https://jd.papermc.io/paper/1.21.3/org/bukkit/potion/PotionEffectType.html
    # - duration: duration of effect (2s, 3t, 4m)
    # - amplifier: potion effects level
    # - ambient: true/false, makes potion effect produce more, translucent, particles.
    # - particles: true/false, whether this effect has particles or not
    # - icon: true/false, whether this effect has an icon or not
    - type: WITHER
      duration: 10s
      amplifier: 2
      ambient: false
      particles: true
      icon: true
```

### Enchantments

If you want to enchant your item (even with non vanilla levels like for example sharpness 15), you can do it with this section. This should also support Enchantment Plugins that register enchantments as proper ones, using `namespace:key`

```yaml
my_item:
  Enchantments:
    protection: 4
    flame: 34
    sharpness: 18
```

### How do I set a specific CustomModelData?

```yaml
my_item:
  Pack:
    parent_model: "custom/items/generated_elite"
    texture: custom/items/elite_zombie_walk
    custom_model_data: 452
```

## Pack options

This part has a dedicated page, you can consult it [here](/configuration/items/item-appearance).

## Mechanics options

Mechanics are custom features in Nexo. You can find more under [https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/broken-reference/README.md](https://github.com/Nexo-MC/Nexo-Documentation/blob/master/configuration/items/broken-reference/README.md "mention") section


# ItemModel Builder

For starters, what is an ItemModel? ItemModels are the new way, as of 1.21.4+, to tell the client what to show and when, for an Item. For example show Model A when an item has CustomModelData 1 and another when it does not have any.

If you only support 1.21.4+, using custom ItemModels for all your NexoItems is the ideal way to prevent conflicts. You can read more about switching here: [ItemModels vs. CustomModelData](/general-usage/faq/itemmodels-vs.-custommodeldata)

Now how does this feature work and what can you do with it? More or less anything.\
Nexo already does this for a lot of individual properties defined in Pack.\
Like showing a different model when in GUI vs held in hand, when dyed and undyed, when throwing and not throwing a trident etc.

ItemModels are made up of different sub-types; Reference, Select, Condition, RangeDispatch, Composite, Empty & Special.\
Each of these serve a different purpose for different usecases\
For information about each type, recommend reading [Minecraft Wiki](https://minecraft.wiki/w/Items_model_definition).

### Basic Example

For a basic example I will show how normally CustomModelData would be used in the vanilla ItemModel.\
Say you have an item with the material PAPER & CustomModelData 123. Nexo would then add into the vanilla ItemModel of Paper a condition for when this property has this value.

{% code title="Vanilla Paper ItemModel" %}

```json
{
  "model": {
    "type": "minecraft:model",
    "model": "minecraft:item/paper
  }
}
```

{% endcode %}

{% code title="Paper ItemModel with condition for CustomModelData & fallback to vanilla ItemModel" %}

```json
{
  "model": {
    "type": "minecraft:range_dispatch",
    "property": "minecraft:custom_model_data",
    "entries": [
      {
        "threshold": 123,
        "model": {
          "type": "minecraft:model",
          "model": "namespace:key"
        }
      }
    ],
    "fallback": {
      "type": "minecraft:model",
      "model": "minecraft:paper"
    }
  }
}
```

{% endcode %}

In this scenario you would be overriding the vanilla ItemModel for Paper if a condition is met. This is the same logic as has been used since 1.16.

The new way to make custom items is making a unique ItemModel for each custom item, dodging the need for CustomModelData & overriding vanilla models. This ensures least amount of conflicts, as each ItemModel is unique. ( [ItemModels vs. CustomModelData](/general-usage/faq/itemmodels-vs.-custommodeldata) )

### How do I use this feature?

It is pretty straight forward. Below is a rough example of how to use it.\
Say you want to make an Item that shows a different Model for certain events or holidays.\
Like a plushie with a Christmas hat on in the month of December.

```yaml
plushie:
  itemname: Plushie
  material: PAPER
  ItemModel:
    ## Composite ItemModels stack Models ontop of eachother
    type: composite
    models:
      - type: model
        model: minecraft:plushie
      - type: select
        property: local_time
        pattern: MM ##Month 01-12
        cases:
          ## When the Month for the client is December, show Christmas Hat Model too
          - when: "12"
            model:
              type: model
              model: minecraft:christmas_hat
        ## When no case matches, fallback to showing nothing
        fallback:
          type: empty
    
```

<figure><img src="/files/pJf4JVsrissOcV1B7sRG" alt=""><figcaption><p>Same item for what it would look like in December &#x26; otherwise with no changes needed</p></figcaption></figure>


# Reference ItemModel

A **Reference,** *or Model,* **ItemModel** is the simplest form of ItemModel.\
All it does is reference the path to a Model[^1] file to use.

If we want to use this in an example here;

{% code title="NexoItem Example with pre-made Model file" %}

```yaml
myitem:
  ItemModel:
    type: model
    model: namespace:mymodel #References assest/namespace/models/mymodel.json
```

{% endcode %}

{% code title="NexoItem Example for a 2D NexoItem with just a Texture provided" %}

```yaml
myitem:
  Pack:
    texture: namespace:mytexture #References assest/namespace/textures/mytexture.png
  ItemModel:
    type: model
    model: myitem # When only a texture is provided, Nexo generates the Model for <itemid>
```

{% endcode %}

{% hint style="warning" %}
Should be noted that this example is not needed if you just want a basic Item like shown above.\
When using `prefer_item_models` ( [ItemModels vs. CustomModelData](/general-usage/faq/itemmodels-vs.-custommodeldata) ), this is done automatically.\
If normally relying on CustomModelData, you can also just set the ItemModel-Component<br>

```
myitem:
  Pack:
    texture: namespace:mytexture
  Components:
    item_model: namespace:myitem
```

{% endhint %}

[^1]: Models are what control the visual aspects of Items & Blocks. These files are found in `assets/<namespace>/models/...`


# RangeDispatch ItemModel

A **RangeDispatch ItemModel**, is a set of conditions based on a numerical property on the Item, that decided when to show what Model.\
This is what normally is used for CustomModelData as shown in [ItemModel Builder](/configuration/items/itemmodel-builder)-example.\
\
There are other ways to use this as it has several properties it can use for this condition.\
Recommend to check the [Minecraft Wiki](https://minecraft.wiki/w/Items_model_definition#range_dispatch) for an always up-to-date list.

Below is an example for showing a different Model based on the amount of the item it is.

```yaml
custom_diamond:
  ItemModel:
    type: range_dispatch
    property: count
    entries:
      - threshold: 1
        model:
          type: model
          #References assest/namespace/models/single_custom_diamond.json
          model: namespace:single_custom_diamond  
      - threshold: 2
        model:
          type: model
          model: namespace:double_custom_diamond
      # Since the next threshold is 10, it means the client will use the previous one
      # until it reaches the next threshold, which here is 10
      - threshold: 10
        model:
          type: model
          model: namespace:big_custom_diamond
    # A Fallback ItemModel in case none of the entries match
    fallback:
      type: model
      model: namespace:custom_diamond
```

{% hint style="info" %}
You can also chain these to use different ItemModel-types inside each threshold-entry here for very complex items
{% endhint %}


# Select ItemModel

A **Select ItemModel**, is a set of conditions based on a specific property on the Item, that decided when to show what Model.\
Vanilla makes use of this in Crossbows to show the firework & arrow when the bow is charged.\
\
There are other ways to use this as it has several properties it can use for this condition.\
Recommend to check the [Minecraft Wiki](https://minecraft.wiki/w/Items_model_definition#select) for an always up-to-date list.

Below is an example for showing a different Model if an item has been renamed by a player;

```yaml
custom_diamond:
  ItemModel:
    type: select
    property: component
    component: custom_name
    cases:
      - when: "Renamed Diamond"
        model:
          type: model
          #References assest/namespace/models/renamed_diamond.json
          model: namespace:renamed_diamond
      - when:  # When can also be a list of conditions here
          - "Diamond1"
          - "Diamond2"
        model:
          type: model
          model: namespace:multiple_diamonds
    # A Fallback ItemModel in case none of the cases match
    fallback:
      type: model
      model: namespace:custom_diamond
```

{% hint style="info" %}
You can also chain these to use different ItemModel-types inside each case here for very complex items
{% endhint %}


# Condition ItemModel

A **Condition ItemModel**, is a true/false statement to determine what to show the client.\
Vanilla makes use of this in Bows to show a different one when its being used/pulled and not.\
\
There are other ways to use this as it has several properties it can use for this condition.\
Recommend to check the [Minecraft Wiki](https://minecraft.wiki/w/Items_model_definition#condition) for an always up-to-date list.

Below is an example for showing a different Model if an item is broken vs when not;

```yaml
custom_sword:
  ItemModel:
    type: condition
    property: broken
    on_true:
      type: model
      model: namespace:custom_sword_broken
    on_false:
      type: model
      model: namespace:custom_sword
```

{% hint style="info" %}
You can also chain these to use different ItemModel-types inside the true/false ItemModels here for very complex items
{% endhint %}


# Composite ItemModel

A **Composite ItemModel**, is a list of ItemModels that should be layered over eachother.\
Recommend to check the [Minecraft Wiki](https://minecraft.wiki/w/Items_model_definition#composite) for an always up-to-date list.

Below is an example for showing an Item with a Model background

```yaml
custom_diamond:
  ItemModel:
    type: composite
    models:
      - type: model
        model: namespace:custom_diamond
      - type: model
        model: namespace:background
```

{% hint style="info" %}
You can also chain these to use different ItemModel-types inside each composite-entry here for very complex items
{% endhint %}


# Empty ItemModel

An **Empty ItemModel** just renders nothing.

Main use for this type is for conditional checks in other types, to render something or nothing.\
Below is an example which renders nothing in the GUI until you start using the item, but renders it normal in every other context

```yaml
custom_sword:
  ItemModel:
    type: select
    property: display_context
    cases:
      - when: "gui"
        model:
          type: condition
          property: using_item
          on_true:
            type: model
            model: namespace:custom_sword
          on_false:
            type: empty
    # A Fallback ItemModel so we dont need to define all the other display-contexts manually
    fallback:
      type: model
      model: namespace:custom_sword
```

{% hint style="info" %}
You can also chain these to use different ItemModel-types inside each threshold-entry here for very complex items
{% endhint %}


# Components

As of Minecraft 1.20.6, items now use what is called Components, or DataComponents, to specify specific features. This covers anything from consumable items, tool-properties and death protection.\
Due to the nature of these they are very version-specific, so there are some differences and new additions between Minecraft version changes.

Each component below has a hover-click to show an example of how to use it, with additional info.

{% tabs %}
{% tab title="1.21.11" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-6)[^6] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-9)[^9] - Lets this item be inserted into a Jukebox and play a given song

[**Consumable**](#user-content-fn-10)[^10] - Makes an item consumable, with bunch of sub-properties\
[**Equippable**](#user-content-fn-11)[^11] **-** Makes an item equippable, like armor\
[**Damage Resistant**](#user-content-fn-12)[^12] **-** Specify a damage-type this item is invulnerable to\
[**Enchantable**](#user-content-fn-13)[^13] **-** Set the maximum enchantment-cost for this item\
[**Glider**](#user-content-fn-14)[^14] **-** Allows the player to glide, like with elytras, when equipped\
[**Item Model** ](#user-content-fn-15)[^15]- Defines the base model-properties of this item\
[**Tooltip Style**](#user-content-fn-16)[^16] **-** Used to make custom tooltip-styles for your item\
[**Use Cooldown**](#user-content-fn-17)[^17] - Applies a cooldown to all matching items when used\
[**Use Remainder**](#user-content-fn-18)[^18] - Replaces the item with a remainder item if its stack count has decreased after use\
[**Repairable**](#user-content-fn-19)[^19] - What item(s) should be allowed in anvils to repair durability\
[**Death Protection**](#user-content-fn-20)[^20] - Protects the player from when equipped on death. Optionally applies effects too\
[**Player Profile**](#user-content-fn-21)[^21] - Specify profile-properties to show player-skins on item\
[**Unset Components**](#user-content-fn-22)[^22] - This lets you specify Components Nexo should remove from the item\
[**Custom Model Data**](#user-content-fn-23)[^23] - Used for all the new formatting for [1.21.4 CMD component](https://minecraft.wiki/w/Data_component_format#custom_model_data)

[**Tooltip Display**](#user-content-fn-24)[^24] - Sets the Components to hide tooltips from. This should be used instead of ItemFlags\
[**Break Sound**](#user-content-fn-25)[^25] - Set the sound to play when the item loses all its durability\
[**Weapon**](#user-content-fn-26)[^26] **-** Makes the item act like a weapon\
[**Blocks Attacks**](#user-content-fn-27)[^27] **-** Makes the item act as a shield & can block attacks\
[**CanPlaceOn/CanBreak**](#user-content-fn-28)[^28] **-** Defines what this item can break or be placed on in Adventure Mode

[**Painting Variant**](#user-content-fn-29)[^29] **-** Used with the new [Custom Paintings](/configuration/custom-paintings) feature to specify which painting to place

**New properties for 1.21.11+:**

[**Kinetic Weapon**](#user-content-fn-30)[^30] **-** Enables charge-type attack when using item\
[**Piercing Weapon**](#user-content-fn-31)[^31] **-** Actions done when weapon pierces target\
[**Attack Range**](#user-content-fn-32)[^32] **-** The range and hitbox margin of a weapon\
[**Swing Animation**](#user-content-fn-33)[^33] **-** The Animation to play when swinging item\
[**Use Effects**](#user-content-fn-34)[^34] **-** Vibration & player movement penalties when continuously using item\
[**Damage Type**](#user-content-fn-35)[^35] **-** The type of damage the item deals\
[**Minimum Attack Charge**](#user-content-fn-36)[^36] **-** Minimum attack-indicator value required to attack with item
{% endtab %}

{% tab title="1.21.8" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-6)[^6] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-9)[^9] - Lets this item be inserted into a Jukebox and play a given song

[**Consumable**](#user-content-fn-10)[^10] - Makes an item consumable, with bunch of sub-properties\
[**Equippable**](#user-content-fn-11)[^11] **-** Makes an item equippable, like armor\
[**Damage Resistant**](#user-content-fn-12)[^12] **-** Specify a damage-type this item is invulnerable to\
[**Enchantable**](#user-content-fn-13)[^13] **-** Set the maximum enchantment-cost for this item\
[**Glider**](#user-content-fn-14)[^14] **-** Allows the player to glide, like with elytras, when equipped\
[**Item Model** ](#user-content-fn-15)[^15]- Defines the base model-properties of this item\
[**Tooltip Style**](#user-content-fn-16)[^16] **-** Used to make custom tooltip-styles for your item\
[**Use Cooldown**](#user-content-fn-17)[^17] - Applies a cooldown to all matching items when used\
[**Use Remainder**](#user-content-fn-18)[^18] - Replaces the item with a remainder item if its stack count has decreased after use\
[**Repairable**](#user-content-fn-19)[^19] - What item(s) should be allowed in anvils to repair durability\
[**Death Protection**](#user-content-fn-20)[^20] - Protects the player from when equipped on death. Optionally applies effects too\
[**Player Profile**](#user-content-fn-21)[^21] - Specify profile-properties to show player-skins on item\
[**Unset Components**](#user-content-fn-22)[^22] - This lets you specify Components Nexo should remove from the item\
[**Custom Model Data**](#user-content-fn-23)[^23] - Used for all the new formatting for [1.21.4 CMD component](https://minecraft.wiki/w/Data_component_format#custom_model_data)

[**Tooltip Display**](#user-content-fn-24)[^24] - Sets the Components to hide tooltips from. This should be used instead of ItemFlags\
[**Break Sound**](#user-content-fn-25)[^25] - Set the sound to play when the item loses all its durability\
[**Weapon**](#user-content-fn-26)[^26] **-** Makes the item act like a weapon\
[**Blocks Attacks**](#user-content-fn-27)[^27] **-** Makes the item act as a shield & can block attacks\
[**CanPlaceOn/CanBreak**](#user-content-fn-28)[^28] **-** Defines what this item can break or be placed on in Adventure Mode

**New properties for 1.21.8+:**

[**Painting Variant**](#user-content-fn-29)[^29] **-** Used with the new [Custom Paintings](/configuration/custom-paintings) feature to specify which painting to place
{% endtab %}

{% tab title="1.21.5" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-6)[^6] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-9)[^9] - Lets this item be inserted into a Jukebox and play a given song

[**Consumable**](#user-content-fn-10)[^10] - Makes an item consumable, with bunch of sub-properties\
[**Equippable**](#user-content-fn-11)[^11] **-** Makes an item equippable, like armor\
[**Damage Resistant**](#user-content-fn-12)[^12] **-** Specify a damage-type this item is invulnerable to\
[**Enchantable**](#user-content-fn-13)[^13] **-** Set the maximum enchantment-cost for this item\
[**Glider**](#user-content-fn-14)[^14] **-** Allows the player to glide, like with elytras, when equipped\
[**Item Model** ](#user-content-fn-15)[^15]- Defines the base model-properties of this item\
[**Tooltip Style**](#user-content-fn-16)[^16] **-** Used to make custom tooltip-styles for your item\
[**Use Cooldown**](#user-content-fn-17)[^17] - Applies a cooldown to all matching items when used\
[**Use Remainder**](#user-content-fn-18)[^18] - Replaces the item with a remainder item if its stack count has decreased after use\
[**Repairable**](#user-content-fn-19)[^19] - What item(s) should be allowed in anvils to repair durability\
[**Death Protection**](#user-content-fn-20)[^20] - Protects the player from when equipped on death. Optionally applies effects too\
[**Player Profile**](#user-content-fn-21)[^21] - Specify profile-properties to show player-skins on item\
[**Unset Components**](#user-content-fn-22)[^22] - This lets you specify Components Nexo should remove from the item\
[**Custom Model Data**](#user-content-fn-23)[^23] - Used for all the new formatting for [1.21.4 CMD component](https://minecraft.wiki/w/Data_component_format#custom_model_data)

**New properties for 1.21.5+:**

[**Tooltip Display**](#user-content-fn-24)[^24] - Sets the Components to hide tooltips from. This should be used instead of ItemFlags\
[**Break Sound**](#user-content-fn-25)[^25] - Set the sound to play when the item loses all its durability\
[**Weapon**](#user-content-fn-26)[^26] **-** Makes the item act like a weapon\
[**Blocks Attacks**](#user-content-fn-27)[^27] **-** Makes the item act as a shield & can block attacks\
[**CanPlaceOn/CanBreak**](#user-content-fn-28)[^28] **-** Defines what this item can break or be placed on in Adventure Mode
{% endtab %}

{% tab title="1.21.4" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-6)[^6] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-37)[^37] - Lets this item be inserted into a Jukebox and play a given song

[**Consumable**](#user-content-fn-10)[^10] - Makes an item consumable, with bunch of sub-properties\
[**Equippable**](#user-content-fn-11)[^11] **-** Makes an item equippable, like armor\
[**Damage Resistant**](#user-content-fn-12)[^12] **-** Specify a damage-type this item is invulnerable to\
[**Enchantable**](#user-content-fn-13)[^13] **-** Set the maximum enchantment-cost for this item\
[**Glider**](#user-content-fn-14)[^14] **-** Allows the player to glide, like with elytras, when equipped\
[**Item Model** ](#user-content-fn-15)[^15]- Defines the base model-properties of this item\
[**Tooltip Style**](#user-content-fn-16)[^16] **-** Used to make custom tooltip-styles for your item\
[**Use Cooldown**](#user-content-fn-17)[^17] - Applies a cooldown to all matching items when used\
[**Use Remainder**](#user-content-fn-18)[^18] - Replaces the item with a remainder item if its stack count has decreased after use\
[**Repairable**](#user-content-fn-19)[^19] - What item(s) should be allowed in anvils to repair durability\
[**Death Protection**](#user-content-fn-20)[^20] - Protects the player from when equipped on death. Optionally applies effects too\
[**Player Profile**](#user-content-fn-21)[^21] - Specify profile-properties to show player-skins on item\
[**Unset Components**](#user-content-fn-22)[^22] - This lets you specify Components Nexo should remove from the item

**New properties for 1.21.4+:**\
[**Custom Model Data**](#user-content-fn-23)[^23] - Used for all the new formatting for [1.21.4 CMD component](https://minecraft.wiki/w/Data_component_format#custom_model_data)
{% endtab %}

{% tab title="1.21.3" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-6)[^6] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-37)[^37] - Lets this item be inserted into a Jukebox and play a given song

**New properties for 1.21.3+:**

[**Consumable**](#user-content-fn-10)[^10] - Makes an item consumable, with bunch of sub-properties\
[**Equippable**](#user-content-fn-11)[^11] **-** Makes an item equippable, like armor\
[**Damage Resistant**](#user-content-fn-12)[^12] **-** Specify a damage-type this item is invulnerable to\
[**Enchantable**](#user-content-fn-13)[^13] **-** Set the maximum enchantment-cost for this item\
[**Glider**](#user-content-fn-14)[^14] **-** Allows the player to glide, like with elytras, when equipped\
[**Item Model** ](#user-content-fn-15)[^15]- Defines the base model-properties of this item\
[**Tooltip Style**](#user-content-fn-16)[^16] **-** Used to make custom tooltip-styles for your item\
[**Use Cooldown**](#user-content-fn-17)[^17] - Applies a cooldown to all matching items when used\
[**Use Remainder**](#user-content-fn-18)[^18] - Replaces the item with a remainder item if its stack count has decreased after use\
[**Repairable**](#user-content-fn-19)[^19] - What item(s) should be allowed in anvils to repair durability\
[**Death Protection**](#user-content-fn-20)[^20] - Protects the player from when equipped on death. Optionally applies effects too\
[**Player Profile**](#user-content-fn-21)[^21] - Specify profile-properties to show player-skins on item\
[**Unset Components**](#user-content-fn-22)[^22] - This lets you specify Components Nexo should remove from the item
{% endtab %}

{% tab title="1.21.1" %}
[**Max Stack Size**](#user-content-fn-1)[^1] **-** Sets the maximum slot-size for the NexoItem\
[**Enchantment Glint Override**](#user-content-fn-2)[^2] - Sets an override-state for the enchantment glint\
[**Fire Resistant**](#user-content-fn-3)[^3] - Sets whether this NexoItem is immune to fire and lava\
[**Max Damage**](#user-content-fn-4)[^4] - Sets the maximum amount of damage the NexoItem can take\
[**Hide Tooltip**](#user-content-fn-5)[^5] - Hides all tooltips from the given NexoItem on hover\
[**Food**](#user-content-fn-38)[^38] - Makes this item consumable with several different properties\
[**Tool**](#user-content-fn-7)[^7] **-** Makes your item into a tool with configurable behaviour for blocks its breaking

**New properties for 1.21.1+:**

[**Custom Data**](#user-content-fn-8)[^8] **-** Defines custom properties to add to the item\
[**Jukebox Playable**](#user-content-fn-37)[^37] - Lets this item be inserted into a Jukebox and play a given song
{% endtab %}
{% endtabs %}

[^1]: ```yaml
    my_item:
      Components:
        max_stack_size: 64
    ```

    The number must be between 1 & 99

[^2]: ```yaml
    my_item:
      Components:
        enchantment_glint_override: true
    ```

[^3]: ```yaml
    my_item:
      Components:
        fire_resistant: true
    ```

[^4]: ```yaml
    my_item:
      Components:
        max_damage: 100
    ```

    Max Damage/Durability can be any value above 0

[^5]: ```yaml
    my_item:
      Components:
        hide_tooltip: true
    ```

[^6]: ```yaml
    my_item:
      Components:
        food:
          nutrition: 2
          saturation: 2 
          can_always_eat: false
                              
    ```

    **can\_always\_eat -** Defaults to false if unspecified\
    **eat\_seconds -** Defaults to 1.6 if unspecified

[^7]: ```yaml
    my_item:
      Components:
        tool:
          damage_per_block:
          default_mining_speed:
          rules:
            - speed: 1.0
              correct_for_drops: true
              material: DIAMOND_BLOCK
              #materials:
              #  - DIAMOND_BLOCK
              #  - NETHERITE_BLOCK
              tag: minecraft:mineable/axe
              #tags:
              #  - minecraft:mineable/axe
              #  - minecraft:mineable/shovel
    ```

    **damage\_per\_block:**\
    The amount of damage to apply to the tool per block broken. Defaults to 1\
    \
    **default\_mining\_speed:**

    The default speed of this tool, excluding modifiers in rules. Defaults to 1.0\
    \
    **Rules:**\
    Rules are behaviour for specific blocks.\
    You can set the speed, if the tool is correct and the block should drop its drop, etc\
    \
    **Tags:**\
    List of all tags can be found [here](https://minecraft.wiki/w/Tag#Block_tags_2)

[^8]: ```yaml
    my_item:
      Components:
        custom_data:
          nexo:string: "Some string"
          nexo:integer: 2
          nexi:integer_list: [1, 2, 3]
          nexo:string_list:
            - "something"
            - "something else"
          nexo:compound:
            nexo:c_string: "String"
            nexo:c_integer: 3
            namespace:boolean: true
    ```

    This is data that is added into the "root" of the CustomData on the Item.\
    It is one step outside what PersistentData is

[^9]: ```yaml
    my_item:
      Components:
        jukebox_playable:
          song_key: namespace:key
    ```

    This component lets you mark an item as a "Music Disc". It can then be inserted into a jukebox to play a given sound.\
    \
    The sound is the key defined in either your sounds.json in your ResourcePack, or in Nexo's sounds.yml

[^10]: ```yaml
    my_item:
      Components:
        consumable:
          sound: minecraft:entity.generic.eat     # Optional, default is entity.generic.eat
          consume_particles: true                 # Optional, default is true
          consume_duration: 1.6s                   # Optional, default is 1.6s
          animation: EAT                          # Optional, default is EAT
          effects:
            APPLY_EFFECTS:
              mining_fatigue:
                duration: 10t
                amplifier: 1
                ambient: false
                show_icon: true
                show_particles: true
                probability: 1.0
            REMOVE_EFFECTS:
            - speed
            CLEAR_ALL_EFFECTS: {}
            TELEPORT_RANDOMLY:
              diameter: 16.0
            PLAY_SOUND:
              sound: minecraft:ambient.basalt_deltas.additions1
    ```

[^11]: ```yaml
    my_item:
      Components:
        equippable:
          slot: HEAD
          #asset_id: minecraft:example
          #camera_overlay: minecraft:example
          #equip_sound: item.armor.equip_chain
          #allowed_entity_types:
          #  - PLAYER
          #  - SKELETON
          #dispensable: true
          #swappable: true
          #damage_on_hurt: true
    ```

    [**Minecraft Wiki**](https://minecraft.wiki/w/Data_component_format#equippable)\
    \
    **Asset ID:**

    The asset to show for the equipped texture.\
    If using a 3D Model for helmet, do not specify this field

    **Camera Overlay:**

    The resource-overlay to show on screen whilst equipped.\
    This field is optional

    **Equip Sound:**

    The sound to play when equipped.\
    Defaults to `item.armor.equip_generic`

    **Allowed Entity Types:**

    A list of all types can be found [here](https://jd.papermc.io/paper/1.21.8/org/bukkit/entity/EntityType.html)\
    If unspecified, defaults to all entities

[^12]: ```yaml
    my_item:
      Components:
        damage_resistant: is_fire
    ```

    This specifies the DamageType the item is invulnerable to.\
    If you want a custom DamageType which the vanilla ones do not cover, you will need to add it via a custom Datapack\
    \
    A list of all DamageTypes can be found [here](https://minecraft.wiki/w/Damage_type_tag_\(Java_Edition\))

[^13]: ```yaml
    my_item:
      Components:
        enchantable: 15
    ```

    This specifies the maximum Enchantment Cost for this item.\
    Setting this to 0 will prevent the item from being enchantable

[^14]: ```yaml
    my_item:
      Components:
        glider: true
    ```

    This component is best used together with Equippable

[^15]: ```yaml
    my_item:
      Components:
        item_model: namespace:key
    ```

    This defines the base model of an item.\
    By default it will use `minecraft:type`\
    For PAPER this would be `minecraft:paper`\
    \
    It is heavily recommended to use a custom ItemModel instead of CustomModelData when possible\
    \
    With an ItemModel you do not need CustomModelData as you alter the base-model of your item\
    \
    Nexo will make this for you if you manually set this property in your item, and do not have CustomModelData specified, or you have enabled `Pack.generation.prefer_item_models` in `settings.yml`

[^16]: ```yaml
    my_item:
      Components:
        tooltip_style: namespace:key
    ```

    [**Minecraft Wiki**](https://minecraft.wiki/w/Data_component_format#tooltip_style)

    A Tooltip Style refers to a set of textures in your ResourcePack.\
    It is made up of a **background** and **frame** texture, with an optional mcmeta file for each\
    \
    It can also be customized & animated using [MCMeta](https://minecraft.wiki/w/Resource_pack#Animation#Gui)\
    \
    The config property refers to this path in your ResourcePack:\
    `assets/NAMESPACE/textures/gui/sprites/tooltip/KEY_frame`\
    `assets/NAMESPACE/textures/gui/sprites/tooltip/KEY_background`

[^17]: ```yaml
    my_item:
      Components:
        use_cooldown:
          duration: 1.2s
          group: nexo:example
    ```

    This component triggers the cooldown feature for this Item, similar to using an Ender Pearl in vanilla.\
    \
    **Duration:**\
    The time the cooldown should last. Defaults to 1.0s\
    \
    **Group (Optional):**\
    This can be used to apply the cooldown on all instances of an item & even other items with the same group

[^18]: ```yaml
    my_item:
      Components:
        use_remainder:
          #minecraft_type: DIAMOND
          #crucible_item: crucibleid
          #mmoitems_id: id
          #mmoitems_type: type
          nexo_item: itemid
    ```

[^19]: ```yaml
    my_item:
      Components:
        repairable: minecraft:planks
        #repairable:
        # - minecraft:diamond
    ```

    This defines the items that can be used to repair this NexoItem.\
    It only supports vanilla Materials, not Custom Items.\
    \
    It supports both tags and individual materials, like shown above.\
    Can be a single entry or a list of entries

[^20]: ```yaml
    my_item:
      Components:
        death_protection:
          death_effects:                      #Optional, can be empty/set to []
            APPLY_EFFECTS:
              mining_fatigue:
                duration: 10t
                amplifier: 1
                ambient: false
                show_icon: true
                show_particles: true
                probability: 1.0
              REMOVE_EFFECTS:
              - speed
              CLEAR_ALL_EFFECTS: {}
              TELEPORT_RANDOMLY:
                diameter: 16.0
              PLAY_SOUND:
                sound: minecraft:ambient.basalt_deltas.additions
    ```

[^21]: ```yaml
    myitem:
      material: PLAYER_HEAD
      Components:
        profile:
          name: boy0000
          uuid: 1234
          properties:
            name: name
            value: value
            signature: signature
    ```

    The component can be applied to any item, but only has a visible effect for those with PLAYER\_HEAD material.

    In the profile component itself, you have to specify either **name, uuid** or **properties,** not all.\
    Properties is mostly for referencing skins from databases etc which might not be entirely linked to a player anymore.\
    In properties, name and value are required, but signature is optional

[^22]: ```yaml
    myitem:
      material: DIAMOND_PICKAXE
      Components:
        unset_components:
          - minecraft:tool
    ```

[^23]: ```yaml
    my_item:
      Components:
        custom_model_data:
          #floats: [ 1f, 2f, ...]            #Optional, same logic as with CMD before
          #colors: [ 1, 123456, [r, g, b]]
          #string: [ "something", "somethingelse", ...]
          #flags: []
    ```

    [**Minecraft Wiki**](https://minecraft.wiki/w/Data_component_format#custom_model_data)

[^24]: ```
    my_item:
      Components:
        tooltip_display:
          - minecraft:dyed_color
          - minecraft:enchantments
          - minecraft:attribute_modifiers
    ```

    This component is used to replace the old `show_in_tooltip` -property for individual components.\
    A list of components can be found [here](https://minecraft.wiki/w/Data_component_format#List_of_components)\
    \
    If `hide_tooltip`-component is set to true, this is ignored

[^25]: ```yaml
    my_item:
      Components:
        break_sound: namespace:key
    ```

[^26]: ```yaml
    my_item:
      Components:
        weapon:
         damage_per_attack: 1
         disable_blocking: 0.0
    ```

[^27]: ```yaml
    my_item:
      Components:
        blocks_attacks:
          block_delay: 0.0s
          disable_cooldown_scale: 1.0
          block_sound: namespace:key
          disable_sound: namespace:key
          bypassed_by: namespace:key
          item_damage:
            base: 1.0
            factor:1.0
            threshold: 0.0
          damage_reductions:
            - base: 1.0
              factor: 1.0
              horizontal_blocking: 90.0
              types: namespace:key
              #types:
              #  - namespace:key
    ```

    **Damage Reductions:**

    **types** can be specified as a single element or a list, and takes a NamespacedKey for a DamageType or Tag

[^28]: ```yaml
    my_item:
      Components:
        can_place_on/can_break:
          block: stone
          blocks:
            - stone
            - ores
    ```

    This supports all block-ids or block-tags.\
    Can either specify a single element or a list of elements

[^29]: ```yaml
    my_item:
      Components:
        painting_variant: namespace:key
    ```

[^30]: ```yaml
    my_item:
      Components:
        kinetic_weapon:
          contact_cooldown: 10t
          delay: 0t
          damage_multiplier: 1.0
          sound: namespace:key
          hit_sound: namespace:key
          dismount_conditions:
            max_duration: 0t
            min_speed: 0f
            min_relative_speed: 0f
          knockback_conditions:
            max_duration: 0t
            min_speed: 0f
            min_relative_speed: 0f
          damage_conditions:
            max_duration: 0t
            min_speed: 0f
            min_relative_speed: 0f
                          
    ```

[^31]: ```yaml
    my_item:
      Components:
        piercing_weapon:
          sound: namespace:key
          hit_sound: namespace:key
          dismounts: false
          deals_knockback: true
    ```

[^32]: ```yaml
    my_item:
      Components:
        attack_range:
          reach: 0..64
          #min_reach: 0
          #max_read: 64
          hitbox_margin: 0.3
          mob_factor: 1
    ```

[^33]: ```yaml
    my_item:
      Components:
        swing_animation:
          type: WHACK
          duration: 6t
    ```

    Available animations found [here](https://jd.papermc.io/paper/io/papermc/paper/datacomponent/item/SwingAnimation.html)

[^34]: ```yaml
    my_item:
      Components:
        use_effects:
          can_sprint: false
          interact_vibrations: true
          speed_multiplier: 0.2
    ```

[^35]: ```yaml
    my_item:
      Components:
        damage_type: piercing
    ```

[^36]: ```yaml
    my_item:
      Components:
        minimum_attack_charge: 1f
    ```

[^37]: ```yaml
    my_item:
      Components:
        jukebox_playable:
          show_in_tooltip: true
          song_key: namespace:key
    ```

    This component lets you mark an item as a "Music Disc". It can then be inserted into a jukebox to play a given sound.\
    \
    The sound is the key defined in either your sounds.json in your ResourcePack, or in Nexo's sounds.yml

[^38]: ```yaml
    my_item:
      Components:
        food:
          nutrition: 2
          saturation: 2 
          can_always_eat: false
          eat_seconds: 1.6
          replacement:
            #minecraft_type: DIAMOND
            #crucible_item: crucibleid
            #eco_item: ecoid
            #mmoitems_id: id
            #mmoitems_type: type
            nexo_item: itemid
          effects:
            mining_fatigue:
              duration: 10t
              amplifier: 1
              ambient: false
              show_icon: true
              show_particles: true
              probability: 0.5
    ```

    **can\_always\_eat -** Defaults to false if unspecified\
    **eat\_seconds -** Defaults to 1.6 if unspecified


# 2D Player Heads

2D Player Heads are used by a lot of servers to display the players skin in a stylish way.\
As this is a very popular feature there are conflicts when several plugins use the Player-Head resourcepack files.

With the Pack here from [NexoAssets](https://mcmodels.net/products/14834/2d-player-heads) you can easily create 2D Player-Heads.\
It uses ItemModels, hence only supports **1.21.4+**, but wont conflict with any other ResourcePack

It comes with a premade Nexo-setup, making it easy to add, but all it contains is a ResourcePack added as a Nexo ExternalPack.\
**Example command for getting the items:**

{% code title="1x1 PlayerHead:" overflow="wrap" %}

```json
/minecraft:give <player> player_head[item_model="nexo:2d_player_head",profile={"name":"boy0000"}]
```

{% endcode %}

{% code title="2x2 PlayerHead" overflow="wrap" %}

```json
/minecraft:give <player> player_head[item_model="nexo:2d_player_head_large",profile={"name":"boy0000"}]
```

{% endcode %}

<figure><img src="/files/XAmxKEWubVV8R5TtCjJi" alt=""><figcaption><p>1x1 &#x26; 2x2 PlayerHeads for Boy0000 &#x26; Sixsoul (NexoAssets)</p></figcaption></figure>


# Special Item Appearance

How to customize your item appearance?

### Invisible Item (1.21.4+)

To make an invisible item with Nexo, you can use the Nexo provided ItemModel `nexo:empty`.\
This will render nothing for that Item no matter where it is used.

Here is a basic config-example for an invisible NexoItem

```yaml
invisible_item:
  Components:
    item_model: nexo:empty
```

You can also use this in any other plugin, assuming they allow you to specify the ItemModel of your Item.

### Oversized Items in GUI (1.21.6+)

As of 1.21.6+, Mojang made changes to how items render in the GUI.\
By default they are no longer allowed to go beyond their 16x16 grid, but added an option called `oversized_in_gui` to ItemModels to return this behaviour.\
This works best when using ItemModels ([ItemModels vs. CustomModelData](/general-usage/faq/itemmodels-vs.-custommodeldata)).\
In Nexo you can use this for your items by following the below example;

```yaml
my_oversized_item:
  material: PAPER
  Pack:
    oversized_in_gui: true
    model: my_oversized_model
  Components:
    item_model: nexo:my_oversized_item
```

{% hint style="info" %}
In Nexo 1.17+ there is `Pack.generation.force_oversized_in_gui` which can be used to change the default state of every item if you dont want to specify it for individual items
{% endhint %}

Here we do not use CustomModelData as that would apply to all items using PAPER.\
If you are not sure what an ItemModel is, think of it as the **base model** of an item.\
By default all items using the material PAPER will use **minecraft:paper.**\
By specifying our own ItemModel here, we are changing the base-model of our item, preventing any conflicts or issues, and Nexo can properly mark the config

### Use a different model for Inventory Icon vs Equipped/In-Hand

{% hint style="info" %}
This is for 1.21.2+ servers & clients only
{% endhint %}

If you want to say have an item with a 2D icon in the inventory but when worn on head or held in your hand, it uses a 3D model or another 2D icon, you can do so by following the below

You need to provide an ItemModel that specifies when to show what model.\
Here is an example using a `mymodel_icon` model for the GUI and a "fallback" for everything else.\
This approach can be used for most other contexts, which you can find [here](https://minecraft.wiki/w/Items_model_definition#display_context).\
This is not a detailed guide on ItemModels, but you can do very complex things with them beyond this.

```json
{
  "model": {
    "type": "select",
    "property": "display_context",
    "cases": [
      {
        "when": "gui",
        "model": {
          "type": "model",
          "model": "namespace:mymodel_icon" // The model to display for the GUI
        }
      }
    ],
    "fallback": {
      "type": "model",
      "model": "namespace:mymodel" //The model that is used everywhere else
    }
  }
}
```

You can put this inside `Nexo/pack/assets/namespace/items/mymodel.json` .

Then you can make your NexoItem-config, which will reference this ItemModel

```yaml
myitem:
  itemname: "My Item"
  Components:
    item_model: namespace:mymodel
```

***

{% hint style="info" %}
All the methods below support a `BLANK_texture` or `BLANK_textures` aswell as models if all you have is a PNG\
For example for a 2D bow with different pulling-stages.
{% endhint %}

### Dyeable Items

```yaml
myitem:
  Pack:
    model: example
    dyeable_model: example_dyeable
    #texture: example
    #dyeable_texture: example_dyeable
```

### Blocking Model (Shields)

```yaml
myitem:
  Pack:
    model: example_shield
    blocking_model: example_shield_blocking
    #texture: example_shield
    #blocking_texture: example_shield_blocking
```

### Pulling Models (Bows / Crossbow)

```yaml
myitem:
  Pack:
    model: default/combat_bow
    pulling_models:
      - default/combat_bow_pulling_0
      - default/combat_bow_pulling_1
      - default/combat_bow_pulling_2
```

### Charged Model (Crossbow)

```yml
myitem:
  Pack:
    model: default/custom_bow
    pulling_models:
      - default/custom_bow_pulling_0
      - default/custom_bow_pulling_1
      - default/custom_bow_pulling_2
    charged_model: default/custom_bow_pulling_2
    firework_model: default/custom_bow_charged #Optional
```

### Cast Model (Fishing Rods)

```yml
myitem:
  Pack:
    model: default/fishing_rod
    cast_model: default/fishing_rod_cast
    #texture: default/fishing_rod
    #cast_texture: default/fishing_rod_cast
```

### Damaged Model (Based on durability)

```yml
myitem:
  Pack:
    model: default/diamond_sword
    damaged_models:
      - default/diamond_sword_damaged1
      - default/diamond_sword_damaged2
      - default/diamond_sword_damaged3
```

### Composite Models

```yaml
myitem:
  Pack:
    model: default/diamond_sword
    composite_models:
      - default/background
      - default/item
      - default/overlay
```


# Custom Mob Armor (1.21.2+)

Nexo allows you to automate the generation of several types of mob-armor.\
Mainly Wolf-Armor, Horse-Armor & Llama-Armor. These follow the same pattern as [Component Based (1.21.2+)](/configuration/custom-armors/components) Player Armor, with the ItemID- & Armor-pattern Texture being `armorname_wolf_armor`*,* `armorname_horse_armor` & `armorname_llama_armor` .

```yaml
forest_wolf_armor:
  itemname: "Forest Wolf Armor"
  material: WOLF_ARMOR
  Pack:
    texture: nexo:item/nexo_armor/forest_wolf_armor_icon
    CustomArmor:
      wolf_armor: nexo:item/nexo_armor/forest_wolf_armor
forest_llama_armor:
  itemname: "Forest Llama Carpet"
  material: PAPER
  Pack:
    texture: nexo:item/nexo_armor/forest_llama_armor_icon
    CustomArmor:
      llama_armor: nexo:item/nexo_armor/forest_llama_armor
forest_horse_armor:
  itemname: "Forest Horse Armor"
  material: DIAMOND_HORSE_ARMOR
  Pack:
    texture: nexo:item/nexo_armor/forest_horse_armor_icon
    CustomArmor:
      horse_armor: nexo:item/nexo_armor/forest_horse_armor
forest_nautilus_armor:
  itemname: "Forest Nautilus Armor"
  material: DIAMOND_NAUTILUS_ARMOR
  Pack:
    texture: nexo:item/nexo_armor/forest_nautilus_armor_icon
    CustomArmor:
      horse_armor: nexo:item/nexo_armor/forest_nautilus_armor
```

{% hint style="info" %}
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}


# Custom Harness (1.21.6+)

With the new Happy Ghast entity, there is a new type of Equipment, the Harness.\
Nexo allows you to easily register custom harnesses like [Custom Saddles (1.21.5+)](/configuration/custom-mob-armor-1.21.2+/custom-saddles-1.21.5+).

To do so simply follow the general pattern for all NexoEquipment. Below is an example;

```
forest_harness:
  type: PAPER
  itemname: "Forest Harness"
  Pack:
    parent_model: item/generated
    texture: nexo:items/nexo_armor/forest_harness_icon
    CustomArmor:
      harness: nexo:items/nexo_armor/forest_harness
  Components:
    equippable:
      allowed_entity_types: [ HAPPY_GHAST ]
      slot: BODY
```

{% hint style="info" %}
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

Here `Pack.CustomArmor.harness` points to where we put the texture for the harness itself, with `Pack.texture` the icon.\
We also have to set the `allowed_entity_types` in our EquippableComponent for Nexo to properly handle the remaining properties


# Custom Saddles (1.21.5+)

When using COMPONENT type CustomArmor, Nexo allows you to easily create custom saddles for various mobs. The list of supported entities are: **camel, donkey, horse, mule, pig, skeleton\_horse, strider, zombie\_horse, nautilus & camel\_husk**

Similar to all other CustomArmor sections, the pattern is \`mobtype\_saddle\`.

```yaml
forest_saddle:
  itemname: Forest Saddle
  type: SADDLE
  Pack:
    texture: nexo:items/forest_armor/forest_saddle_icon
    CustomArmor:
      pig_saddle: nexo:items/forest_armor/forest_pig_saddle
      horse_saddle: nexo:items/forest_armor/forest_horse_saddle
  Components:
    equippable:
      slot: BODY
      allowed_enity_types: [ PIG, HORSE ]
```

{% hint style="info" %}
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

Here `Pack.CustomArmor.x_saddle` points to where we put the texture for the harness itself, with `Pack.texture` the icon.\
We also have to set the `allowed_entity_types` in our EquippableComponent for Nexo to properly handle the remaining properties


# Custom Player Armors

Just like other items, armor have a texture for when it is held or in your inventory, but also a texture for when a player equips it.\
Nexo comes with two ways to add custom armor: COMPONENT & TRIMS.\
COMPONENT is for all 1.21.2+ servers and is the optimal choice for all supported servers.\
TRIMS is designed around the Armor-Trim system added in Minecraft 1.20, and will not work on earlier versions.

**Component** method is recommended for all servers 1.21.2+ in every scenario.\
There is no benefit to using Trims or Shader-methods for these servers.

**Armor-Trim** method is recommended if your server is 1.21.1 and only allows 1.20+ players.\
It has the benefit of not breaking with shaders / requiring extra mods to work.\
It requires the use of CHAINMAIL armor


# Custom Elytras (1.21.2+)

This is a sub-feature of using COMPONENT based CustomArmor, letting you make custom textured elytras.\
The pattern for adding it is exactly the same as explained in [CustomArmor](/configuration/custom-armors/components)-section, with some slight differences. The Equippable-Component model-property is suffixed with \_elytra, and the itemid follows the scheme `armorname_elytra`

Here is a config example:

```yaml
forest_elytra:
  itemname: "Forest Elytra"
  material: ELYTRA
  Pack:
    texture: nexo:item/nexo_armor/forest_elytra_icon
  Components:
    equippable:
      slot: CHEST
      asset_id: nexo:forest_elytra
```

{% hint style="info" %}
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

<figure><img src="/files/JEQYTP6lntxGKG5CpikI" alt=""><figcaption><p>Forest Elytra included with Nexo</p></figcaption></figure>


# Component Based (1.21.2+)

If using COMPONENT as your custom-armor type, you are not limited in any way, unlike with TRIMS\
It also has the benefit of not needing to be based on an armor-item at all, use PAPER if you want to.\
Every downside there has been to earlier methods is now gone, no restrictions.

## How to configure your armor?

{% hint style="info" %}
Make sure that the itemID of your NexoItem follows the pattern `armorname_armortype`.\
For the rest of the above set it would be `forest_chestplate`, `forest_leggings` and `forest_boots`.

Make sure your armor-layer files follow the format of **armorname**\_armor\_layer\_1/2.png.\
In the example below, we would need a **forest**\_armor\_layer\_1.png & **forest**\_armor\_layer\_2.png

\
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

```yaml
forest_helmet:
  material: PAPER    # Can be any material, armor-item or anything else
  Pack:
    # Optional, if not specified, Nexo searches for any texture
    # with the filename armorname_armor_layer_X.png
    #CustomArmor:
    #  layer1: nexo:item/nexo_armors/forest_armor_layer_1
    #  layer2: nexo:item/nexo_armors/forest_armor_layer_2
    texture: nexo:item/nexo_armors/forest_helmet
```

An Equippable-Component is also necessary for the armor to display correctly.\
Nexo will automatically assign it if it has not been manually specified.\
You can optionally manually assign the component if you want to.\
The value should be `nexo:armorname`, so in our example;

```yaml
forest_helmet:
  Components:
    equippable:
      slot: HEAD
      asset_id: nexo:forest
```

{% hint style="warning" %}
If using a 3D model for your helmet, do not specify Components.equippable.asset\_id
{% endhint %}

<figure><img src="/files/IWfhxcJvwkQIfrIdp8Nv" alt=""><figcaption><p>Forest Armor Sets Nexo comes with (Player, Wolf, Horse &#x26; Llama)</p></figcaption></figure>


# Trims Based (1.20+)

If using trims as your custom-armor type, most things is handled automatically for you.\
TRIMS method requires using CHAINMAIL as the base-item.

\
Nexo then generates a datapack based on your configured custom armors.\
Due to it requiring a datapack, the server needs to do a full restart any time you add/remove an armor-set.

{% hint style="danger" %}
After changing `CustomArmor.armor_type` to `TRIMS` you need to:

1. Start your server to let datapack be generated
2. Stop your server
3. Start it again to enable the previously generated datapack
   {% endhint %}

## How to configure your armor?

{% hint style="info" %}
Make sure that the itemID of your NexoItem follows the pattern `armorname_armortype`.\
For the rest of the above set it would be `ruby_chestplate`, `ruby_leggings` and `ruby_boots`.

Make sure your armor-layer files follow the format of **armorname**\_armor\_layer\_1/2.png.\
In the example below, we would need a **ruby**\_armor\_layer\_1.png & **ruby**\_armor\_layer\_2.png

\
If you are unsure how to reference a TextureFile in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

```yaml
ruby_helmet:
  displayname: "<gradient:#FA7CBB:#F14658>Ruby Helmet"
  material: CHAINMAIL_HELMET
  Pack:
    parent_model: "item/generated"
    # Optional, if not specified, Nexo searches for any texture
    # with the filename armorname_armor_layer_X.png
    #CustomArmor:
    #  layer1: default/armors/ruby_armor_layer_1.png
    #  layer2: default/armors/ruby_armor_layer_2.png
    texture: default/armors/ruby_helmet
```

A trim-pattern is also necessary for the armor to display correctly.\
Nexo will automatically assign it if it has not been manually specified.\
You can optionally manually assign the `trim_pattern` if you want to.\
The value should be `nexo:armorname`, so in our example;

```yaml
ruby_helmet:
  trim_pattern: nexo:ruby
```


# Glyphs

How to add new glyphs to the game?

## What is a glyph?

A glyph is a textured unicode symbol. It can be used in any place text is rendered ingame (chat, item name, lore and more). They can be used to do very, very powerful things (custom inventories, extra bars) but their simplest use is to be emoji.

## Configuring a Glyph

You can then add your section to any YAML file from the glyphs directory.\
A glyph has a few main properties, `texture`, `ascent`, `height` and `font`\
The texture is the path and name of the texture file in the format of `namespace:path`\
`height` is the scale of your glyph, height must also never be lower than ascent.\
`ascent` is the vertical offset of your glyph, and must be equal or lower than height.\
`font` is the font you want to use. If unspecified, it will use the Default Font in settings.yml at `Glyphs.default_font`\
Unless you need the Glyph for the Escape Menu, as this place only supports the `minecraft:default` font, to use a custom font to limit conflicts & unintended uses\
\
You can also set a `permission` towards your Glyph to limit who can use it.\
If unspecified, Nexo will use the default permission defined in settings.yml at `Glyphs.default_permission` . You can specify `<glyph_id>` or `<glyph_placeholder`> which Nexo will then replace for you

Glyphs can also have `placeholders` which can be used to make more chat-friendly use-cases\
This is defined as a list of strings and will let players use shorthands for a given Glyph

```yaml
heart:
  texture: default/chat/heart
  ascent: 8
  height: 8
  #font: namespace:fontname     Optional, unspecified uses font in settings.yml
  #permission: nexo.glyph.heart Optional, unspecified uses permission in settings.yml
  #placeholders:
  #  - "<3"
```

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-file in a config-file [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

{% hint style="warning" %}
If your texture is above 256x256 resolution you need to either downscale it or make a [Multi-Bitmap Glyph](/configuration/glyphs/multi-bitmap-glyph)
{% endhint %}

### How to use the Glyph

Nexo implements a custom MiniMessage tag for each glyph, which lets you use it more or less anywhere\
You can use \<glyph:glyphid> and it will display your glyph, naturally replace glyphid with your Glyphs ID. Above this would be `heart`\
This tag can then be used in tablists, scoreboards, titles, chat prefixes via LuckPerms or otherwise.\
It is advised to use the Glyph-Tag over raw unicodes whenever possible\\

The Glyph-tag also have some optional arguments you can pass.\
For [Multi-Bitmap Glyph](/configuration/glyphs/multi-bitmap-glyph)'s you can specify the index to display.\
For example if you make a 2x2 Glyph, you can do `<glyph:heart:2>` or `<glyph:heart:2..3>` to display only those parts of the Glyph.

If you want your Glyph to be colorable, you can do `<glyph:heart:colorable>` or `<glyph:heart:c>`\
This will make your Glyph accept any previous color that might apply, and not force it to white or normal

As of 1.21.4 there is also a new "shadow-color" tag, letting you change the color and alpha-value of the Glyphs-shadow\
You can use this by using the argument shadow, or s, like this; `<glyph:heart:shadow:#AARRGGBB>`

All these arguments can be combined, letting you specify a specific Bitmap-Index, make it colorable and change the shadow

### Custom GUIs

With Nexo-glyphs you can create custom textured GUI's\
Nexo does not handle the GUI-Inventory itself, only the visual part of it.\
Simply make a glyph like shown below:

```yaml
customshop:
  texture: required/ui/menu_items
  #font: minecraft:my_font      # Optional, defaults to minecraft:default
  ascent: 37
  height: 256
```

Then in the Inventory-Title you just put `<glyph:glyphid>` and Nexo will handle the rest.\
This applies to the vast majority of places you would want to use a glyph. If the tag does not work you can use the [PlaceholderAPI Placeholder](#placeholderapi)\
\
To adjust the horizontal position of your texture/glyph in the inventory, use the shift-tag.\
For example; `<shift:-8>` for moving 8 pixels back, and `<shift:211>` for moving 211 pixels forward.

### Emoji List

To make a glyph appear under `/nexo emojis` you need to specify that it is one, like below.\
If not specified, this will default to `false`

```yaml
heart:
  texture: default/chat/heart
  is_emoji: true
```

It will also, by default, only show emojis the player has the permission for.\
In `settings.yml` you can toggle the `only_show_emojis_with_permission` setting.\
This will show all emojis to every player, and adds a hover-message indicating if they have permission or not. ![img](https://cdn.discordapp.com/attachments/758785982005903431/1002564595099111474/unknown.png)

The placeholders can be used in chat by players with the required permission (if permission is specified, it is not mandatory).

## How to make glyphs tabcomplete?

Simply set `tabcomplete: true` in the chat-section. If not specified, this will default to `false`

By default tabcompletion will use the raw unicode. This only works for glyphs using the Default-font (used if none is specified). If you want it to use the chat placeholders, you can do so by disabling `unicode_completions` in settings.yml.

```yaml
myemoji:
  #font: minecraft:default
  tabcomplete: true
  placeholders:
    - "<3"
  permission: "nexo.emoji.heart"
```

## PlaceholderAPI

### What's my glyph placeholder?

The section name is the glyph id. In this example the glyph id is `heart`, the placeholder is `%nexo_glyphid%`, so in this example: `%nexo_heart%`\
Glyph-ID is the first line in any glyphs config, it is not the texturename or the placeholder. you can also do shifts using PAPI by doing `%nexo_shift_-8%` or `%nexo_shift_8%`

Do note if the font of a Glyph isnt `minecraft:default` this will just default to using a Glyph-Tag, not unicodes


# Animated Glyphs

With Nexo you can make Animated Glyphs, or GIFs, which you can use to animate GUIs or gif-emotes.\
It is very simple, Nexo does most of the hard work to convert the GIF-file to a compatible format.

Simply put your GIF-file in the resourcepack. As an example we will use `Nexo/pack/assets/nexo/textures/gifs/necoflap.gif`

### Gif-Glyph Config

```yaml
necoflap:
  gif: nexo:gifs/necoflap.gif
  ascent: 9
  height: 11
  #frame_count: X      Optional, mainly used for limiting larger GIFs
  #offset: X            Mainly if the GIF is not overlapping frames perfectly
```

Unlike normal Glyphs, font cannot be customized, as Nexo sets it for you.\
Texture-property is based on the `gif`-property and can be customized that way

{% hint style="info" %}
If you are unsure how to reference a Texture in a Glyph config[FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

{% hint style="warning" %}
GIFs rely on Core Shaders and might break on version updates.\
Large GIFs might also cause lag if the frame-count is really high, consider optimizing GIFs you intend to use
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FnciiMhz3TRl476nq82Kp%2F2025-05-26%2015-31-12.mp4?alt=media&token=c563fad9-3620-4285-b3f5-753a9b410d19>" %}
Example of GIFs in Chat & on Text Displays
{% endembed %}


# Multi-Bitmap Glyph

If you have a texture consisting of several emotes or a texture larger than the allowed 256x256, you can make it a multi-bitmap.\
This means you can, tie several unicodes to one image.\
In your glyph you can specify an amount of rows and columns your glyph needs.\
This will make nexo assign unicodes based on your needs.

{% hint style="info" %}
If you are unsure how to reference a Texture in a Glyph config[FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

Example for using a 512x512 texture:

{% code lineNumbers="true" fullWidth="false" %}

```yaml
myglyph:
  #texture: required/ui/menu_items
  #ascent: 37
  #height: 256
  rows: 2     # Tells Nexo this glyph should have 2 rows when assigning unicodes/chars
  columns: 2  # Tells Nexo this glyph should have 2 columns when assigning unicodes/chars
```

{% endcode %}

This will make nexo assign 4 unicodes for this glyph, which will be displayed when used.

It should be noted that some cases newlines are not supported. An example is in lore, where it would not correctly align your glyph. A workaround is by using an "range index" in your glyph-tag. Example for using in lore of your NexoItem:

```yaml
myitem:
  lore:
    - "<glyph:myglyph:1..2>"
    - "<glyph:myglyph:3..4>"
```

This would correctly align your glyph in lore. In cases where newlines are supported, you dont need to specify such a range. Nexo would by default append that to the text and align it.


# Reference Glyph

Reference-glyphs are used when you want to "reference" a part of a Multi-Bitmap Glyph.\
For example if you have a multi-bitmap glyph with 10 emojis, you can reference a specific one like follows

{% hint style="info" %}
If you are unsure how to reference a Texture in a Glyph config[FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

```yaml
multi_bitmap:
  texture: spritesheet
  rows: 2
  columns 5

#index is the row and column number
first_emoji:
  reference: multi_bitmap
  index: 1
...
tenth_emoji:
  reference: multi_bitmap
  index: 10
```


# Sounds

Nexo allows you to register custom sounds that can be used in `/playsound`or other plugins\
The most basic of sounds can be configured like below by editing `plugins/Nexo/sounds.yml`

```yaml
sounds:
  - id: block.custom.mysound   # id: namespace:id
    sound: nexo:mysound.ogg    # References assets/nexo/sounds/mysound.ogg
    #sounds:                   # Optional, list of sounds where a random will be selected
    #  - mysound.ogg
    #  - mysound2.ogg
```

{% hint style="info" %}
If you are unsure how to reference a Sound OGG-file in a ConfigFile[FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

There are also some more properties you can tweak if needed, but for majority of cases, the above default will be enough. A detailed explanation of each property can be found [here](https://minecraft.wiki/w/Sounds.json)

```yaml
#https://minecraft.wiki/w/Sounds.json
sounds:
  - id: nexo:music.something
    sound: nexo:music/something.ogg
    sounds:                                  # Alternative if you have more than 1 sound-file
      - nexo:music/something.ogg
      - nexo:music/something2.ogg
    stream: true                             # Optional, defaults to false
    preload: true                            # Optional, defaults to false
    volume: 1f                               # Optional, defaults to 1f
    pitch: 1f                                # Optional, defaults to 1f
    weight: 1                                # Optional, defaults to 1
    attenuation_distance: 13                 # Optional, defaults to 16
    jukebox_playable:                        # Optional, Used for registering a custom music-disc sound
      comparator_output: 15                  # Optional, defaults to 15, must be in 1..15
      range: X                               # Optional, If omitted, the sound will have a variable range.
      duration: 2.5s
      description: Description
```

There is also `jukebox_playable`which is used to register sounds used in custom music discs\
Nexo will generate the necessary datapack for this, which you can then reference in [JukeboxPlayable-Component](/configuration/items#components) of your item

#### Replacing sounds

If you wanna replace sounds already in minecraft, you can do so by doing

```yaml
sounds:
  - id: block.glass.place # removes vanilla sound
    sounds: []
    replace: true
  - id: block.glass.break # replaces vanilla sound with custom sound
    sound: nexo:customglasssound
    replace: true
```


# Custom Paintings

{% hint style="info" %}
Nexo only generates the Datapack for 1.21.5+ servers. You can still use Custom Paintings on 1.21.1-1.21.4, but you will need to make the datapack manually.
{% endhint %}

As of 1.21 you can now make custom paintings via datapacks. Nexo streamlines this process by automating the generation of this datapack based on a `Nexo/paintings.yml` file.

Here is an example of adding a custom painting:

```yaml
paintings:
  nexo:custom_painting:
    author: boy0000
    title: <red>Custom Painting
    asset_id: nexo:custom_painting  # This is the path to the PNG, namespace:path
    width: 1     # The width of your painting, in number of blocks it takes up
    height: 1    # The height of your painting, in number of blocks it takes up
    random_place: true # Will place at random from the vanilla painting items
  nexo:animated_painting:
    author: boy0000
    title: <red>Animated Custom Painting
    asset_id: nexo:animated_painting
    width: 1
    height: 1
```

Then you simply put the Texture of your painting inside Nexo's ResourcePack where your asset\_id points to.\
All Painting-Textures are in `assets/NAMESPACE/textures/painting/PATH`\
The config-format is as with everything else `NAMESPACE:PATH`

For our above example it means we must put the texture inside `assets/nexo/textures/painting/custom_painting.png`

{% hint style="info" %}
Make sure to fully restart your server after adding a new Painting, as they are only registered on startup.
{% endhint %}

### Animated Paintings

You can also make animated paintings using an MCMETA-file.\
The width & height properties are the pixel-size of each frame in your PNG.\
Below is a basic example, [Minecraft Wiki](https://minecraft.wiki/w/Resource_pack#Texture_animation) has a more in-depth explanation.\\

{% code title="animated\_painting.png.mcmeta" %}

```json
{
  "animation": {
    "width": 256,
    "height": 256,
    "frametime": 1
    
  }
}
```

{% endcode %}

This file needs to be named the same as your texture + .mcmeta\
For our above example it means we must put the texture inside `assets/nexo/textures/painting/animated_painting.png.mcmeta`

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FNQBDM0CDYHw3xLDuMFvA%2F2025-07-19%2021-41-23.mp4?alt=media&token=84affb23-a6a7-491e-8053-d3bc14efc2f5>" %}
Static Painting & Animated Painting using MCMeta
{% endembed %}

### NexoItem

When your Custom Painting has been registered, you can make a custom NexoItem which will place the given painting. Below is a basic example

```yaml
custom_painting:
  itemname: Custom Painting
  material: PAINTING
  Components:
    painting_variant: nexo:custom_painting
animated_painting:
  itemname: Animated Painting
  material: PAINTING
  Components:
    painting_variant: nexo:animated_painting
```


# Custom Music Discs

Nexo streamlines the process of adding custom music discs to your server.\
You will need one valid OGG file, for your sound & a NexoItem referencing it.

### Registering your sound

To begin you will need to register your sound. This is essentially what [Sounds](/configuration/sounds)explains.\
All Sound-OGG files go into the **sounds-folder** in the ResourcePack.\
If unsure how ResourcePacks work & how to structure files, read through [ResourcePack](/configuration/resourcepack) & [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)

In short, navigate to `plugins/Nexo/sounds.yml` and add a basic entry for your sound

```yaml
sounds:
  - id: namespace:my.sound    # This is a key which will be used in the NexoItem
    sound: namespace:my/sound  # This references your OGG file and where you put it
    stream: true              # Optional, defaults to false. Enable for long sounds
    jukebox_playable:
      comparator_output: 15   # Optional, defaults to 15, must be in 1..15
      range: X                # Optional, If omitted, the sound will have a variable range.
      duration: 2.5s
      description: Description
```

Now make sure you put the OGG file in the right spot. Above we have referenced `namespace:my/sound` -> `assets/namespace/sounds/my/sound.ogg` inside `plugins/Nexo/pack/`

### Making the Custom Music Disc NexoItem

Now that the sound is all done we just need to make a very basic NexoItem that references the ID of our sound above. There is a slight difference in how the Jukebox Playable-Component is written depending on your server-version. [Components](/configuration/items/components) will show you the one for your server.

For setting a custom texture/model on your NexoItem, you can define it under the Pack section.

```yaml
my_music_disc:
  itemname: My Music Disc
  material: PAPER
  Pack:
    texture: namespace:discs/my_music_disc
  Components:
    jukebox_playable:
      song_key: namespace:my.sound
```


# Dialogs

Nexo simplifies the process of adding new Dialogs to your server.\
Instead of needing to make a datapack, you can do it all in a YAML file inside `plugins/Nexo/dialogs` .

Dialogs are made up of a few different parts.\
A [DialogType](/configuration/dialogs/dialogtype) - Specifies properties at the root of the Dialog\
A [DialogBase](/configuration/dialogs/dialogbase) - The content of the Dialog

<figure><img src="/files/DkVsfTA99MUUYF1o4DNO" alt=""><figcaption><p>Example of Dialog using all available methods</p></figcaption></figure>

```yaml
type: NOTICE
action:
  label: "<red>Notice Label"
  tooltip: "<red>Notice Tooltip"
  width: 150
  action:
    type: RUN_COMMAND
    command: "nexo inventory"
base:
  title: "<red>Title"
  externalTitle: "External Title"
  canCloseWithEscape: true
  afterAction: CLOSE
  bodies:
    message_body:
      type: MESSAGE
      message: "<red>Some Message allowing MiniMessage"
      width: 200
    item_body:
      type: ITEM
      description: "Some Description"
     #description:
     #  contents: "<red>Some description"
     #  width: 200
      showDecorations: true
      showTooltip: true
      width: 16
      height: 16
  inputs:
    text_key:
      type: TEXT
      width: 200
      label: "<red>Text Input Label"
      labelVisible: true
      maxLength: 32
      initial: "Initial Input Text"
      multilineOptions:
        maxLines: 1
        height: 32
    bool_key:  
      type: BOOL
      label: "<red>Boolean Input Label"
      initial: true
      onTrue: "some_action"
      onFalse: "some_action"
    number_key:
      type: NUMBER
      width: 200
      label: "<red>Number Input Label"
      labelFormat: "options.generic_value"
      start: 0
      end: 1
      initial: 0.5
      step: 0.1
    single_key:
      type: SINGLE
      width: 200
      label: "<red>Single Input Label"
      labelVisible: true
      options:
        option_1:
          display: "First Option"
          initial: true
        option_2:
          display: "Second Option"
          initial: false
```


# DialogType

The core of a Dialog is the type of Dialog you want to use.\
The options are [CONFIRM](https://minecraft.wiki/w/Dialog#confirmation), [LIST](https://minecraft.wiki/w/Dialog#dialog_list), [MULTI](https://minecraft.wiki/w/Dialog#multi_action), [NOTICE](https://minecraft.wiki/w/Dialog#notice) & [LINK](https://minecraft.wiki/w/Dialog#server_links)\
The default type is NOTICE

#### DialogAction

Most types have one or more **DialogActions,** which looks as shown below

```yaml
action:
  label: "<red>Action Label"
  tooltip: "<red>Action Tooltip"
  width: 150
```

#### Notice Type

```yaml
type: NOTICE
action:
  ...
```

#### Confirmation Type

Contains two properties, **yes & no**, both which are **DialogActions**

```yaml
type: CONFIRM
yesButton:
  ...
noButton:
  ...
```

#### Dialog List Type

Contains a **DialogAction** property, `exitAction`.\
It also contains `buttonWidth`, `columns` & `dialogs` properties

**buttonWidth -** The width of this button, between 1 -> 1024, defaults to 150\
**columns** - The number of columns, must be 0 or above, defaults to 2\
**dialogs** - A list of Dialog-IDs to display

```yaml
type: LIST
buttonWidth: 150
columns: 2
dialogs:
  - "my_dialog"
exitAction:
  ...
```

#### Multi Action Type

**exitAction -** A **DialogAction**\
**actions -** A list of **DialogActions**\
**columns -** The number of columns, must be 0 or above, defaults to 2

```yaml
type: MULTI
columns: 2
exitAction:
  ...
actions: [ ... ]
```

#### Server Links Type

**buttonWidth -** The width of this button, between 1 -> 1024, defaults to 150\
**columns** - The number of columns, must be 0 or above, defaults to 2\
**exitAction -** A **DialogAction**

```yaml
type: LINK
exitAction:
  ...
columns: 2
buttonWidth: 150
```


# DialogBase

Dialogs have a base which contains the content of the Dialog.\
Below are the propeties you can use

**title -** The title of the Dialog, is always visible on the screen\
**externalTitle** - Name used for buttons that link to this Dialog, defaults to title\
**canCloseWithEscape** - If the Dialog can be dismissed with Escape Key\
**afterAction** - Operation performed on the dialog after click or submit actions.\
\* **NONE -** Keeps the current dialog screen open\
\* **CLOSE (Default) -** Close and return to the previous non-dialog screen (if any)\
\* **WAIT\_FOR\_RESPONSE -** Replaces the current screen with a "Waiting for Response"\
**bodies** - List of DialogBodies to add to the Dialog Screen\
**inputs** - List of DialogInputs to add to the Dialog Screen

### [DialogBody](https://minecraft.wiki/w/Dialog#Body_format)

A DialogBody describes content that is positioned between the title and the inputs of the Dialog Screen.\
These are fairly simple and come in two types, MESSAGE & ITEM

**Message-Type** takes a width-property and a string for the message\
This message supports MiniMessage and Nexo Glyphs- & Shift-tags

**Item-Type** has a few more properties.\
**description -** Takes a MiniMessage String and optionally a width (defaults to 200)\
**showDecorations -** When true, shows the count & durability-bar on the item\
**showTooltip -** When true, shows the tooltip when hovering over the item\
**width -** Horizontal size of the element, must be between 1 & 256, defaults to 16\
**height -** Vertical size of the element, must be between 1 & 256, defaults to 16

To make a DialogBody you can follow the below example, specifying a key/id for the Body-element and its properties;

```yaml
base:
  bodies:
    message_body:
      type: MESSAGE
      message: "<red>Some Message allowing MiniMessage"
      width: 200
    item_body:
      type: ITEM
      description: "Some Description"
     #description:
     #  contents: "<red>Some description"
     #  width: 200
      showDecorations: true
      showTooltip: true
      width: 16
      height: 16
```

### [DialogInput](https://minecraft.wiki/w/Dialog#Input_control_format)

DialogInputs are rendered below the DialogBody-elements and have numerous actions for receiving information from players.

There are four types of Inputs, [TEXT](https://minecraft.wiki/w/Dialog#text), [BOOL](https://minecraft.wiki/w/Dialog#boolean), [NUMBER](https://minecraft.wiki/w/Dialog#number_range) & [SINGLE](https://minecraft.wiki/w/Dialog#single_option).

#### Text-Input

A simple text-input field with a few properties\
**width -** The width of the text input field, between 1 & 1024, defaults to 200\
**labelVisible -** Controls if the label is visible for the input-field\
**maxLength** - The max length of the text input\
**initial** - The initial value in the input-field when the Dialog is opened\
**multiLineOptions -** Optional, specifies that the field should be multiline

```yaml
inputs:
  text_key:
    type: TEXT
    width: 200
    label: "<red>Text Input Label"
    labelVisible: true
    maxLength: 32
    initial: "Initial Input Text"
    multilineOptions:
      maxLines: 1
      height: 32
```

#### Boolean-Input

A checkbox returning a string value depending on its state

**onTrue -** The string value to return when checked, default is "true"\
**onFalse -** The string value to return when unchecked, defaults to "false"\
**initial -** The initial state of the checkbox

```yaml
inputs:
  bool_key:  
    type: BOOL
    label: "<red>Boolean Input Label"
    initial: true
    onTrue: "true"
    onFalse: "false"
```

#### NumberRange-Input

A number slider used for returning a number-value

**width -** The width of the slider, between 1 & 1024, defaults to 200\
**labelFormat -** A translation key used for building the label\
**start -** The lowest value of the slider\
**end -** The highest value of the slider\
**step -** The incremental value for each notch on the slider, if unspecified, slider has no notches\
**initial -** The initial value between start & end for the slider when Dialog is shown

```yaml
inputs:
  number_key:
    type: NUMBER
    width: 200
    label: "<red>Number Input Label"
    labelFormat: "options.generic_value"
    start: 0
    end: 1
    initial: 0.5
    step: 0.1
```

#### SingleOption-Input

**labelVisible -** If the label should be visible on the button or not\
**width -** The width of the button\
**options -** A list of SingleOptions the button can have. Contains a **display** text field & an **initial-field**

```yaml
inputs:
  single_key:
    type: SINGLE
    width: 200
    label: "<red>Single Input Label"
    labelVisible: true
    options:
      option_1:
        display: "First Option"
        initial: true
      option_2:
        display: "Second Option"
        initial: false
```


# DialogAction

DialogActions are divided in two types, **Static & Dynamic**.\
Static-actions do not depend on the value of an input field.\
Dynamic-actions can be used in conjunction with the value of input fields.

### Static Actions

Types of static-actions are [OPEN\_URL](https://minecraft.wiki/w/Dialog#open_url), [RUN\_COMMAND](https://minecraft.wiki/w/Dialog#run_command), [SUGGEST\_COMMAND](https://minecraft.wiki/w/Dialog#suggest_command), [CHANGE\_PAGE](https://minecraft.wiki/w/Dialog#change_page), [CLIPBOARD](https://minecraft.wiki/w/Dialog#copy_to_clipboard), [SHOW\_DIALOG](https://minecraft.wiki/w/Dialog#show_dialog) and [CUSTOM](https://minecraft.wiki/w/Dialog#custom)

```yaml
action:
  type: RUN_COMMAND
  command: "nexo inventory"
```

### Dynamic Actions

Dynamic actions are actions that can be used with values of input fields in the dialog.\
For example run a command with text from the DialogInput Text field\
The types of dynamic actions are [DYNAMIC\_RUN\_COMMAND](https://minecraft.wiki/w/Dialog#dynamic/run_command) & [DYNAMIC\_CUSTOM](https://minecraft.wiki/w/Dialog#dynamic/custom)


# Furniture Mechanic

The furniture mechanic is the main way to implement custom furniture using Nexo.\
Below are an assortment of config file examples to help you in setting up your server.

## Furniture Mechanic

```yaml
myitem:
  itemname: "<gray>Table"
  material: PAPER
  Pack:
    model: default/table
  Mechanics:
    furniture:
      block_sounds:
        place_sound: block.stone.place
        break_sound: block.stone.break
        hit_sound: my.custom.hitsound     # Custom sound as defined in Nexo/sound.yml
        step_sound: my.custom.stepsound   # Requires a sound-file in the Nexo/pack-folder aswell
        fall_sound: my.custom.fallsound
      hitbox:
        barriers:
          - 0,0,0
      drop:
        silktouch: false
        # If no loots section is defined, will drop itself
        #loots:
        #  - { nexo_item: table, probability: 1.0 }
```

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

### Furniture-Properties

#### Display Transform

The `display_transform` dictates how the model will be displayed.\
By default it is set to `NONE`, which will show it as it looks when you open the model in BlockBench.\
As some other plugins might use ArmorStands and add the furniture to its head, you can set this option to `HEAD` for the same effect.\
There is also: `FIRSTPERSON_LEFTHAND`, `FIRSTPERSON_RIGHTHAND`, `FIXED`, `GROUND`, `GUI`, `THIRDPERSON_LEFTHAND`, `THIRDPERSON_RIGHTHAND`.\
All of these will be displayed ingame as shown in BlockBench's Display Tab under the specified type.\
Look at [Furniture Position](https://github.com/Nexo-MC/Nexo-Documentation/blob/master2/mechanics/furniture-mechanic/broken-reference/README.md) for an example on FIXED (ItemFrame Position)

```yaml
myitem:
  Mechanics:
    furniture:
      properties:
        display_transform: NONE
```

There is also a `default_properties` in `mechanics.yml` for changing the global default values of properties. These properties are applied first onto every furniture NexoItem, and any changes in the config itself would take priority

#### Tracking Rotation / Billboard

The `tracking_rotation`-property defines whether you want the furniture to "track" the player.\
This is mainly for stuff like billboard and leaderboards you want the player to see, not normal furniture.\
Options are:\
`FIXED` - No rotation\
`VERTICAL` - Pivots around vertical axis\
`HORIZONTAL` - Pivots around horizontal axis\
`CENTER` - Pivots around center point

```yaml
myitem:
  Mechanics:
    furniture:
      properties:
        tracking_rotation: FIXED
```

#### Translation

The \`translation\`-property lets you offset the model of your furniture. Can be useful to adjust visually without editing the model-json itself\
Config should look like this:

```yaml
myitem:
  Mechanics:
    furniture:
      properties:
        translation: 1.0,0,2
```

#### Brightness

The `brightness`-property lets you override the vanilla lighting-values of the furniture.\
It has a `block_light` and `sky_light` property for the different types of lighting Minecraft has. Config should look like this:

```yaml
myitem:
  Mechanics:
    furniture:
      properties:
        brightness:
          block_light: 15
          sky_light: 0
```

#### Scale

The `scale`-property is a way to scale the furniture.\
It has a `x`, `y` and `z` property for scaling on each axis. Config should look like this:

```yaml
myitem:
  Mechanics:
    furniture:
      properties:
        scale: 1,1,1
```

`view_range`, `shadow_radius`, `shadow_strength` should be self-explanatory.

### Furniture Culling

Display-Entities have a few properties one can use to tweak how the client culls the entities.\
This is by default in Nexo only set to cull based on distance from entity, not based on if it is "on-screen" or not. If you want to use a lot of furniture in a space, this might be good to optimize.

These settings can, as with all other [#furniture-properties](#furniture-properties "mention")be set per-furniture, either in `mechanics.yml` under `default_properties` for global default, or in the furnitures `properties`.

`display_width` - Defines the width of the entity, which it would cull when outside of. Default is 0\
`display_height` - Defines the height of the entity, which it would cull when outside of. Default is 0\
`view_range` - Maximum view range of the entity. When the distance is more than *`view_range`*`×` [*`entityDistanceScaling`*](https://minecraft.wiki/w/Options.txt#Java_Edition)`×64`, the entity is not rendered. Defaults to 1.0.

### Custom Sounds

Furniture, like custom blocks, can have custom sounds

```yaml
myitem:
  Mechanics:
    furniture:
      block_sounds:
        place_sound: block.stone.place
        break_sound: block.stone.break
        hit_sound: my.custom.hitsound     # Custom sound as defined in Nexo/sounds.yml
        step_sound: my.custom.stepsound   # Requires a sound-file in the Nexo/pack-folder aswell
        fall_sound: my.custom.fallsound
```

All the volume and pitch values are set to be what Minecraft uses for blocks normally.\
If you want to change the volume or pitch, you can do so by using the format below.\
Keep in mind these two formats are compatible with eachother.\
We recommend just use the default one, but the option is there if you want to change it.

```yaml
myitem:
  Mechanics:
    furniture:
      block_sounds:
        place:
          sound: block.stone.place
          volume: 1.0
          pitch: 0.2
        break_sound: block.stone.break
        hit_sound: my.custom.hitsound     # Custom sound as defined in Nexo/sounds.yml
        step_sound: my.custom.stepsound   # Requires a sound-file in the Nexo/pack-folder aswell
        fall_sound: my.custom.fallsound
```

### Custom Drops

By default a NexoFurniture will drop itself when broken. This can be changed if you want and customized with several properties.

```yaml
my_block:
  Mechanics:
    furniture:
      drop:
        silktouch: false    # If Silktouch will make the block drop itself
        fortune: false      # If fortune should affect the amount of items dropped
        minimal_type: null  # Refers to the lowest material, if any, this drop requires
        best_tool: null     # Refers to the type of tool, if any, this drop requires
        loots:
          - nexo_item: my_item
          - minecraft_type: DIAMOND
            amount: 1
          - crucible_item: my_crucible_item
            amount: 1..2
          - mmoitem_type: TYPE
            mmoitem_id: ID
            probability: 1.0
```

**minimal\_type -** Refers to a tier of material the drop will require. This can be *WOODEN, STONE, IRON, GOLDEN, DIAMOND* or *NETHERITE.* This also supports ItemType-Mechanic if it is specified in `mechanics.yml` `tool_types` list. If unspecified it is null, or no specific type required.

**best\_tool -** Refers to the type of tool this drop requires, if any. This can be *AXE, PICKAXE, SWORD, SHOVEL & HOE.* If unspecified it is null, or no specific tool required.

### Rotatable

To make a furniture rotatable, simply add the following to your item's config.

```yaml
myitem:
  Mechanics:
    furniture:
      rotatable: true
```

### ModelEngine Furniture

To make use of a ModelEngine model as your furniture, simply add the following to your item's config:

```yaml
myitem:
  Mechanics:
    furniture:
      modelengine_id: name_of_your_bbmodel_file
```

### Jukebox

Lets this furniture accept music discs and custom music discs which will be played.\
You can tweak the `volume` and `pitch` of the music from the jukebox.\
There is also a `permission` field, which can be used if you only want certain players to be able to play music from the jukebox.\
By default permission is blank, which means anyone can play music from the jukebox.

```yaml
myitem:
  Mechanics:
    furniture:
      jukebox:
        volume: 1.0
        pitch: 1.0
        permission: "nexo.jukebox.play"
```

### Restrict Rotation

You can restrict the amount of rotation-facings a furniture has with `restricted_rotation`.\
It can be set to STRICT or VERY\_STRICT, with 8 and 4 facings respectively.\\

```yaml
myitem:
  Mechanics:
    furniture:
      restricted_rotation: VERY_STRICT #STRICT is default if unspecified
```

### Limited placing

You can customize what blocks a custom block/furniture can be placed on with `limited_placing` subsection. You can use the `roof`, `floor` and `wall` options to dictate where a block can be placed. By default, all are set to `true`.\
The `type` specifies if it should only be allowed on or denied on specific blocks.\
If type is `ALLOW` the block can only be placed on the given blocks.\
If the type is `DENY` can be placed on all blocks not matching the given blocks.\
There is also a `radius_limitation` option, which allows you to limit the amount of a certain furniture within a radius.

```yaml
myitem:
  Mechanics:
    furniture:
      limited_placing:
        radius_limitation:
          radius: 20
          amount: 10
        roof: false
        floor: true
        wall: false
        type: ALLOW
        block_types:
          - GRASS_BLOCK
          - DIRT
        block_tags:
          - base_stone_nether
        nexo_blocks:
          - chair
          - ruby_ore
```

The `block_tags` can be found at [this page](https://minecraft.fandom.com/wiki/Tag#Block_tags). Useful if you want to allow/deny a group of blocks.\
The `block_types` are materials. Useful if you want to allow/deny a specific list block.\
The `nexo_blocks` are blocks/furniture from Nexo.\
This allows all custom blocks and furniture in here, but furniture requires a barrier-hitbox.

### Storage

This is a sub-mechanic for furniture & noteblock mechanics, that let you make a custom storage container.\
Essentially a chest, closet or whatever you might want.

There's a few different types: *STORAGE, PERSONAL, ENDERCHEST & DISPOSAL*.\
**STORAGE** is similar to a normal chest. Anyone can open it and view the content of it.\
**PERSONAL** is essentially a custom enderchest, letting you edit the row-count and so on.\
**ENDERCHEST** is literally just the enderchest inventory, but letting you make a custom block/furniture to access it.\
**DISPOSAL** is a custom trashcan, letting you throw items in it, and they will be deleted when closed.\\

```yaml
myitem:
  Mechanics:
    furniture:
      storage:
        type: STORAGE
        rows: 5                             # Default: 6
        title: "<red>My Storage"            # Default: "Storage"
        open_sound: entity.shulker.open     # Default: entity.chest.open
        close_sound: entity.shulker.close   # Default: entity.chest.close
```

### Waterloggable

You can make furniture waterloggable when placed underwater by following the below.\
This mainly applies to the barrier-hitboxes of your furniture

```yaml
myitem:
  Mechanics:
    furniture:
      waterloggable: true
```

### BlockLocker

You can use this to allow protection via [BlockLocker](https://www.spigotmc.org/resources/blocklocker.3268/)\
Valid protectionTypes are CONTAINER, DOOR, ATTACHABLE

```yaml
myitem:
  Mechanics:
    furniture:
      blocklocker:
        can_protect: true
        protection_type: CONTAINER
```


# Hitbox

Furnitures come with two core types, with and without collision-interactions.\
Collision hitboxes are normal barrier-blocks, whilst non-solid ones are interaction-entities.\
Interaction-entities have no collision, but can be any width and height, unlike barriers which are normal 1x1x1 blocks. Below are examples of how to use both.\
\
There are also two other types of hitboxes with collision but some other extra functionalities, Shulker- & Ghast-type hitboxes. Ghast Hitboxes are only available for 1.21.6+

{% hint style="info" %}
Furniture-Hitboxes might conflict with some Anti-Cheat plugins; [Anti-Cheat Plugins](/compatibility/anti-cheat-plugins)
{% endhint %}

<figure><img src="/files/6rBrmH7oNJbcyCZNZkDX" alt=""><figcaption><p>Showing off Barrier, Interaction, Shulker &#x26; Ghast Hitboxes</p></figcaption></figure>


# Barrier Hitbox

**Barrier** hitboxes can be formatted at a given offset from the furniture.\
They also support integer-ranges to shorten repeating lines for larger hitboxes

```yaml
myitem:
  Mechanics:
    furniture:
      hitbox:
        barriers:
          - 0,0,0
          - 0,0,1
          - 0,0,2
          - 1,0,0..2
```


# Interaction Hitbox

**Interaction-Entity Hitboxes** takes an **offset, width and height** & have no collision\
You can view the hitboxes by toggling on Hitboxes in-game with F3+B

```yaml
myitem:
  Mechanics:
    furniture:
      hitbox:
        interactions:
        # - offset width,height
          - 0,0,0 1,1
          - 1,0,0 1,2.0
          - -1,0,0 1,2.2
```


# Shulker Hitbox

**Shulker-Entity Hitboxes** takes an **offset, scale, length** and **direction**\
**Offset** only supports full blocks, as shulkers are forcefully put at a full block. Meaning you cannot offset it by 0.5 blocks\
**Scale** is a single integer and determines the scale of the furniture. You cannot scale only the height, like with Interaction-Entity Hitboxes\
**Length** determines the extra length of the hitbox, and can be between 1..2\
**Direction** determines the way the hitbox faces, if not specified, defaults to UP

{% hint style="warning" %}
This is only available for 1.20.5+ servers\
Should also be noted that the shulker-entity head will be visible on 1.21.1 & below\
It will be invisible for 1.21.2 and above as long as <https://bugs.mojang.com/browse/MC-278123> is not fixed
{% endhint %}

```yaml
myitem:
  Mechanics:
    furniture:
      hitbox:
        shulkers:
        # - offset scale length direction visible
          - 0,0,0 1.0 1.0
          - 1,0,0 1.2 1.5 EAST
          - -1,0,0 0.8 2.0 UP
```

{% hint style="info" %}
If you struggle with finding the accurate hitbox-size you want for shulker-hitboxes, you can make them temporarily visible. To do this simply add `true` after the length or direction argument
{% endhint %}


# Ghast Hitbox

**Ghast-Entity Hitboxes** are a feature for 1.21.6+ and allows for a scalable collision entity hitbox.\
It takes an **offset, scale & a rotation** property, with an optional debug true/false visible statement.\
Scale is 0.25 by default unless specified otherwise, to make it a 1-block sized hitbox.\
Rotation is 0 by default unless specified otherwise

{% hint style="warning" %}
This is only available for 1.21.6+ servers
{% endhint %}

```yaml
myitem:
  Mechanics:
    furniture:
      hitbox:
        ghasts:
        # - offset scale rotation visible
          - 0,0,0 0.25
          - 0,1,0 0.25 45
          - 0,2,0 0.25 true
```


# Text-Entities

Nexo allows you to attach Text-Entities to placed furniture to display text, [Glyphs](/configuration/glyphs) or anything else.\
You can use one, or several, all depending on what you need.\
They have a bunch of properties, most similar to [Furniture Mechanic](/mechanics/furniture-mechanic#furniture-properties), with some unique ones like;

`text` - The text to display for this Text-Entity. Can be a single line or a list of strings\
`offset` - The offset for which this entity should exist from the base-furniture\
`line_width` - The width of a line before it is wrapped to next line\
`text_opacity` - The opacity of the text\
`background_color` - The color of the background in ARGB Format; *<mark style="color:$info;">**#AARRGGBB / a,r,g,b**</mark>* | <mark style="color:$info;">Optional</mark>\
`see_through` - If the text is able to be seen through blocks; <mark style="color:$info;">Defaults to false</mark>

```yaml
arm_chair:
  itemname: Arm Chair
  material: PAPER
  Pack:
    model: nexo:item/nexo_furniture/arm_chair
    dyeable_model: nexo:item/nexo_furniture/arm_chair_dyeable
    custom_model_data: 1005
  Mechanics:
    furniture:
      # Also allows a list of text_entities;
      # text_entities:
      #   - text: "something"
      #   - text: "something2"
      text_entity: # / text_entities
        offset: 1,1,1
        text:
        - test <red>hi<gradient:red:aqua:light_purple>some text to test gradientssssss<newline>test
        - aaa aaaaaaah<newline>test test again
        tracking_rotation: CENTER
        text_opacity: -1
        line_width: 200
        alignment: LEFT
        shadow: false
        see_through: false
        translation: 0,0,0
```

<figure><img src="/files/UpZV41HbXcOsZgzoRR9p" alt=""><figcaption></figcaption></figure>


# Connectable Furniture

Feature introduced in Nexo 1.5

Nexo allows you to make furniture that can connect together to form different visual furnitures.\
An example would be a chair that can be turned into a couch, or a small table into a larger one.

<figure><img src="/files/jfP73pYaKfzK7zbO8ekY" alt=""><figcaption><p>Default Connectable furniture included in Nexo's Default Items</p></figcaption></figure>

#### Connection-Types

A connectable furniture is made up of a few different variations.\
Above you can see an example of all of these. They are used to decide when to display what.\
**DEFAULT -** The base-item, what is placed when not connected to anything\
**LEFT & RIGHT -** The left/right end of a connectable furniture\
**STRAIGHT** - The piece between a LEFT & RIGHT\
**INNER -** Corner facing inwards\
**OUTER** - Corner facing outwards

There are a few different ways to add this mechanic to your furniture-item, **ITEM\_MODEL** & **ITEM** type.

**ITEM\_MODEL** is only available for 1.21.2+ servers but is the recommended approach.\
This also allows for two different approaches when making the furniture.\
First using a "BlockState ItemModel" approach. This is the recommended as it limits the amount of files needed in your ResourcePack\
\
**ITEM** is an approach mainly intended for 1.20.4 -> 1.21.1 servers.\
This relies on NexoItems to define the model used for a connection-variation.\
The end product is the same but compared to ITEM\_MODEL, this approach requires an additional 5 NexoItems, cluttering config-files.

{% tabs fullWidth="true" %}
{% tab title="ITEM\_MODEL (1.21.2+)" %}
ITEM\_MODEL works by directly setting the ItemModel to use on the furniture, instead of going through a NexoItem.\
This requires that you provide the necessary ItemModels, but they are very easy to make.\
Nexo does not generate these ItemModels for you.

There is also two approaches you can take to this, Connection-State ItemModel and normal, basic ItemModels.

BlockState ItemModel works by making an ItemModel that shows a different Model based on a property on the item\
This means you only need to make one ItemModel JSON file.

An ItemModel is used to alter the base-model of an Item and is not the same as CustomModelData.\
An ItemModel will link to a normal Model, below are examples of the two approaches to use in Nexo.

**Connection-State ItemModel**

This is largely the same as a normal basic ItemModel, but works as a replacement for needing many.\
It works by selecting a Model based on the "connection-state" on the item.

Here is an example of a ConnectionState ItemModel. It should be fairly self-explanatory.\
The FurnitureItem displayed to the player has a tag on it specifying the connection-state.\
This in turn tells the client what model to use from this ItemModel.\
This reduces the amount of ResourcePack files needed & simplifies the NexoItem config aswell.

This ItemModel should be put in for-example; `Nexo/pack/assets/nexo/items/connectable/connectable.json`

{% code title="connectable.json" lineNumbers="true" fullWidth="true" %}

```json
{
  "model": {
    "type": "select",
    "property": "block_state",
    "block_state_property": "connectable",
    "cases": [
      {
        "when": "straight",
        "model": {
          "type": "model",
          "model": "nexo:item/nexo_furniture/connectable/connectable_straight"
        }
      },
      {
        "when": "left",
        "model": {
          "type": "model",
          "model": "nexo:item/nexo_furniture/connectable/connectable_left"
        }
      },
      {
        "when": "right",
        "model": {
          "type": "model",
          "model": "nexo:item/nexo_furniture/connectable/connectable_right"
        }
      },
      {
        "when": "inner",
        "model": {
          "type": "model",
          "model": "nexo:item/nexo_furniture/connectable/connectable_inner"
        }
      },
      {
        "when": "outer",
        "model": {
          "type": "model",
          "model": "nexo:item/nexo_furniture/connectable/connectable_outer"
        }
      }
    ],
    "fallback": {
      "type": "model",
      "model": "nexo:item/nexo_furniture/connectable/connectable"
    }
  }
}
```

{% endcode %}

Here is the NexoItem-config utilizing this ConnectionState-ItemModel. We do not need to specify any of the sub-properties.\
It will simply use the ItemModel we specify in Components section.

{% code title="connectable\_furniture.yml" %}

```yaml
connectable:
  itemname: Connectable
  Components:
    item_model: nexo:connectable/connectable
  Mechanics:
    furniture:
      connectable:
        type: ITEM_MODEL
      hitbox:
        barriers:
        - 0,0,0
```

{% endcode %}

**Normal ItemModel**

This requires you to make a basic ItemModel for each of the connection-states, which looks as follows;

{% code title="connectable.json" %}

```json
{
  "model": {
    "type": "minecraft:model",
    "model": "nexo:connectable"
  }
}
```

{% endcode %}

Now repeat this for all six connection-states, pointing to the different Models and put them in your ResourcePack.\
Example path being; `Nexo/pack/assets/nexo/items/connectable/connectable.json`

Then we just need to make the NexoItem config, and point it to the different Connection-State ItemModels it should use.

{% code title="connectable\_furniture.yml" %}

```yaml
connectable:
  itemname: Connectable
  Components:
    item_model: nexo:connectable/connectable
  Mechanics:
    furniture:
      connectable:
        type: ITEM_MODEL
        default: nexo:connectable/connectable            # We can reuse this item as we want to use the above ItemModel
        straight: nexo:connectable/connectable_straight  #If unspecified, will use default + "_straight"
        left: nexo:connectable/connectable_left          #If unspecified, will use default + "_left"
        right: nexo:connectable/connectable_right        #If unspecified, will use default + "_right"
        inner: nexo:connectable/connectable_inner        #If unspecified, will use default + "_inner"
        outer: nexo:connectable/connectable_outer        #If unspecified, will use default + "_outer"
      hitbox:
        barriers:
        - 0,0,0
```

{% endcode %}
{% endtab %}

{% tab title="ITEM (<1.21.1)" %}
The ITEM approach relies on NexoItems to choose the Model to display.\
Below is an example config of a main-item and the different sub-NexoItems for each ConnectionState

```yaml
connectable:
  itemname: Connectable
  Pack:
    model: nexo:items/nexo_furniture/connectable/connectable
  Mechanics:
    furniture:
      connectable:
        type: ITEM
        # If default is not specified it will use ItemID by default
        default: connectable            # We can reuse this item as we want to use the above model
        straight: connectable_straight  #If unspecified, will use default + "_straight"
        left: connectable_left          #If unspecified, will use default + "_left"
        right: connectable_right        #If unspecified, will use default + "_right"
        inner: connectable_inner        #If unspecified, will use default + "_inner"
        outer: connectable_outer        #If unspecified, will use default + "_outer"
      hitbox:
        barriers:
        - 0,0,0

#Dummy NexoItems for linking to a Model
connectable_straight:
  excludeFromInventory: true
  excludeFromCommands: true
  Pack:
    model: nexo:item/nexo_furniture/connectable/connectable_straight
connectable_left:
  excludeFromInventory: true
  excludeFromCommands: true
  Pack:
    model: nexo:item/nexo_furniture/connectable/connectable_left
connectable_right:
  excludeFromInventory: true
  excludeFromCommands: true
  Pack:
    model: nexo:item/nexo_furniture/connectable/connectable_right
connectable_inner:
  excludeFromInventory: true
  excludeFromCommands: true
  Pack:
    model: nexo:item/nexo_furniture/connectable/connectable_inner
connectable_outer:
  excludeFromInventory: true
  excludeFromCommands: true
  Pack:
    model: nexo:item/nexo_furniture/connectable/connectable_outer
```

{% endtab %}
{% endtabs %}


# Seat Mechanic

Using the Seat-Mechanic you can add seats to your furniture.\
Seats are configured like below, with an `x,y,z` offset

```yaml
myitem:
  Mechanics:
    furniture:
      seats:
        - 0,0.5,0
```

<figure><img src="/files/ajfWU4tLhztTAT7NP5Cy" alt=""><figcaption><p>Chair &#x26; Couch included in Nexo's Default Items</p></figcaption></figure>


# Bed Mechanic

Feature added in Nexo 1.4

Furniture can also be used as beds. Bed-positions can be configured like below.\
This can be used for both replicating normal beds, or just a furniture to lie down on.\
It is configured with an offset and properties for if it should skip nights and reset phantoms.\
A normal bed has both these to true, but you can disable it for say a bench if you want to.

```yaml
myitem:
  Mechanics:
    furniture:
      beds:
        - 0,0,0 true true # x,y,z skip-night reset-phantoms
```

<figure><img src="/files/uaQeRGv2OpzIVIOo6F57" alt=""><figcaption><p>Double-Bed included in Nexo's Default Items</p></figcaption></figure>


# Light Mechanic

Using the Light-Mechanic you can configure your furniture to emits light.\
It takes an **offset** from the base-furniture and a **light-level** between 1 & 15\
Light can also be made toggleable by adding `toggleable: true`, meaning right-clicking the furniture will toggle the light on/off.\
Using `toggled_model` you can provide a NexoItem to display when the furniture-light is toggled on\
Likewise, `toggled_item_model` lets you provide an ItemModel directly without a NexoItem to display when toggled on. Note; this is for 1.21.2+ servers only

```yaml
myitem:
  Mechanics:
    furniture:
      lights:
        #toggleable: false                    # Default is false
        #toggled_model: some_nexo_item        # The NexoItem to show when light is on
        #toggled_item_model: namespace:model  # The ItemModel to use when light is on  
        lights:
          - 0,0,0 15    # x,y,z lightLevel
```

<div><figure><img src="/files/spqwR2iuB3zd0rUmaoUc" alt=""><figcaption><p>Table Lamp included in Nexo Default Items (off)</p></figcaption></figure> <figure><img src="/files/Eh01X5O4ZE7f7SUyILMj" alt=""><figcaption><p>Table Lamp included in Nexo Default Items (on)</p></figcaption></figure></div>


# Farming Mechanic

### How does it work?

Nexo has a system for planting plants with various stages of growth, an example of how to configure it.

**delay** the time in ticks that it takes to grow\
**probability** to grow when the delay is passed\
**light\_boost** when it has light nearby it grows faster\
**bone\_meal\_chance** the probability of bonemeal making it grow to next\_stage\
**next\_stage** you specify the next stage, it has to be an already created Nexo item.

```yaml
rose_plant:
  itemname: "<gradient:#46EEAA:#2CBFC7>Rose Plant"
  material: COOKED_BEEF
  Pack:
    model: custom/plants/rose_stage_1

rose_seed:
  itemname: "<gradient:#46EEAA:#2CBFC7>Rose Seed"
  material: PAPER
  Mechanics:
    furniture:
      item: rose_plant_stage1
      evolution:
        delay: 10s
        probability: 0.5
        light_boost: true
        next_stage: rose_plant_stage1
      drop:
        silktouch: true
  Pack:
    model: custom/plants/rose_stage_1
```

### First stage

```yaml
rose_plant_stage1:
  material: PAPER
  Mechanics:
    furniture:
      evolution:
        delay: 10s
        probability: 0.5
        light_boost: true
        next_stage: rose_plant_stage2
      drop:
        silktouch: true
  Pack:
    model: custom/plants/rose_stage_1
```

### Second stage

```yaml
rose_plant_stage2:
  material: PAPER
  Mechanics:
    furniture:
      evolution:
        delay: 10s
        probability: 0.5
        light_boost: true
        next_stage: rose_plant_stage3
      drop:
        silktouch: true
  Pack:
    model: custom/plants/rose_stage_2
```

### Third stage

```yaml
rose_plant_stage3:
  material: PAPER
  Mechanics:
    furniture:
      evolution:
        delay: 10s
        probability: 0.25
        light_boost: true
      drop:
        silktouch: true
        loots:
          - { nexo_item: rose_seed, max_amount: 2, probability: 0.75 }
          - { nexo_item: rose_plant, max_amount: 5, probability: 0.55 }
  Pack:
    model: custom/plants/rose_stage_3
```

The plants can have the stages you decide, and the stages have to be a model created by you and not by the plugin for it to work. Now let's explain each mechanic **farmland\_required** It is to be placed only in fertile soil.

***


# Door Mechanic

Nexo lets you make a furniture that will act as a door.\
You can also specify a few extra options for additional behaviour:

**toggle\_hitbox\_on\_open** - Changes the hitbox from barriers to interactions when opened\
**open\_sound -** The sound to play when opening the door\
**close\_sound -** The sound to play when closing the door\
**open\_properties - T**he same as [Furniture Properties](/mechanics/furniture-mechanic#furniture-properties), but only applied in open-state\
**is\_sliding -** If the door is sliding type or normal type\
**automatic\_close\_delay -** A duration of time before the door will close when opened (1t, 2s, 3m, etc...)\
**delay\_hitbox\_toggle -** If the swap to non-solid hitbox should be delayed until door is fully opened

There is also a new **delay-property** which defines the "time to open" for the door.\
If left unspecified, the door immediatly changes state

There is also two types of doors, normal and sliding. A sliding door opens by applying the open\_properties transformations, whilst a normal door applies a rotation

**Config Examples:**

{% columns fullWidth="true" %}
{% column width="50%" %}
{% code fullWidth="false" %}

```yaml
large_wooden_door:
  itemname: Large Wooden Door
  Pack:
    model: nexo:item/nexo_furniture/large_wooden_door
  Mechanics:
    furniture:
      limited_placing:
        floor: true
      hitbox:
        barriers: 0..1,0..2,0
      block_sounds:
        place_sound: block.wood.place
        break_sound: block.wood.break
      properties:
        translation: 0,1,0
        delay: 4t
      door:
        open_sound: block.wooden_door.open
        close_sound: block.wooden_door.close
        toggle_hitbox_on_open: true
        open_properties:
          translation: -0.85,1,0
```

{% endcode %}
{% endcolumn %}

{% column width="50%" %}
{% code fullWidth="true" %}

```yaml
large_wooden_sliding_door:
  itemname: Large Wooden Sliding Door
  Pack:
    model: nexo:item/nexo_furniture/large_wooden_door
  Mechanics:
    furniture:
      limited_placing:
        floor: true
      hitbox:
        barriers: 0..1,0..2,0
      block_sounds:
        place_sound: block.wood.place
        break_sound: block.wood.break
      properties:
        translation: 0,1,0
        delay: 4t
      door:
        is_sliding: true
        open_sound: block.wooden_door.open
        close_sound: block.wooden_door.close
        toggle_hitbox_on_open: true
        open_properties:
          translation: -1.5,1,0
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2Fs8AfcHvnoLucixCBnQlR%2F2025-08-19%2015-57-54.mp4?alt=media&token=cc47ff3d-876b-46a0-8c02-ec72d214423f>" %}


# Custom Block Mechanics

Nexo has several options for making Custom Blocks.\
They all come with a few restrictions due to the nature of how custom blocks can be implemented.\
NOTEBLOCK type custom blocks are for normal 1x1x1 blocks like Stone, Dirt etc...\
It uses the vanilla NoteBlock and thus disables most of the redstone functionality for it\
\
CHORUSBLOCK type custom blocks are based on the Chorus Plant block.\
It is mainly used for transparent blocks, like leaves.\
The hitbox is not a normal 1x1x1 so it is adviced to only use this for transparent block needs\
\
STRINGBLOCK type custom blocks are for plants, decoration etc...\
It uses the vanilla TripWire block and thus disables most of the redstone functionality for it

{% hint style="danger" %}
On all Paper-Servers you are HEAVILY recommended to disable block-updates for the types of custom blocks you plan to use.\
These can be found in \`MyServerFolder/configs/paper-global.yml\`
{% endhint %}

{% hint style="warning" %}
Due to the nature of Custom Blocks, these for the most part completely disable the original blocks vanilla functionality.\
NOTEBLOCK-type does have an option to "reimplement" the functionality, but it has some minor flaws.\
STRINGBLOCK-type completely disables vanilla functionality.\
If you want either of these, you will likely have to disable these mechanics.
{% endhint %}


# ChorusBlock Mechanic

{% hint style="info" %}
CHORUSBLOCK-type allows for up-to **63** custom blocks.\
One per `custom_variation`
{% endhint %}

### Creating your first block

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

#### Parent-Model

The Nexo-item root configuration is the same as for any item (you can use any material like a diamond for example) and set an itemname, etc.\
It is recommended to not use a block for your material, sticking to such materials as PAPER\
For the pack section you can use your own model or texture for your block.\
If all you have is a texture, you can specify a parent\_model and Nexo will generate the needed files for you. A Normal 1x1x1 block uses "block/cube\_all"

```yaml
my_block:
  itemname: "My block"
  material: PAPER
  Pack:
    parent_model: "block/cube_all"
    texture: my_block_texture.png
```

### CustomBlock Mechanic configuration

To use this mechanic you need to tell to Nexo which model to use (to use the generated one, just put the name id of your item).\
You then need to use custom\_variation which is not already used by another block.\
Valid custom\_variation is 1..63

```yaml
my_block:
  Mechanics:
    custom_block:
      type: CHORUSBLOCK
      custom_variation: 2
      model: my_block
      drop:
        silktouch: false
        minimal_type: STONE
        loots:
          - nexo_item: my_block
            probability: 1.0
```


# NoteBlock Mechanic

How to add your own blocks to the game

{% hint style="info" %}
NOTEBLOCK-type allows for up-to **1149** custom blocks.\
One per `custom_variation`
{% endhint %}

## How to create a simple block?

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

### Parent Models

The Nexo-item root configuration is the same as for any item (you can use any material like a diamond for example) and set an itemname, etc.\
It is recommended to not use a block for your material, sticking to such materials as PAPER\
For the pack section you can use your own model or texture for your block.\
If all you have is a texture, you can specify a parent\_model and Nexo will generate the needed files for you. A Normal 1x1x1 block uses "block/cube\_all"

```yaml
my_block:
  itemname: "My block"
  material: DIAMOND
  Pack:
    parent_model: "block/cube_all"
    texture: my_block_texture.png
```

Each of these parent models take a different amount of textures.\
`block/cube_all` takes 1 texture, `block/cube_column` takes 2, `block/cross` takes 1, `block/orientable` takes 3 and `block/orientable_vertical` takes 2.\
For example, if you want to make a log block using the Directional Block mechanic, you should use `block/cube_column`.

All the vanilla models can be found at [MCAsset](https://mcasset.cloud/1.21.3/assets/minecraft/models/block). Find the one you want to use for your usecase.\
Recommend using a "texture map" in the config for multi-texture setups.

```yaml
my_block:
  itemname: "My block"
  material: DIAMOND
  Pack:
    parent_model: "block/cube_top"
    textures:
      side: my_side_texture.png
      top: my_top_texture.png
```

### CustomBlock Mechanic configuration

To use this mechanic you need to tell to Nexo which model to use (to use the generated one, just put the name id of your item).

A Custom Block must also be assigned unique *custom\_variation*. This is a number between 1 & 1149.\
If unspecified, Nexo will automatically set one for you.

Keep in mind this should not be changed after a block is being used. The only think linking a placed block to a given NexoItem is its BlockData, which is defined by this variation

<pre class="language-yaml"><code class="lang-yaml">my_block:
<strong>  Mechanics:
</strong>    custom_block:
      type: NOTEBLOCK
      custom_variation: 2
      model: my_block
      drop:
        silktouch: false 
        minimal_type: STONE
</code></pre>

### Custom Sounds

Furniture, like custom blocks, can have custom sounds

```yaml
myitem:
  Mechanics:
    custom_block:
      block_sounds:
        place_sound: block.stone.place
        break_sound: block.stone.break
        hit_sound: my.custom.hitsound     # Custom sound as defined in Nexo/sounds.yml
        step_sound: my.custom.stepsound   # Requires a sound-file in the Nexo/pack-folder aswell
        fall_sound: my.custom.fallsound
```

All the volume and pitch values are set to be what Minecraft uses for blocks normally.\
If you want to change the volume or pitch, you can do so by using the format below.\
Keep in mind these two formats are compatible with eachother.\
We recommend just use the default one, but the option is there if you want to change it.

```yaml
myitem:
  Mechanics:
    custom_block:
      block_sounds:
        place:
          sound: block.stone.place
          volume: 1.0
          pitch: 0.2
        break_sound: block.stone.break
        hit_sound: my.custom.hitsound     # Custom sound as defined in Nexo/sounds.yml
        step_sound: my.custom.stepsound   # Requires a sound-file in the Nexo/pack-folder aswell
        fall_sound: my.custom.fallsound
```

### Customize the breaking speed

You can customize the breaking speed and the most suitable tools with the hardness subsection.\
`drop.best_tool` dictates the "preferred tool" for this block which further tweaks the speed

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      custom_variation: 2
      model: my_block
      hardness: 20 # this makes it really hard to mine
      drop:
        silktouch: false 
        minimal_type: STONE
        best_tool: PICKAXE
```

### Custom Drops

By default a Nexo CustomBlock will drop itself when mined. This can be changed if you want and customized with several properties.

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      drop:
        silktouch: false    # If Silktouch will make the block drop itself
        fortune: false      # If fortune should affect the amount of items dropped
        minimal_type: null  # Refers to the lowest material, if any, this drop requires
        best_tool: null     # Refers to the type of tool, if any, this drop requires
        loots:
          - nexo_item: my_item
          - minecraft_type: DIAMOND
            amount: 1
          - crucible_item: my_crucible_item
            amount: 1..2
          - mmoitem_type: TYPE
            mmoitem_id: ID
            probability: 1.0
```

**minimal\_type -** Refers to a tier of material the drop will require. This can be *WOODEN, STONE, IRON, GOLDEN, DIAMOND* or *NETHERITE.* This also supports ItemType-Mechanic if it is specified in `mechanics.yml` `tool_types` list. If unspecified it is null, or no specific type required.

**best\_tool -** Refers to the type of tool this drop requires, if any. This can be *AXE, PICKAXE, SWORD, SHOVEL & HOE.* If unspecified it is null, or no specific tool required.

### Limited placing

You can customize what blocks a custom block/furniture can be placed on with `limited_placing` subsection. You can use the `roof`, `floor` and `wall` options to dictate where a block can be placed. By default, all are set to `true`.\
The `type` specifies if it should only be allowed on or denied on specific blocks.\
If type is `ALLOW` the block can only be placed on the given blocks.\
If the type is `DENY` can be placed on all blocks not matching the given blocks.

```yaml
amethyst_ore:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      limited_placing:
        roof: true
        floor: true
        wall: true
        type: ALLOW
        block_types:
          - GRASS_BLOCK
          - DIRT
        block_tags:
          - base_stone_nether
        nexo_blocks:
          - chair
          - ruby_ore
```

The `block_tags` can be found at [this page](https://minecraft.fandom.com/wiki/Tag#Block_tags). Useful if you want to allow/deny a group of blocks.\
The `block_types` are materials. Useful if you want to allow/deny a specific list block.\
The `nexo_blocks` are blocks defined in the nexo configuration.\
This allows all custom blocks and furniture in here, but furniture requires a barrier-hitbox.

### Beacon Base

You can also make a custom block work in beacons with the following:

{% code lineNumbers="true" %}

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      beacon_base_block: true
```

{% endcode %}

{% hint style="info" %}
A beacon will "activate" if any noteblock is in the pyramid, but the effect is only given when said noteblock(s) are base\_beacon\_blocks\
This is because it requires a Datapack that adds noteblocks to the given Tag, but it does not support individual blockstates
{% endhint %}

### Blast-Resistant

You can make your custom-block blast-resistant by adding the following.\
If unspecified it defaults to false.\
You can also make your block drop something when it explodes by adding `in_explosion: true`to your Loot like below

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      blast_resistant: true
      drop:
        loots:
          - nexo_item: my_block
            in_explosion: true
```

### BlockLocker

You can use this to allow protection via [BlockLocker](https://www.spigotmc.org/resources/blocklocker.3268/) Valid protectionTypes are CONTAINER, DOOR, ATTACHABLE

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      blocklocker:
        can_protect: true
        protection_type: CONTAINER
```

### Storage

This is a sub-mechanic for furniture and noteblock mechanics, that let you make a custom storage container.\
Essentially a chest, closet or whatever you might want.

There's a few different types: *STORAGE, PERSONAL, ENDERCHEST & DISPOSAL*.\
**STORAGE** is similar to a normal chest. Anyone can open it and view the content of it.\
**PERSONAL** is essentially a custom enderchest, letting you edit the row-count and so on.\
**ENDERCHEST** is literally just the enderchest inventory, but letting you make a custom block/furniture to access it.\
**DISPOSAL** is a custom trashcan, letting you throw items in it, and they will be deleted when closed.\\

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      storage:
        type: STORAGE
        rows: 5                             # Default: 6
        title: "<red>My Storage"            # Default: "Storage"
        open_sound: entity.shulker.open     # Default: entity.chest.open
        close_sound: entity.shulker.close   # Default: entity.chest.close
```

### Falling Blocks

This is a sub-mechanic that mimics sand & gravel for your custom block. Placing it next to another block, with no block beneath, will make it fall

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      is_falling: true # Default to false if unspecified
```


# Stripped Log Mechanic

## What is this?

This mechanic allows you to strip custom logs in to stripped version, like in vanilla.

### Configuration

```yaml
my_block:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      custom_variation: 2
      log_strip:
        stripped_log: stripped_log #block that will change in to
        drop: bark #additonal drop after right click mechanic
```

{% embed url="<https://youtu.be/ohiGtlz_who>" %}


# Directional Mechanic

This mechanic allows you to place blocks and have them change their texture depending on the direction in which they are placed, like for example logs.\
There are 4 types of directional blocks: **LOG, BARREL, FURNACE & DROPPER**

**LOG** is made up of 3 Custom Block variations, to mimic behaviour of a vanilla log\
**BARREL** is made up of 6 Custom Block variations. It s used for when you need a block to be rotatable in all 6 directions (north, west, south, east, up & down)

**FURNACE** is made up of 4 Custom Block variations. It is for when you want a block that rotates to face the player with a front in the 4 horizontal directions (north, south, east, west)\
**DROPPER** is made up of 6 Custom Block variations. It is for the same purpose as **Furnace** but with support for up & down facings as well.

{% hint style="info" %}
Every sub-block can have a `model` property, which Nexo will use to determine what to display.\
If there is no `model` property on the sub-block, Nexo will use the model from the parent-block.
{% endhint %}

{% hint style="info" %}
Models are also automatically rotated depending on the direction in which the block is placed.\
This means you can use the same model, and it will be rotated accordingly.\
If the sub-block has a model defined, it will not be rotated, allowing you to use different models for different directions.
{% endhint %}

{% embed url="<https://user-images.githubusercontent.com/62521371/167680557-750dac77-b4c4-4804-9513-184d776a012d.mp4>" %}

### Configuration

The most basic of configuration setups for a directional blocks is reusing the same model and having it be rotated accordingly. Below is such an example

```yaml
custom_log:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      directional:
        type: LOG
```

Nexo will here automatically generate 3 fake dummy-items for each direction and assign a `custom_variation` for each. The config will then look something like this after

```yaml
custom_log:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      directional:
        type: LOG
        y_variation: 1
        x_variation: 2
        z_variation: 3
      custom_variation: 1 #This can be the same as y-variation to save 1 block-slot
```

This applies to the three other types aswell; BARREL, FURNACE & DROPPER.\
You can also set a model explicitly for each rotation like shown in DROPPER example.\
If this is done, Nexo will not apply the standard rotations to it.


# StringBlock Mechanic

{% hint style="info" %}
STRINGBLOCK-type allows for up-to **127** custom blocks.\
One per `custom_variation`

Another quirk with this CustomBlock is that it has 2 different hitbox-states\
All variations after 64 will have a smaller hitbox than those before.
{% endhint %}

## How does it work?

This is a type of CustomBlock best aimed at plants, rocks and other foliage.\
It uses the vanilla TripWire block and therefore will disable all normal behaviour TripWires might have.

## How do I create a StringBlock?

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

### Nexo Resourcepack configuration

Below is an example of how to configure the model/texture to use.\
`block/cross` is what normal vanilla plants use and allows for converting a 2d-texture into a block.\
If you want an example, look at RoseBushes in-game.

```yaml
jasmine_flower:
  itemname: "<white>Jasmine Flower"
  material: PAPER
  Pack:
    parent_model: "block/cross"
    texture: custom/flowers/jasmine_flower.png # .png extension is not mandatory
```

### StringBlock Mechanic Configuration

To use this mechanic you need to tell nexo which model to use (to use the generated one, just put the id name of your item).\
Then you need to use custom\_variation that is not already used by another decoration.\
You can also configure the hardness of the block, which specifies how long a block should take to break.\
`drop.best_tool` allows you to specify which tool should be best.\
An example would be PICKAXE for a small stone

```yaml
jasmine_flower:
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      custom_variation: 2
      model: jasmine_flower
      hardness: 2
      drop:
        silktouch: false
```

## Sub-Properties

### Placeable On Water

`placeable_on_water` lets you make a stringblock only placeable when placed on water.\
This aims to mimic how Lilypads work in vanilla. Defaults to false

```yaml
placeable_on_water:
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      placeable_on_water: true
```

***

### Requires Supporting

`requires_supporting` will make the block "unstable" and make it break when the block beneath it is broken. Defaults to false

```yaml
placeable_on_water:
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      requires_supporting: true
```

### Random Place

This takes a list of strings representing other stringblock-mechanics.\
It will then select a random one to place when placing this item.

```yaml
random_place:
  Mechaincs:
    custom_block:
      type: STRINGBLOCK
      custom_variation: 1
      random_place:
        - random_place
        - random_place2
        - random_place3
random_place2:
 Mechanics:
   custom_block:
     type: STRINGBLOCK
     custom_variation: 2
random_place3:
 Mechanics:
   custom_block:
     type: STRINGBLOCK
     custom_variation: 3
```

***

### Tall Plants

Nexo has a `is_tall` - property which makes the STRINGBLOCK take up two spaces, similar to Tall Grass. This requires using a specific parent-model and two separate textures, for the top and bottom block. Nexo also provides a default parent-model for use with this.\
Below is an example config using two different PNGs

```yaml
plant:
  Pack:
    parent_model: nexo:block/tall_plant
    textures:
      bottom: bottom_texture
      top: top_texture
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      is_tall: true
      
```

***

### Sapling

```yaml
sapling:
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      sapling:
        grows_naturally: true # if you want only the player can grow it
        natural_growth_time: 6000 #in ticks
        grows_from_bonemeal: true
        bonemeal_growth_speedup: 1250
        grow_sound: block.grass.break
        min_light_level: 4
        requires_water_source: false #if you want it to need water
        schematic: schemTest #structure that will put
        # this also allows you to use a list of schematics:
        # schematic:
        # - schem: palmTree1
        #   chance: 0.5
        # - schem: palmTree2
        #   chance: 0.5
        replace_blocks: false
        copy_biomes: false
        copy_entities: false
```

You can also add some randomness to the growth, or just increase the delay between checks.\
Go into `mechanics.yml` and under stringblock-mechanic, adjust `sapling_growth_check_delay`\
This is in ticks, so 20 = 1 second.

For your sapling to work and grow make sure you have created a `schematics` folder in Nexo and copy all your schems from FAWE into the schematics folder. If this is not done, your sapling will not work at all.

***

### Stackable

This lets you make a block which can be stacked, much like Pink Petals. This will alter the model shown and the drop amount given when it is broken. Below is an example using carrots.\
If you only have Textures and not Models, you will need to either make them or make dummy NexoItems that then generates this Model for you.

```yaml
stackable:
  material: PAPER
  Pack:
    model: item/carrot
  Mechanics:
    custom_block:
      type: STRINGBLOCK
      model: block/carrots_stage0
      stackable:
        - model: block/carrots_stage1
        - model: block/carrots_stage2
        - model: block/carrots_stage3
```

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FLF3sBKNIAHWhqnPAtzxZ%2Foutput.mp4?alt=media&token=382dfe8a-1cd5-4fbb-b50d-ab8224048f7a>" %}

***

### BlockLocker

You can use this to allow protection via [BlockLocker](https://www.spigotmc.org/resources/blocklocker.3268/)\
Valid protectionTypes are CONTAINER, DOOR, ATTACHABLE

```yaml
Mechanics:
  custom_block:
    type: STRINGBLOCK
    blocklocker:
      can_protect: true
      protection_type: CONTAINER
```

![](https://cdn.discordapp.com/attachments/958524021035647046/961424759718047784/unknown.png)


# Custom Trident

Nexo allows you to make custom tridents and trident-projectiles.\
This feature will work best on 1.21.4+ servers but will also work on lower ones\
The Trident-mechanic is pretty straight-forward, but also has some optional properties, mainly applicable to lower versions.

By default any item using TRIDENT as it's material is a Custom Trident\
The Trident-Mechanic is not strictly necessary unless one wants to tweak the properties

### Properties

`thrown_item_model` - The ItemModel to show on the Trident-projectile. This only applies to 1.21.4+ servers. If unspecified it will default to `Components.item_model` if specified.\
`thrown_item` - Refers to the NexoItem to display for the Projectile. Defaults to the item of this mechanic if unspecified\
`display_transform` - Lets you set the Transform the model should use, mainly useful when not using a separate ItemModel\
`rotation` - Lets you rotate the base yaw/pitch of the projectile\
`damage` - The base-damage the Trident will do when hitting an entity, defaults to 8\
`sounds` - The sounds the Trident should make, defaults to replicating vanilla.

#### Trident Sounds

```yaml
forest_trident:
  Mechanics:
    trident:
      sounds:
        throw: my.throw.sound
        hit: # Optional format for specifying volume and/or pitch
          sound: my.hit.sound
          volume: 1.1
          pitch: 1.0 # Optional, defaults to 1.0
        #hit_ground: my.hit_ground.sound
        ##return: my.return.sound
```

{% hint style="info" %}
If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FcMJ3GKLdbXDZofLDSj1A%2F2025-05-06_18-25-55_1.mp4?alt=media&token=8d6ffd64-06d1-4340-aa1f-6d10d5d2e84d>" %}
Showcasing Forest Trident
{% endembed %}

{% tabs fullWidth="true" %}
{% tab title="ItemModel (1.21.4+)" %}
For 1.21.4+ servers there are two approaches you can take, one being manually making the ItemModel, or let Nexo do it for you.

You will need 2 **Models** and 1 **NexoItem-Config** at minimum.

**Simple Method**

The simplest method is to let Nexo generate the **ItemModel** for you. For this you will need a NexoItem-Config like shown below. This specified a model & throwing\_model in Pack, which Nexo will use when making the ItemModel. The throwing\_model is usually the same as the model, but flipped in hand in programs like BlockBench

```yaml
forest_trident:
  itemname: Forest Trident
  material: TRIDENT
  Pack:
    model: nexo:item/nexo_tools/forest_trident
    throwing_model: nexo:item/nexo_tools/forest_trident_throwing
  Mechanics:
    trident:
      display_transform: HEAD
```

**Manual Method**

If you want to manually provide the **ItemModel** you will need a simplified config like below;

```yaml
forest_trident:
  itemname: Forest Trident
  material: TRIDENT
  Components:
    item_model: nexo:forest_trident
  Mechanics:
    trident:
      display_transform: HEAD
```

\
The Forest Trident Nexo comes with uses a unified ItemModel to dictate when to show what model.\
This is mainly for displaying a different model when held/icon/throwing.\
Like the normal trident-item, which has a 2d Icon in GUIs, then also held in hand one way when throwing and normal.\
Below is the example Forest-Trident **ItemModel** Nexo comes with:

```json
{
  "model": {
      "type": "minecraft:condition",
      "property": "minecraft:using_item",
      "on_false": {
        "type": "minecraft:model",
        "model": "nexo:item/nexo_tools/forest_trident"
      },
      "on_true": {
        "type": "minecraft:model",
        "model": "nexo:item/nexo_tools/forest_trident_throwing"
      }
    }
}
```

This has a different **Model** based on the condition if the item is being used or not.\
This then goes into `assets/nexo/items/forest_trident.json` and is referenced in the NexoItem like below\
As shown above this **ItemModel** then links to two separate normal JSON-**Models**:\
`assets/nexo/models/item/nexo_tools/forest_trident.json`\
`assets/nexo/models/item/nexo_tools/forest_trident_throwing.json`

<div><figure><img src="/files/Buudkvs35u8GB2XgwdJO" alt=""><figcaption><p>Forest Trident with the normal default Model</p></figcaption></figure> <figure><img src="/files/qhFPPJqwgc7LjTMV6oHJ" alt=""><figcaption><p>Forest Trident in the "throwing" model, rotated</p></figcaption></figure></div>
{% endtab %}

{% tab title="NexoItem (1.21.1+)" %}

```yaml
forest_trident:
  itemname: Forest Trident
  material: TRIDENT
  Pack:
    model: nexo:item/nexo_tools/forest_trident
  Mechanics:
    trident:
      thrown_item: forest_trident_throwing
      display_transform: HEAD

forest_trident_thrown:
  excludeFromCommands: true
  excludeFromInventory: true
  Pack:
    model: nexo:item/nexo_tools/forest_trident_throwing
```

{% endtab %}
{% endtabs %}


# ClickAction Mechanic

Run commands, play sounds, or send messages when a player clicks a block or furniture.

To get started, create a basic [Custom Block](/mechanics/custom-block-mechanics/noteblock-mechanic) or [Furniture](/mechanics/furniture-mechanic).

Next, under the mechanics section, you can add the default clickAction mechanic under any\
CustomBlock or Furniture-Mechanic

```yaml
myitem:
  Mechanics:      
    furniture/custom_block:
      clickActions:
        - conditions:
            - '#player.hasPermission("test.permission")'
          actions:
            - '[console] say <player> hello <player>!'
```

With this setup, players will only trigger the console command `say hello <player>` action if they have the permission `test.permission`.

If you are not using conditions, you need to place brackets where they would be:

```yaml
myitem:
  Mechanics:
    furniture/custom_block:
      clickActions:
        - conditions: []
          actions:
            - '[console] say <player> hello <player>!'
```

### Conditions

Conditions are VERY configurable. You can use any of the "get" methods for Player or Server.\
A list of all methods you can use can be found on Papers Javadocs

{% embed url="<https://jd.papermc.io/paper/1.21.8/org/bukkit/entity/Player.html>" %}

{% embed url="<https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html>" %}
TIP! Click "CTRL + F" and search "get" to find valid methods.
{% endembed %}

Additionally, the Spring Documentation is a good resource for understanding how to use condition expressions.

{% embed url="<https://docs.spring.io/spring-framework/docs/3.0.x/reference/expressions.html>" %}

You can also do a negative check by prefixing the condition with `!` . as an example;

```yaml
myitem:
  Mechanics:      
    furniture/custom_block:
      clickActions:
        - conditions:
            - '!#player.hasPermission("test.permission")'
          actions:
            - '[console] say <player> hello <player>!'
```

This will run the action when the player does not have the **test.permission** permission.

#### Condition Examples

`#server.getOnlinePlayers().size() > 10`

`#server.getAllowEnd()`

`#server.getDefaultGameMode()`

`#player.world.name == 'world'`

`#player.hasPermission("test.permission")`

`#player.gamemode.name() == 'ADVENTURE'`

### Actions

`[console] <command>`

`[player] <command>`

`[message] <message>`

`[actionbar] <message>`

`{source=SOURCE volume=VOLUME pitch=PITCH} [sound] <sound name>`

#### Action Examples

`[console] say hello`

`[player] say hello`

`[message] <blue>Hello!`

`[actionbar] <gray>Hello from the actionbar!`

`{source=AMBIENT volume=0.1 pitch=1} [sound] minecraft:block.shulker_box.close`


# Custom Mechanic

This mechanism allows you to realize an extremely customizable mechanism without programming

## How does it work?

This mechanic is for items only and does not work with blocks/furniture.\
For that check the [clickAction mechanic](/mechanics/clickaction-mechanic). The mechanics let you create subsections composed of 3 parts:

* **Event**: when is this mechanic triggered? e.g. when you right-click on a block
* **Conditions**: a set of conditions that must be satisfied. e.g. having a permission
* **Actions**: a set of actions to perform. e.g. send a command or a message

{% hint style="info" %}
An optional settings called one\_usage allows you to imitate the use of an item at 1.
{% endhint %}

## A comprehensive example

```yaml
myitem:
  Mechanics:
    custom:
      test:
        one_usage: false
        event: "CLICK:right:all"
        conditions:
          - '#player.hasPermission("example.permission")'
        actions:
          - "[console] give <player> cooked_beef 1"
```

In this example, the subsection `test` defines a custom mechanic triggered when someone right click (on a block or in the air).\
If this player has the permission `example.permission`, the console will perform the give command and replace \<player> by the player name.\
The item won't be consumed (one\_usage: false).

## Available events

### CLICK:click\_type:target\_type[^1],

### INV\_CLICK:click\_type:context\_type[^2]

### DROP[^3], PICKUP[^4], BREAK[^5], EQUIP[^6], UNEQUIP[^7], INV\_CLICK[^8], DEATH[^9], DROP\_ALL[^10]

## Available conditions

### Permission-Condition

```yaml
myitem:
  Mechanics:
    custom:
      mycustom:
        conditions:
          - "HAS_PERMISSION:some.permission"
```

## Available actions

### Command-Action

This action lets you run a command either from console or as the player

```yaml
myitem:
  Mechanics:
    custom:
      mycustom:
        event: "CLICK:right:all"
        actions:
          - "[console] minecraft:give <player> minecraft:paper 2"
          - "[player] minecraft:give <player> minecraft:paper 2"
```

### Message-Action

```yaml
myitem:
  Mechanics:
    custom:
      mycustom:
        event: "CLICK:right:all"
        actions:
          - "[message] <red>some message <gradient:red:blue>with MiniMessage support"
```

### ActionBar-Action

```yaml
myitem:
  Mechanics:
    custom:
      mycustom:
        event: "CLICK:right:all"
        actions:
          - "[actionbar] <red>some message <gradient:red:blue>with MiniMessage support"
```

### Sound-Action

This action lets you play a sound at a location or at a target with customizable values

**source -** The source of the sound ([List of sources](https://jd.advntr.dev/api/4.21.0/net/kyori/adventure/sound/Sound.Source.html))\
**volume** - The volume to play the sound with\
**pitch** - The pitch to play the sound with\
**self** - If the sound sound be played at the Player and not at a location

Followed by the sound-key to play

```yaml
myitem:
  Mechanics:
    custom:
      mycustom:
        event: "CLICK:right:all"
        actions:
          - "{source=AMBIENT volume=0.1 pitch=1} [sound] namespace:soundkey"
```

[^1]: Called when you click with the item.\
    \
    If either of the below is unspecified, it will default to "all" handling\\

    **mouse\_click\_type**: `[ right, left, all ]`\
    **target\_type**: `[ block, air, all ]`

[^2]: Called when you click an item in a GUI.\
    \
    If either of the below is unspecified, it will default to "all" handling\\

    **click\_type**: `[ right, left, all ]`\
    **context\_type**:

    `[ shift, all ]`

[^3]: Called when you drop the item.

[^4]: Called when you pick up the item.

[^5]: Called when a player breaks an item.

[^6]: Called when a player equips an item.

[^7]: Called when a player unequips an item.

[^8]: Called when a player clicks an item in an inventory.

[^9]: Called when a player dies and would normally drop the given item.

[^10]: Called when a player drops an item and no longer has any similar items in their inventory.


# Other Mechanics

The different mechanics available by default and their configurations sorted by category

## Miscellaneous

### Backpack

This allows you to turn any item into a backpack.

{% hint style="info" %}
This mechanic might cause duplication issues!\
If you find any please open a [bug-report](/mechanics/all-mechanics) and we will fix them as soon as possible!\\
{% endhint %}

```yml
backpack:
  itemname: backpack
  material: PAPER
  Components:
    max_stack_size: 1
  Mechanics:
    backpack:
      rows: 4
      title: "<red>Backpack"                  #Optional, Default: "Backpack"
      open_sound: "entity.shulker.open"       #Optional, Default: "entity.shulker.open"
      close_sound: "entity.shulker.close"     #Optional, Default: "entity.shulker.close"
      blacklist:                              #Optional, add which items are not allowed
        nexo_items:
          - item_id
          - item_id2
        materials:
          - DIAMOND
```

### Misc Mechanic

{% hint style="warning" %}
On 1.20.5+ use the new [FireResistant-Component](/configuration/items) instead of **burns\_in\_x**
{% endhint %}

This mechanic has a bunch of small changes you can make to your item.\
What they each do should be pretty self-explanatory.

```yaml
myitem:
  Mechanics:
    misc:
      breaks_from_cactus: true
      burns_in_fire: true
      burns_in_lava: true
      disable_vanilla_interactions: false
      can_strip_logs: false
      piglins_ignore_when_equipped: false
      compostable: false
      allow_in_vanilla_recipes: true
```

### Commands

This allows you to execute commands (as the console, a player or op player). If this option is not often the most elegant it has the merit of simplifying a lot of things. You can create a cooldown between usages, check if the player has a specific permission and use the item (understand decrease its amount by one when the command is performed).

```yaml
myitem:
  Mechanics:
    commands:
      cooldown: 5 # example cooldown in seconds. This is optional
      permission: "my.awesome.perm" # required permission. This is optional
      one_usage: true # should the amount decrease when used? Default: false
      console:
        # e.g. to kill the player
        - "kill %p%"
      player:
        # e.g. the player performs /spawn
        - "spawn"
      opped_player:
        # e.g. the player gives himself a diamond sword
        - "give diamond_sword 1"
```

### Armor Effects

This allows you to bind a Potion Effect to an armor (or a hat) so that when you equip it you'll get the effect.\
[Here](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/potion/PotionEffectType.html) is a list of all potion effect types available.

```yaml
myitem:
  Mechanics:
    armor_effects:
      night_vision: # the potion effect type
        duration: 10t
        amplifier: 0
        ambient: true # Makes potion effect produce more, translucent, particles.
        particles: true # whether this effect has particles or not
        icon: true # whether this effect has an icon or not
```

You can also make an effect only apply if the entire set it equipped.

```yaml
myitem:
  Mechanics:
    armor_effects:
      night_vision:
        requires_full_set: true
        ...
```

### clickAction

This mechanic allows you to run various events when a player clicks a block or furniture. It is very customizable, so it also has a [dedicated tutorial page](/mechanics/clickaction-mechanic).

### ItemType

With this mechanic, you can change the item type detected by NexoBlocks. Make sure to use a type declared [inside the block mechanic](/mechanics/custom-block-mechanics/noteblock-mechanic#global-configuration).

```yaml
myitem:
  Mechanics:
    itemtype:
      value: SUPER_MATERIAL # your itemType
```

### Soulbound

With this mechanic, you can avoid the players to lose their item when they die.

```yaml
myitem:
  Mechanics:
    soulbound:
      lose_chance: 0
```

### Custom mechanic

This mechanic allows you to customize events, conditions and actions.\
Since it is a quite rspecial mechanic, it has its [dedicated tutorial page](/mechanics/custom-mechanic).

## Farming

### Harvesting

Harvesting allows you to recolt and replant automatically wheat in a certain radius.

```yaml
myitem:
  Mechanics:
    harvesting:
      cooldown: 10000 # 10 seconds between usages
      radius: 5 # blocks surrounding the clicked block
      height: 3 # high
```

### Smelting

Smelting allows you to instantly melt iron and gold ores when you mine them. This supports fortune and silktouch.

```yaml
myitem:
  Mechanics:
    smelting:
      enabled: true
      play_sound: true
```


# Carpentry

This is an addon for Nexo that adds several new CustomBlock types.\
It allows for custom doors, trapdoors, stairs, slabs and transparent blocks.\
Below will be examples for each of the different types

[Polymart](https://polymart.org/product/7640/carpentry-nexo-addon) | [MCModels](https://mcmodels.net/products/13997/carpentry)

<figure><img src="/files/bm929FU9QcZbi1LMm6sJ" alt=""><figcaption><p>Default Ashen Oak wood-set included in Carpentry's Default Items</p></figcaption></figure>

{% hint style="warning" %}
Note that each of the types are currently limited to only 4 variations.

If you are unsure how to reference a ResourcePack-File in a NexoItem config; [FAQ](/general-usage/faq#how-do-i-reference-a-resourcepack-file-in-a-config)
{% endhint %}

### Custom Stairs

```yaml
custom_stair:
  material: PAPER
  itemname: Custom Stair
  Pack:
    parent_model: block/stairs
    texture: nexo:items/carpentry_blocks/ashen_oak_planks
    #textures:                      # Example if one wants different textures
    #  bottom: block/reinforced_deepslate_bottom
    #  side: block/reinforced_deepslate_side
    #  top: block/reinforced_deepslate_top
  Mechanics:
    custom_block:
      type: STAIR
      custom_variation: 1          # 1-4 are available
```

### Custom Slabs

```yaml
custom_slab:
  material: PAPER
  itemname: Custom Slab
  Pack:
    parent_model: block/slab
    texture: nexo:items/carpentry_blocks/ashen_oak_planks
    #textures:                      # Example if one wants different textures
    #  bottom: block/reinforced_deepslate_bottom
    #  side: block/reinforced_deepslate_side
    #  top: block/reinforced_deepslate_top
  Mechanics:
    custom_block:
      type: SLAB
      custom_variation: 1          # 1-4 are available
```

### Custom Doors

Door-setup is a bit different than the other blocks, as it requires two configs.\
This is because the item-model in hand will look incorrect if it uses the block-parent-models\
The second config is just so that Nexo generates the necessary models\
If you provide your own json-model, you can skip the second config\\

ItemConfig for held item:

```yaml
custom_door:
  material: PAPER
  itemname: Custom Door
  Pack:
    parent_model: item/generated   # This is used for the item when held in hand
    # The texture to use for the item in hand
    texture: nexo:items/carpentry_blocks/ashen_oak_door_icon
  Mechanics:
    custom_block:
      type: DOOR
      custom_variation: 1          # 1-4 are available
      model: custom_door_placed    # The itemid of the second config, that generates the block-model
```

ItemConfig for placed-block:

```yaml
custom_door_placed:
  # Handles the generation of the model the placed blocks should use
  # This is the same as all other block-types use in their Pack section
  # But split apart due to how held door-items work
  Pack:
    parent_model: block/door_bottom_left        # Default parent-model for doors
    textures:
      bottom: nexo:items/carpentry_blocks/ashen_oak_door_bottom
      top: nexo:items/carpentry_blocks/ashen_oak_door_top
  # Extra properties to prevent item from being "registered" as a NexoItem
  injectId: false
  excludeFromInventory: true
  excludeFromCommands: true
```

### Custom Trapdoors

```yaml
custom_trapdoor:
  material: PAPER
  itemname: Custom Trapdoor
  Pack:
    parent_model: block/template_orientable_trapdoor_bottom
    texture: nexo:items/carpentry_blocks/ashen_oak_trapdoor
  Mechanics:
    custom_block:
      type: TRAPDOOR
      custom_variation: 1         # 1-4 are available
```

### Custom Transparent

This type allows for transparent blocks, useful for leaves etc.\
For normal blocks that do not require transparency, use [NoteBlock Mechanic](/mechanics/custom-block-mechanics/noteblock-mechanic)

```yaml
custom_grate:
  material: PAPER
  itemname: Custom Grate
  Pack:
    parent_model: block/cube_all
    texture: nexo:items/carpentry_blocks/ashen_oak_leaves
  Mechanics:
    custom_block:
      type: GRATE
      custom_variation: 1          # 1-4 are available
```

{% hint style="warning" %}
The BlockTypes below here require a 1.21.10+ server
{% endhint %}

### Custom Chain

This type allows for custom chains, like iron or copper ones.\
The config is very basic and only requires you to have a Texture for it

```yaml
custom_chain:
  material: PAPER
  itemname: Custom Chain
  Pack:
    parent_model: block/template_chain
    texture: my_texture/path
  Mechanics:
    custom_block:
      type: CHAIN
```

### Custom Lantern

This type allows for custom chains, like copper & normal ones.\
The config is very basic and only requires you to have a Texture for it

```yaml
custom_lantern:
  material: PAPER
  itemname: Custom Lantern
  Pack:
    parent_model: block/template_lantern
    texture: my_texture/path
  Mechanics:
    custom_block:
      type: LANTERN
```

### Custom Bars

This type allows for custom bars, like iron bars in vanilla.\
The config is very basic and only requires you to have a Texture for it

```yaml
custom_bars:
  material: PAPER
  itemname: Custom Bars
  Pack:
    parent_model: block/template_bars
    texture: my_texture/path
  Mechanics:
    custom_block:
      type: BARS
```


# Core Shaders

Core shader addons for Nexo

There's a couple core shader addons made for Nexo that are very simple to add by just drag and dropping them into `Nexo/pack/external_packs`


# Text Effects by Akis

{% hint style="warning" %}

* **Uses the `rendertype_text` shader meaning some plugins will not work with it (e.g. MythicHud)**
* This might not work on newer versions, an alternative can be found [here](https://modrinth.com/resourcepack/thesalts-text-effects)
  {% endhint %}

## Text Effects Shader

This shader adds vibrant and dynamic text effects to your server, making your content more engaging. Currently, it offers the following effects:

* **No Shadow**
* **Rainbow**
* **Wobble**
* **Rainbow + Wobble**
* **Jump**
* **Rainbow + Jump**
* **Blinking**

Stay tuned for more updates as we continue to enhance the variety of effects available. Text animations are a fantastic way to bring life and excitement to your server's content.

## How to add to Nexo

* Download the shaders from either [Modrinth ](https://modrinth.com/resourcepack/text-effects-by-akis)or [Github](https://github.com/AkisYTB3/Text-Effects-by-Akis)
* Drop into Nexo/pack/external\_packs
* Run `/n rl` or restart server
* Enjoy!

## How to use

* Copy the color code for the shader you wanna use
* Paste it where you wanna use it
* And the text will have the effect you selected :)

## Effects and their Hex codes

| **Effect**           | **Hex Color** |
| -------------------- | ------------- |
| **No Shadow**        | `#4e5c24`     |
| **Rainbow**          | `#e6fffe`     |
| **Wobble**           | `#e6fffa`     |
| **Rainbow + Wobble** | `#e6fbfe`     |
| **Jump**             | `#e6fbfa`     |
| **Rainbow + Jump**   | `#e6f7fe`     |
| **Blinking**         | `#e6f7fa`     |


# Nexo Creative Inventory

NCI is a client-side Fabric mod that integrates with the Nexo plugin to show Nexo-defined items and blocks directly in the vanilla Creative inventory. It removes the need to browse `/nexo inventory` for most Creative workflow use cases.

NCI updates dynamically when the server sends refreshed registry data (for example, after `/nexo reload`).

## Features

* Adds Nexo item groups to Creative inventory tabs.
* Adds synced Nexo items to the Creative search tab.
* Refreshes tab contents automatically after server-side Nexo registry changes.
* Works client-side only (server runs Nexo plugin; client runs this mod).

## Installation

1. Install the appropriate Fabric Loader for the selected NCI version.
2. Download the appropriate Fabric API for the selected NCI version.
3. Download and place the NCI `.jar` in your client `mods` folder, along with the Fabric API `.jar`.
4. Join a server running Nexo `1.21+`.
5. Ensure the player account has the `nexo.command.inventory` permission node, then use `/n rl items` to rescan and resend items to NCI clients.

## Server Requirements

* Nexo inventory sync must be enabled (default behavior for Nexo `1.21+`).
* The player must have permission node `nexo.command.inventory`.
* The feature is intended for Creative users.

## Usage

1. Join a compatible multiplayer server.
2. Enter Creative mode.
3. Open Creative inventory and use the page selector to move between vanilla tabs and Nexo tabs.
4. Use the Creative search tab to find synced Nexo items quickly.

## Versioning

Release artifacts are named with both mod version and minecraft version values:

* `NCI-v<mod_version>-<minecraft_version>.jar`

## Protocol and Behavior Notes

* Client/server registry sync uses protocol negotiation by version range.
* Client advertises its minimum and maximum supported protocol versions.
* Server responds with the highest mutually supported protocol version.
* If there is no shared protocol version, sync is rejected as incompatible.
* Permission denial is handled separately and also prevents sync.

## Troubleshooting

* No Nexo tabs visible:
  * Confirm server is running Nexo `1.21+`.
  * Confirm your client is in Creative mode.
  * Confirm your account has `nexo.command.inventory`.
  * Confirm Fabric Loader/Fabric API and Minecraft versions match this release.
* Items outdated after reload:
  * Reconnect if the server did not push a fresh registry packet.
* Mod loads but nothing syncs:
  * Check client logs for Nexo handshake/protocol warnings.

## Development

Build locally with:

```bash
./gradlew clean build
```

Output artifacts are written to `build/libs/`.

## Credits and Distribution

Suggested/developed by [ZoeWithTheE](https://github.com/ZoeWithTheE) and implemented by [Boy0000](https://github.com/Boy0000).

Public release channels:

* [Modrinth](https://modrinth.com/mod/nci)
* [GitHub](https://github.com/ZoeWithTheE/NCI)
* [Patreon Early Access](https://www.patreon.com/cw/MNIZ/membership)

## License

This repository is currently under a proprietary license. See the [LICENSE](https://github.com/ZoeWithTheE/NCI/blob/master/LICENSE) agreement for usage and redistribution terms.


# NexoProxy

NexoProxy is a [Velocity](https://papermc.io/software/velocity) plugin addon for Nexo that solves common ResourcePack and Glyph headaches caused by proxy networks.

## Features

### Blocking Duplicate ResourcePacks

When players switch between backend servers on your network, Velocity normally unloads and reloads the ResourcePack even if it is identical on both servers.\
NexoProxy detects this and **blocks the duplicate send**, so players experience no interruption.

It also handles obfuscated NexoPacks: if the underlying pack content is identical across two servers, the duplicate send is still blocked even when the obfuscated file hashes differ.

### Glyph Tags in Velocity Plugins

NexoProxy adds support for using Nexo's `<glyph:id>` tags inside other Velocity plugins such as [Velocitab](https://modrinth.com/plugin/velocitab) and [TAB](https://hangar.papermc.io/NEZNAMY/TAB), letting you display Nexo glyphs in tab lists, scoreboards, and other proxy-side UI without any extra configuration.

## Setup

1. Drop `NexoProxy.jar` into your Velocity `plugins/` folder.
2. Make sure Nexo is installed on your backend servers as normal.
3. No additional configuration is required — duplicate pack detection and glyph tag support are active automatically.

{% hint style="info" %}
Pack blocking requires the proxy to already know a backend server's ResourcePack details. This information is sent over a plugin message channel, which can only be opened once at least one player is present on that server. This means the very first player to join a given backend server will always receive the pack normally, as the proxy has no way to block it yet. Every player after that will benefit from duplicate blocking, provided all backend servers share the same Nexo setup and therefore produce the same pack. Note that obfuscation is not a concern here: NexoProxy compares the unobfuscated pack hash, so identical packs are correctly recognised as duplicates even when their obfuscated hashes differ.
{% endhint %}


# Anti-Cheat Plugins

Nexo might cause conflicts with Anti-Cheat plugins when standing on [Furniture Mechanic](/mechanics/furniture-mechanic).\
NexoFurniture uses ClientSide hitboxes, meaning these plugins will think the player is floating/flying.\
\
Nexo has built-in support for the most common ones, like Vulkan & [Spartan/Vaca&#x6E;**\***](#user-content-fn-1)[^1]**.**\
The settings for these can be found in `mechanics.yml` under `Furniture.anti_cheat`.\
For other plugins like *LPX* & *Polar Anti-Cheat*, there is no built-in support for these.\
There is an unofficial third-party addon you can download which should fix this: [NexoPolarBridge](https://github.com/SLNE-Development/NexoPolarBridge)

[^1]: This is mainly for older versions before it became changed over and became a subscription AI slop plugin


# PlaceholderAPI

Nexo has an integration with PlaceholderAPI to let you use some parts throughout other plugins.\
**Glyphs** can be used via **%nexo\_glyphid%**, this will return the **\<glyph:glyphid>** for any Glyph not using the font *minecraft:default* in its config. If one does, the raw unicode is returned.

**%nexo\_shift\_X%** can be used to shift elements. This returns a unicode as Nexo adds it to every font.\
\
\&#xNAN;**%nexo\_pack\_hash%** returns the current hash of the Nexo ResourcePack

### PlaceholderAPI Tag

Nexo also adds a "PlaceholderAPI Tag". This can be used like most modern MiniMessage style tags.\
\&#xNAN;**\<placeholderapi:placeholder>** or **\<papi:placeholder>**. This will work in any plugin, much like the Nexo Glyph & Shift tags.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTAoAxayP9PrBtX9UQ5wa%2Fuploads%2FtOQPtql8QhpoYmhX2I1s%2Foutput.mp4?alt=media&token=549fa5c9-4a97-4ffb-922c-af1d0686d2f8>" %}


# ModelEngine - custom mobs

How to merge resourcepacks?

ModelEngine creates a resourcepack which contains all the models and textures for its custom entities\
Nexo will automatically import ModelEngines resourcepack, and merge it into its own.\
Nexo will also remove any Core-Shaders in the pack by default, due to history of breaking packs\
\
You can make Nexo Auto-Import ModelEngine with shaders by disabling `Pack.import.modelengine.exclude_shaders`


# MythicMobs - custom mobs

MythicMobs allows you to create custom mobs and bosses with advanced skills and attributes

MythicMobs is a plugin for making highly customizable mobs and bosses.\
This page explains how you can make said mobs drop a NexoItem or equip them with a NexoItem

Below is an example config of how to define Equipment & Drops (also applies to DropTables)

```yaml
ExampleMob:
  Type: WITHER_SKELETON
  Equipment:
    - IRON_HELMET HEAD
    - nexo:forest_sword HAND
    - nexo:forest_shield OFFHAND
  Drops:
    - nexo forest_chestplate 1to2 1.0
    - #nexo itemid amount probability
```


# MythicCrucible

Crucible is an addon for MythicMobs

### Import a MythicCrucible item into your NexoItem

The compatibility with Crucible allows you to import items created with MythicMobs & Crucible and use them as a base for your Nexo-items (you will keep everything configured with Crucible and add your own mechanics, textures, 3d models, etc).

```yaml
example_crucible:
  itemname: "<gradient:#59A7EA:#F1D2FF>Test"
  crucible_id: my_crucible_itemid
```

### MythicCrucible Items in Nexo Furniture/CustomBlock drops

You can also specify a crucible to be dropped directly when breaking a furniture or a custom block.\
You just need to specify the `crucible_item` like below;

```yaml
myitemid:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      drop:
        loots:
          - crucible_item: my_crucible_itemid
            amount: 1..3 #Optional
    furniture:
      drop:
        loots:
          - crucible_item: my_crucible_itemid
            amount: 1..3 #Optional
```

### MythicCrucible in Nexo-Recipes

You can also make a recipe in Nexo that takes a Crucible Item as an ingredient or as the result.\
Like with drops, you just need to specify the `crucible_item`\
Below is an example of a shaped recipe using a CrucibleItem. Using the RecipeBuilders ingame should also do this for you if the item you use is an CrucibleItem

```yaml
myrecipeid:
  result:
    crucible_item: my_crucible_itemid
  ingredients:
    A:
      crucible_item: my_crucible_itemid
  shape:
  - ___
  - ___
  - _A_
    
```


# MMOItems

### Import an MMOItem into your NexoITem

The compatibility with MMOItem allows you to import items created with this plugin and use them as a base for your Nexo-items (you will keep everything configured with MMOItem and add your own mechanics, textures, 3d models, etc).

```yaml
example_mmoitem:
  itemname: "<gradient:#59A7EA:#F1D2FF>Test"
  mmoitem:
    type: SWORD
    id: FALCON_BLADE
    level: 10 # Optional
    tier: RARE # Optional
    match_level: true # Optional
```

### MMOItems in NexoFurniture & Custom Block drops

You can also specify an mmoitem to be dropped directly when breaking a furniture or a custom block.\
You just need to specify the `mmoitems_id` & `mmoitems_type` in drop like shown below;

```yaml
myitemid:
  Mechanics:
    custom_block:
      type: NOTEBLOCK
      drop:
        loots:
          - mmoitems_id: FALCON_BLADE
            mmoitems_type: SWORD
            amount: 1..3 #Optional
    furniture:
      drop:
        loots:
          - mmoitems_id: FALCON_BLADE
            mmoitems_type: SWORD
            amount: 1..3 #Optional
```

### MMOItems in Nexo-Recipes

You can also make a recipe in Nexo that takes an MMOItem as an ingredient or as the result.\
Like with drops, you just need to specify the `mmoitems_id` & `mmoitems_type`\
Below is an example of a shaped recipe using an MMOItem. Using the RecipeBuilders ingame should also do this for you if the item you use is an MMOItem

```yaml
myrecipeid:
  result:
    mmoitems_id: FALCON_BLADE
    mmoitems_type: SWORD
  ingredients:
    A:
      mmoitems_id: FALCON_BLADE
      mmoitems_type: SWORD
  shape:
  - ___
  - ___
  - _A_
    
```


# Vendors

Guide for vendors and others wanting to make Third-Party packs for Nexo

Below is the recommended way to add content to Nexo in a "drag & drop" format\
For these examples I will make it as a store named "NexoMC"

### ResourcePack

For including a ResourcePack, the ideal way is to use an "External Pack"\
Nexo allows for merging multiple full resourcepacks, so to avoid conflicts, it is the best approach\
Using proper namespaces is also ideal, not stuffing everything into the default minecraft-namespace\
`Nexo/pack/external_packs/NexoMC/assets/nexomc/models/item/some_model.json`\
This allows you to minimize possible conflicts with other packs and items others might have made

```
📁Nexo
└── 📁pack
    └── 📁external_packs
        ├── 📁RequiredPack.zip         #Nexo Default
        ├── 📁DefaultPack.zip          #Nexo Default
        └── 📁NexoMC
            └── 📁assets
                └── 📁nexomc
                    ├── 📁models
                    |   └── ...
                    └── 📁textures
                        └── ...
```

### Items

Nexo also improves the structuring of items abit by allowing subfolders inside `Nexo/items`\
This means the recommended way to add premade itemconfigs is the following `Nexo/items/NexoMC/nexo_christmas_furniture.yml`

```
📁Nexo
└── 📁items
    └── 📁NexoMC
        ├── 📄 christmas_furniture.yml
        └── 📄 easter_armor.yml
```

\
There are also some config-changes compared to Oraxen, mainly to [Furniture](/mechanics/furniture-mechanic) & [Custom-Block](/mechanics/custom-block-mechanics) mechanics.\
🟨`itemid.Mechanics.furniture.display_entity_properties` -> `itemid.Mechanics.furniture.properties`\
`🟨itemid.displayname` -> `itemid.itemname`\
🟨`itemid.customname` to use old "DisplayName" logic from 1.20.4<\
🟨 Furniture Hitbox-structure has changed, refer to [docs](/mechanics/furniture-mechanic#hitboxes)\
🟨 Custom-Blocks has changed, refer to [NoteBlock](/mechanics/custom-block-mechanics/noteblock-mechanic)/[StringBlock](/mechanics/custom-block-mechanics/stringblock-mechanic)\
❌ `itemid.Mechanics.furniture.type` Nexo only supports Display-Entities\
❌ `itemid.Pack.generate_model` is determined automatically\
✔️ `itemid.Components.item_model` can be used on 1.21.2+ to avoid entire `itemid.Pack`\
✔️ `itemid.Pack.texture` can be used if you only have a single texture\
✔️ `itemid.Pack.textures` accepts a single texture, a list of textures or a map of texture-key to texture

### Glyphs

There are no big changes to glyphs, but it allows for multiple namespaces now\
Same as with resourcepacks, you should use a separate namespace where you can

```yaml
santa_claus:
  texture: nexomc:santa_claus
  font: nexomc:christmas_glyphs
  ...
```


# API

### Repository & Dependencies

```kotlin
repositories {
    maven("https://repo.nexomc.com/releases")
}

dependencies {
    compileOnly("com.nexomc:nexo:<version>") //Nexo 1.X -> 1.X.0
}
```

## JavaDocs

Nexo has JavaDocs published at [https://jd.nexomc.com](https://jd.nexomc.com/). These will be updated whenever changes to the API are made, which is not too often.

## Custom Items

Nexo has its own ItemBuilder class which handles building its custom items.\
The [NexoItems](https://jd.nexomc.com/latest/com/nexomc/nexo/api/NexoItems.html)-class contains most of the methods you would need to handle items.

```java
ItemBuilder itemBuilder = NexoItems.itemFromId(itemID);
ItemStack itemStack = itemBuilder.build();
String itemId = NexoItems.idFromItem(itemStack);
```

{% hint style="info" %}
Nexo loads items in an async task, thus getting them in your plugins onEnable will likely fail\
You can listen for the NexoItemsLoadedEvent to be sure the items are registered
{% endhint %}

#### Modifying how Nexo updates a NexoItem

Nexo will update any NexoItem on several actions to ensure its data is up-to-date.\
If your plugin should override any property on the Item which Nexo resets, follow the steps below.

You need to register an UpdateCallback which lets you run logic on any item Nexo updates.\
This should be registered during NexoItemsLoadedEvent as shown below;

{% tabs fullWidth="true" %}
{% tab title="Kotlin" %}
{% code fullWidth="true" %}

```kotlin
@EventHandler
fun NexoItemsLoadedEvent.onLoaded() {
    NexoItems.registerUpdateCallback(Key.key("namespace:key"), object : UpdateCallback {
        override fun preUpdate(itemStack: ItemStack): ItemStack? {
            // return null to skip updating
            return null
        }
        
        override fun postUpdate(itemId: String, itemStack: ItemStack, preUpdateItemStack: ItemStack): ItemStack {
            // Apply changes after Nexo finishes updating the item
            return itemStack
        }
    })
}
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}

```java
@EventHandler
public void onItemsLoaded(NexoItemsLoadedEvent event) {
    NexoItems.registerUpdateCallback(
        Key.key("namespace", "key"), new UpdateCallback() {

            @Override
            public ItemStack preUpdate(ItemStack itemStack) {
                // return null to skip updating
                return null;
            }

            @Override
            public ItemStack postUpdate(String itemId, ItemStack itemStack, ItemStack preUpdateItemStack) {
                // Apply changes after Nexo finishes updating the item
                return itemStack;
            }
        }
    );
}

```

{% endtab %}
{% endtabs %}

## Custom Blocks

The [NexoBlocks](https://jd.nexomc.com/latest/com/nexomc/nexo/api/NexoBlocks.html)-class contains all the methods available for placing, removing and checking for custom blocks in Nexo.

```java
NexoBlocks.place(itemID, location)
```

### Furniture

The [NexoFurniture](https://jd.nexomc.com/latest/com/nexomc/nexo/api/NexoFurniture.html)-class contains all the methods available for placing, removing and checking for furniture in Nexo. In addition to this you can return the [FurnitureMechanic](https://jd.nexomc.com/latest/com/nexomc/nexo/mechanics/furniture/FurnitureMechanic.html) of the Furniture to get specific properties of it if needed.

```java
NexoFurniture.place(itemID, location, @Nullable player)
```

## Custom Mechanics

Nexo allows you to add your own mechanics to the plugin, new ones or extending existing ones\
An example repository can be found [here](https://github.com/Nexo-MC/NexoExampleMechanic), with examples for both Java and Kotlin\
You can register your mechanic in your onEnable or wherever you want.\
This will register it when Nexo registers its own Mechanics, and parse them for items\
\
Mechanics consist of a Mechanic class with properties and methods.\
MechanicFactory consists of parsing method for global Mechanic properties & linking item -> mechanic\
\
**NexoMechanicsRegisteredEvent** - Called when Nexo loads/reloads Mechanics\
**NexoItemsLoadedEvent** - Called when Nexo finishes loading/reloading NexoItems

## Custom PackServer

If you want a PackServer type that Nexo does not provide, you can make an addon that registers one. Make a class that extends `NexoPackServer` and override the methods you need.

{% tabs %}
{% tab title="Kotlin" %}

```kotlin
class MyPackServer : NexoPackServer {
    override fun uploadPack(): CompletableFuture<Void>
    override fun sendPack(player: Player)
    override fun start()
    override fun stop()
    override fun packUrl(): String
    override fun packInfo(): ResourcePackInfo?
}
```

{% endtab %}

{% tab title="Java" %}

```java
public class PackServer extends NexoPackServer {
    @Override
    public CompletableFuture<Void> uploadPack()
    
    @Override
    public void sendPack(Player player)
    
    @Override
    public void start()
    
    @Override
    public void stop()
    
    @Override
    public String packUrl()
    
    @Override
    @Nullable
    public ResourcePackInfo packInfo()
}
```

{% endtab %}
{% endtabs %}

To register this with Nexo, you simply call `PackServerRegistry.register(type, packServer)`


