Items
File Location
Item configuration files should be placed in the following directory:
MyDatapack/data/<namespace>/filament/item/myitem.json
Example
Here is a basic example of an item configuration:
{
"id": "mynamespace:clown_horn",
"vanillaItem": "minecraft:paper",
"itemModel": "minecraft:mymodel", // optional and only available in >= 1.21.4
"itemResource": {
"models": {
"default": "mynamespace:custom/misc/clown_horn"
}
},
"properties": {
...
},
"behaviour": {
...
},
"components": {
...
}
}
Item configurations have two required fields: id
and vanillaItem
.
id
Your custom ID in the format namespace:item_name
vanillaItem
The vanilla item to "overwrite". Filament (through Polymer) will create custom_model_data
IDs for the generated resource pack. Your custom item will not inherit any other properties server-side from the vanilla item other than appearance, if the itemResource
field is not set. For interaction purposes on the client, it is important to choose the appropriate vanilla item to use here.
Optional Fields
The fields itemModel
, itemResource
, properties
, group
, and behaviour
are optional.
itemModel
Path to an item model definition (in assets/namespace/items/<name>.json
)
This overwrites the itemResource field.
itemResource
Specifies the resource(s) for the item model. Depending on the item's behaviour(s), it may use additional keys/fields in itemResource
.
Fields:
models
: An object containing model definitions.default
: The default model for the item.- Additional keys may be required depending on the item's behaviour (e.g.,
trapped
for a trap behaviour).
textures
(upcoming in future versions): An object containing texture definitions.default
: The default texture for the item.- Additional keys may be required depending on the item's behaviour.
properties
Defines various properties for the item. The structure and contents of this field will depend on the specific properties being set.
group
Defines the item-group for this item. See Item Groups for more information.
behaviour
Defines specific behaviours or interactions for the item. The structure and contents of this field will depend on the specific behaviours being set.
See Item Behaviours for more information.
components
Defines a set of vanilla minecraft components like minecraft:food
, minecraft:tool
, etc.
The format is the same that is used in datapacks. This is only supported in minecraft version 1.20.5 and later