#Movement speed for custom effects (1.20.2)
35 messages · Page 1 of 1 (latest)
One moment
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
Uh... interesting. So, it's only way to add custom movement speed changing?
And can this be linked with this effects' amplifier?
I need the special one? I can’t understand that a little “:3 sorry
not the only way, just the most simple way, and it is linked to the amplifier
Cool!
You just need to generate a UUID and pass it into the addAttributeModifier
https://www.uuidgenerator.net/ here's the website I use to generate my UUIDs
Many thanks.
I’ll write back if meet any troubles
k
Can you explain how MULTIPLY works please?
I understand it as 2 * 0.5 = 1
I think multiply just takes the current attribute value and multiplies it by (amount * amplifier)
idk though, I've only used addition
When I tried to use MULTIPLE with 1.0f, it boosts speed ":3
With -1.0f you will stand at one place ":3
neat, I'll need to note that
And we have two different MULTIPLE
MULTJPY_BASE
MULTIPLY_ALL (it has different name)
So I'll try to experiment with that
Sadly that we can't directly change movement speed correctly(
Then we'd need to go a different route with changing speed
Wait, what if you tried ADD_MULTIPLIED_TOTAL
It exists?
Yes, it's how slowness changes a player's speed correctly
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)
K, good luck