יצירת רהיטים
Tutorial on how to create your first furniture
What is a furniture?
A furniture is a decorative object which can be solid, emit light, used as chair and can have other features.
Creating a simple furniture
Creating the configuration file
The first step is to create a configuration file in your namespace folder. In this example I called it furniture_example.yml
.
As you can see I created the item with some special properties.
behaviours
attribute has a special sub-attribute called furniture
, this attribute tells ItemsAdder that this item is a placeable furniture model.
Let's add some more settings to it:
I added some properties, in this case I specified where the furniture can be placed (only on the floor
), the hitbox
size and place
/break
sounds.
By default the hitbox is 1x1x1, so it's not really needed to specify these options.
Specify them only if the model is bigger than 1x1x1.
For example if you have a furniture which is 1x2x1 you can set it like that:
Final result:
Creating the model file
Now open BlockBench and create a "Java Block/Item".
Now create you model, in this example I'm modelling an ugly minimal modern lamp.
Important: make sure the north is opposite of where you want the model to face.
Or add the property to the YML configuration opposite_direction: true
Edit how the model is shown on player hand:
Configure how the model is shown ingame
You have to select the head icon and then small armorstand:
Then you have to shift your model down until it matches the armorstand base:
Now let's save the model file into the correct folder, in this case I set this property in the yml configuration file: model_path: lamp
, so you have to save the .json file inside this path: ItemsAdder\data\resource_pack\assets\myitems\models\lamp.json
.
Saving changes
Now run /iazip
(and follow the hosting tutorial if needed), then obtain the item and place it: /iaget myitems:lamp
.
Last updated