#Unknown type 'sword'

9 messages · Page 1 of 1 (latest)

cyan trellis
#

Hi all! I'm experiencing an error when loading in a custom sword. I'm basically copying and pasting the default code, yet updating some of the script to KubeJS 6.1. Can anybody offer some advice. It's telling me that "sword" is an unknown object type. Thanks!
[11:24:52] [ERROR] ! java.lang.IllegalArgumentException: Unknown type 'sword' for object 'kaylebsword'!

Here's my script

// Listen to item registry event
StartupEvents.registry('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('kaylebsword', 'sword').tier('diamond').attackDamageBaseline(10.10)
    .tooltip("§5Fear the Explosion!")  
    .tooltip("§5… Boom the fire!")
    .displayName("Fire Sword of Kayleb")
  })
inner turtleBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

small raftBOT
#

You can make custom items with KubeJS, and the wiki has a page on them!

cosmic wedge
#

the registry type is wrong

ashen palm
#
StartupEvents.registry('item', event => {
    event.create('kaylebsword', 'sword').tier('diamond').attackDamageBaseline(10.10)
    .tooltip("§5Fear the Explosion!")  
    .tooltip("§5… Boom the fire!")
    .displayName("Fire Sword of Kayleb")
  })
cosmic wedge
#

^

cyan trellis
#

Thanks, trying this out now!

#

It works! Thanks!

#

Closing ticket now.