#Movement speed for custom effects (1.20.2)

35 messages · Page 1 of 1 (latest)

leaden junco
#

I make custom effect Imaginary binding and want to make that this effect slows its wearer (Living entity) without applying "Slowness" effect, but can't understand how.
I tried trough setVelocity but it doesn't do what I want.

#

Movement speed for custom effects (1.20.2)

lilac inlet
#

When registering your status effect, you can call addAttributeModifier and then get the generic speed attribute from EntityAttributes and use a addition operation to add a negative value to the speed

#

^Example of registering a potion effect to have it modify an entity attribute, though this example increases the entity's luck while active

#

You'll also need a UUID too

leaden junco
#

Uh... interesting. So, it's only way to add custom movement speed changing?

#

And can this be linked with this effects' amplifier?

leaden junco
lilac inlet
lilac inlet
leaden junco
#

Many thanks.
I’ll write back if meet any troubles

lilac inlet
#

k

leaden junco
#

Can you explain how MULTIPLY works please?

I understand it as 2 * 0.5 = 1

lilac inlet
#

idk though, I've only used addition

leaden junco
#

When I tried to use MULTIPLE with 1.0f, it boosts speed ":3
With -1.0f you will stand at one place ":3

lilac inlet
#

neat, I'll need to note that

leaden junco
#

And we have two different MULTIPLE

#

MULTJPY_BASE
MULTIPLY_ALL (it has different name)

leaden junco
#

Sadly that we can't directly change movement speed correctly(

lilac inlet
#

Then we'd need to go a different route with changing speed

leaden junco
#

Yeah, different and painful I think

#

":3

#

But also thanks again!

lilac inlet
leaden junco
#

It exists?

lilac inlet
#

Yes, it's how slowness changes a player's speed correctly

leaden junco
#

Hm
I'll try it then will be able to use my laptop

#

How I want effect works - you apply Imaginary binding and it slows target but slowness can't be lover than some value ":3

#

For the first time I'll use your method you told me and maybe in one time will make better (idk truly)

lilac inlet
#

K, good luck