Hi!
Trying to create an event that spawns lightning on top of the player when consumed.
The code spawns lightning just fine but I do not know how to get it to target the player.
Current xyz values are just from testing
ItemEvents.foodEaten(event => {
if (['kubejs.fastwater_bottle'].includes(event.item.id)) return
let lightning = event.level.createEntity('lightning_bolt')
lightning.x += -1327
lightning.y += 152
lightning.z += -437
lightning.spawn()
})
much thanks!