mojira.dev
MC-105614

Speed and slowness on mobs don't work when spawned with it.

I tried to summon a Villager with slowness 99 already active on it. This is the command I used:

/summon Villager ~ ~1 ~ {ActiveEffects:[{Ambient:0b,ShowParticles:1b,Duration:99999,Id:2b,Amplifier:99b}],Tags:["slowTest"]}

The code for the effects is directly copied from an existing mob with an effect. I merely changed the Id, Duration and Amplifier. Even so, I tested it by changing the Id. When changed, it works perfectly, unless I change it to speed.

Related issues

Attachments

Comments

migrated
[media][media]
[Mod] Neko

Dupe of MC-32575

migrated

MC-32575 doesn't say anything about Minecraft version 1.10

Skylinerw

That wouldn't matter because it's working as intended. ActiveEffects is just storage for effects. Status effects that require extra instantiation will not do so by just specifying storage; in this case the Speed effect must instantiate a modifier for the generic.movementSpeed attribute. You should use Attributes instead of ActiveEffects to modify attributes.

migrated

Well then, I guess I'm off to learn more about the structure and the tags that influence it. Thank you for taking the time to explain it to me. How do I delete this post?

pokechu22

You can't delete issues, but it's not really an issue to just leave it around (duplicates aren't necessarily bad if they help others find it, though that doesn't mean it's a good idea to intentionally create duplicates).

FYI: If you find an issue that seems to fit the problem you're having but it doesn't have the version you're using listed, leave a comment on it and that version can be added to it by a helper or mod - no need to create a new issue.

migrated

This is disappointing; being able to summon a mob with slowness via active effects would allow for a temporary effect without having to manually modify the entity's movementSpeed attribute later.

Skylinerw

@@unknown You don't need to use external commands. When the Speed effect expires in ActiveEffects, it removes the corresponding modifier in Attributes based on UUID pair, which will always be the same UUID for the Speed effect. You can replicate the modifier like so:

/summon Pig ~ ~1 ~ {ActiveEffects:[{Id:1b,Duration:100}],Attributes:[{Name:"generic.movementSpeed",Base:0.25,Modifiers:[{Name:"test",Amount:-1.0,Operation:2,UUIDMost:-7949229004988660584l,UUIDLeast:-7828611303000832459l}]}]}

After 100 ticks, the modifier is deleted automatically, allowing the pig to move.

migrated

@Skylinerw
Thanks! I'll have to look up more about the "modifiers" bit, bit at least this works.

migrated

(Unassigned)

Unconfirmed

Minecraft 1.10.2

Retrieved