Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

🖇️Connectable Furniture

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.

Default Connectable furniture included in Nexo's Default Items

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 the recommended approach as it 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 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.

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.

Connection-State ItemModel

This is largely the same as a normal basic ItemModel, but with one unified ItemModel 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 can either be made directly in the config using ItemModel Builder, or making the ItemModel file directly

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.

If you do not wish to use ItemModel Builder, you can manually make the file like below.

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

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.

Normal ItemModel

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

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.

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

Last updated