#KubeJS adding attributes to item.

21 messages · Page 1 of 1 (latest)

drowsy lodge
#

I am trying to make a custom item, which i succeded in, but now i am trying to figure it out how to make it give u 5 extra hearts, and 0.5 extra attack speed when holding in your offhand. I read the wiki but it just says the template for adding attributes and i dont rlly understand.

Also, this is not as important but when i try to add a tooltip for my item, when hovering over the item it shows the name, then it says "KubeJS" then it shows the tooltip, how do i fix that.

paper kayakBOT
#

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

drowsy lodge
kind fogBOT
#

Paste version of Totem_of_the_Warlords_Favor.js from @drowsy lodge

drowsy lodge
#

this is my code currently

drowsy lodge
#

i made this with just commands, but since i want it to be craftabale

#

i need to recreate it with kubejs

rotund linden
#

"/kubejs hand"

#

will give you the item id and nbt

#

you can make recipe with that output

drowsy lodge
#

Thanks so much, but where do i input the nbt data in the craft output

#

@rotund linden

rotund linden
#
event.shaped(
      Item.of('minecraft:stone_sword', '{Damage:120}'), 
      [
        ' F ',
        ' F ', 
        ' S '
      ],
      {
        F: 'twigs:pebble',
        S: 'minecraft:stick'
      }
    )
#

Here is an example

#

basicly instead of typing "modid:itemid" you copy the output of the command

#
event.shaped(
      Item.of('minecraft:wooden_axe', "{Damage:0,display:{Lore:['[\"\",{\"text\":\"String Binding allows the tool to last longer!\",\"italic\":false}]'],Name:'[\"\",{\"text\":\"Flint Axe with string binding\",\"italic\":false}]'}}").enchant('unbreaking', 2), 
      [
        'FFX',
        'FS ', 
        ' S '
      ],
      {
        F: 'minecraft:flint',
        X: '#forge:string',
        S: 'minecraft:stick'
      }
    )
#

This might be a better example

drowsy lodge
#

Bro actually a life saver

rotund linden
#

Happy to help

drowsy lodge
#

So i just copied the output of /kubejs hand instead of for example minecraft:dirt