`// priority: 0
console.info('Hello, World! (You will only see this line once in console, during startup)')
// Listen to item registry event
onEvent('item.registry', event => {
// The texture for this item has to be placed in kubejs/assets/kubejs/textures/item/test_item.png
// If you want a custom item model, you can create one in Blockbench and put it in kubejs/assets/kubejs/models/item/test_item.json
event.create('test_item')
// You can chain builder methods as much as you like
event.create('test_item_2').maxStackSize(16).glow(true)
// You can specify item type as 2nd argument in create(), some types have different available methods
event.create('custom_sword', 'sword').tier('diamond').attackDamageBaseline(10.0)
})
onEvent('item.registry', event => {
event.create("axe1", "axe")
.maxDamage(3000)
.attackDamageBaseline(20.0)
.attackDamageBonus(5.0)
.speedBaseline(2.5)
.tier('diamond')
})`
mod:=========================================================
rhino-forge-1605.1.5-build.75
kubejs-forge-1605.3.19-build.299
architectury-1.32.68
log:=========================================================
[09:29:47] [modloading-worker-0/INFO]: Loaded script startup_scripts:script.js in 0.275 s
[09:29:47] [modloading-worker-0/INFO]: Loaded 1/1 KubeJS startup scripts in 0.749 s
[09:29:47] [modloading-worker-0/ERROR]: Error occurred while handling event 'item.registry': Can't find method dev.latvian.kubejs.item.ItemRegistryEventJS.create(string,string). (startup_scripts:script.js#16)
[09:29:47] [modloading-worker-0/ERROR]: Error occurred while handling event 'item.registry': Can't find method dev.latvian.kubejs.item.ItemRegistryEventJS.create(string,string). (startup_scripts:script.js#24)
[09:29:47] [modloading-worker-0/ERROR]: Error occurred while handling event 'item.registry': Can't find method dev.latvian.kubejs.item.ItemRegistryEventJS.create(string,string). (startup_scripts:script.js#27)