#define weapon to set hit entity on fire (fire aspect)
4 messages · Page 1 of 1 (latest)
EntityEvents.hurt(event => {
const {source, entity} = event
/**@type {Internal.ItemStack} */const weapon = source?.immediate?.mainHandItem
if(!weapon) return; //return if there's no weapon
if(!Ingredient.of("#minecraft:hoes").test(weapon)) return; //return if the weapon is not a hoe
entity.setSecondsOnFire(5) //set the entity to burn for 5 sec
})
send your server log
Please send your KubeJS server log. It can be found at /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.