#set damage of an entity

3 messages · Page 1 of 1 (latest)

wide linden
#

I have managed to set the health and max health...

EntityEvents.spawned(event => {
    const entity = event.entity;
    if (entity.type == "minecraft:pig") {
        entity.maxHealth = 24;
        entity.health = 24;
    }
})

...but I can't get attack damage or speed to work.

dire sparrowBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!