Skip to content

Registering your own definitions

AnOpenSauceDev edited this page Mar 27, 2024 · 3 revisions

All you need to register a new definition is by using WeightUtil.addElement(your_weight_def);. Make sure to put this in your initialize method in order to register your items.

To register items using a data pack, do the following:

{
 "id_namespace": "your_mod_id",
 "id_path": "your_item_name",
 "weight": 3.0, 
"type": "type_here"
}

id_namespace - your mod id's namespace, (i.e. the minecraft in minecraft:dirt )
id_path - your mod's path name (i.e. the dirt in minecraft:dirt)
weight - how much your item weighs (decimal values allowed).
type - what type your armour is. Can be: boots,head,chest,leggings. Anything else will be treated as other.

(yes, this was taken from the modrinth page)

Clone this wiki locally