-
Notifications
You must be signed in to change notification settings - Fork 1
CustomItem
Raikas edited this page Apr 12, 2021
·
2 revisions
CustomItem is used for custom item's used by features. As an example a custom food should be made with CustomItem.
id: 5, // The CustomModelData ID of the Custom Item
name: translate('vk.item'), // Item name
type: Material.MISC, // Can also be Material
data: { // Data saved in the NBT
first: yup.number().default(0).required(), // The data typing should be done with yup. You should use .default(?) or .required() if can not be null.
second: yup.number().default(0),
},
})```
Also you can add functions check(item: ItemStack) => boolean and create(item: ItemStack, data: Data<T>) => ItemStack, but in most cases that's not required.
WIP