I've been trying to figure out how to give my custom spellbook, ( using Iron's Spellbooks JS) a model when held or in the curio slot, as the book just kind of sticks out of your hip other wise. Here's my log:
[22:37:30] [INIT] KubeJS 2101.7.1-build.181; MC 2101 NeoForge
[22:37:30] [INIT] Loaded plugins:
[22:37:30] [INIT] - dev.latvian.mods.kubejs.BuiltinKubeJSPlugin
[22:37:30] [INIT] - dev.latvian.mods.kubejs.client.BuiltinKubeJSClientPlugin
[22:37:30] [INIT] - dev.latvian.mods.kubejs.integration.architectury.ArchitecturyIntegration
[22:37:30] [INIT] - com.squoshi.irons_spells_js.IronsSpellsJSPlugin
[22:37:30] [INIT] - dev.ftb.mods.ftbxmodcompat.neoforge.ftbquests.kubejs.FTBQuestsKubeJSPlugin
[22:37:30] [INIT] - dev.ftb.mods.ftbxmodcompat.neoforge.ftbteams.kubejs.FTBTeamsKubeJSPlugin
[22:37:31] [INFO] Loaded script startup_scripts:main.js in 0.07 s
[22:37:31] [INFO] Loaded 1/1 KubeJS startup scripts in 1.1 s with 0 errors and 0 warnings
[22:37:34] [ERROR] ! main.js#12: Error in 'StartupEvents.registry': dev.latvian.mods.rhino.EcmaError: TypeError: Cannot find function itemModel in object CustomSpellBook$Builder[kubejs:creatives_spellbook].
and here's my current code:
StartupEvents.registry('item', event => {
event.create('creatives_spellbook', "spellbook").itemModel({parent: 'kubejs:models/creatives_spell_book.json'}).rarity('uncommon').setMaxSpellSlots(16).addAttribute('irons_spellbooks:spell_power', 1.0, 'add_multiplied_total').addAttribute('irons_spellbooks:cooldown_reduction', 1.0, 'add_multiplied_total').addAttribute('irons_spellbooks:cast_time_reduction', 1.0, 'add_multiplied_total').addAttribute('irons_spellbooks:max_mana', 1.0, 'add_multiplied_total').addAttribute('irons_spellbooks:mana_regen', 1.0, 'add_multiplied_total').displayName("The Creative's Spellbook").maxStackSize(1)
event.create('incomplete_spellbook').texture('kubejs:item/incomplete_spellbook').maxStackSize(1)
})
The documentation's item tutorial is unclear and it isn't in the tutorial for the addon, How on earth does this work?(if at all)