#Reach and knockback

20 messages · Page 1 of 1 (latest)

kindred mantle
#

I've got it so that cows attack back when you attack them, but I wanna give them a bit more reach and knockback

torn lintelBOT
#

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

visual lion
#

You can give them reach and knockback attributes

kindred mantle
#

{How?}

#

This is what I've got (so far)

#

Startup

EntityJSEvents.attributes(event => {
    event.modify('minecraft:cow', attribute => {
        attribute.add("minecraft:generic.attack_damage", 6)
    })
})
#

Server

EntityJSEvents.addGoals("minecraft:cow", event => {
        event.hurtByTarget(1, [], false, [])
    })

    EntityJSEvents.addGoalSelectors('minecraft:cow', e => {
        e.meleeAttack(0, 1, true)
    })
visual lion
#

the same way you added the attack dmg attribute

#

just with the reach and knockback attributes

#

the attack knockback one there

#

I can't actually see a reach attribute there...

#

but there is definitely knockback

kindred mantle
#

Thanks

visual lion
#

np

kindred mantle
#

I was able to give them knockback, which is better than non

#

I guess reach will be out of my reach

visual lion
#

hah

kindred mantle
#

"Skemech would then go on to die of a ketamine overdose"