-
-
Notifications
You must be signed in to change notification settings - Fork 16
KubeJS Support
Panderva edited this page Apr 17, 2024
·
4 revisions
As of version 1.1.17, MIAPI adds very basic modular item types to be used in KubeJS. miapi_modular_weapon is likely the item type you would want to use if you are creating a special modular item, although it is not the only option:
miapi_modular_weaponmiapi_modular_arrowmiapi_modular_axemiapi_modular_bootsmiapi_modular_chestplatemiapi_modular_crossbowmiapi_modular_helmetmiapi_modular_hoemiapi_modular_leggingsmiapi_modular_pickaxemiapi_modular_shovelmiapi_modular_sword
The options above should be pretty self-explanatory. They all implement special behavior respective to their names. Use the one that fits best for your needs(which, again, will most likely be the first). You can create an item with these types like you would any other KubeJS item. Simply use the item registration event in a startup script and specify one of these option's as the item's type:
StartupEvents.registry('item', e => {
// You can specify item type as 2nd argument in create()
e.create('cool_modular_item', 'miapi_modular_weapon')
})