I am making some magic wands and I use this code to fire the projectiles:ItemEvents.rightClicked('kubejs:basic_damage_wand', e => { e.server.runCommandSilent(`execute at ${e.entity.username} as ${e.entity.username} if score @s sky_technology.mana matches 10.. run function sky_technology:mystery/basic_damage_wand`) e.server.runCommandSilent(`execute as ${e.entity.username} run function sky_technology:mystical/manashow`) })But you have to click a block for it to work. Is there any way to allow an item to click into the air? This is the code for creating the item: event.create('basic_damage_spell').displayName('Basic damage spell').maxStackSize(1).glow(true).rarity('epic').tooltip("Mana cost: 10").tooltip("Deals 2 hearts of damage")
And lastly can I execute a function every tick using kubejs because I wanted to use tick.json but it doesn't work although I set it up right.
Thanks in advance
#Click event in air
6 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
there's ClientEvents.tick, ServerEvents.tick, PlayerEvents.tick
Thanks, and do you have any idea how to make a click into air possible?
Ticket closed!
I got it to work, thanks