Closed squoshi closed 6 months ago
This fix adds the hurtEnemy callback from the Item class into ItemBuilder. It will make making items with attack effects much easier.
hurtEnemy
StartupEvents.registry('item', event => { event.create('test') .hurtEnemy(ctx => { console.log([ctx.item, ctx.target, ctx.attacker]) global.attackTest(ctx) return true }) }) global.attackTest = function(ctx) { let exp = ctx.target.level.createExplosion(ctx.target.x, ctx.target.y + 1, ctx.target.z) exp.damagesTerrain(false) exp.strength(1.25) exp.explode() }
No other details
Oops, code formatting kinda broke
Description
This fix adds the
hurtEnemy
callback from the Item class into ItemBuilder. It will make making items with attack effects much easier.Example Script
Other details
No other details