Closed squoshi closed 5 months ago
Port of my other PR for the hurtEnemy callback to 1.20.4.
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.strength(1.25) exp.explode() }
Description
Port of my other PR for the
hurtEnemy
callback to 1.20.4.Example Script
Other details