Minecraft – Summoned Zombies acting weird

minecraft-commandsminecraft-java-edition

So I'm summoned a spawner via:

/setblock ~ ~1 ~ minecraft:mob_spawner 0 replace {SpawnData:{id:"Zombie",ArmorItems:[{},{},{},{id:skull,Damage:2,Count:1}],Attributes:[{Name:generic.followRange,Base:200}],Silent:1,LeftHanded:1,Team:"Attack",Passengers:[{id:"Squid",Air:9999999,Silent:1,Team:"Attack",ActiveEffects:[{Id:14,Amplifier:0,Duration:199999980,ShowParticles:0b}]}]},SpawnCount:1,SpawnRange:3,RequiredPlayerRange:2000,Delay:1,MinSpawnDelay:1,MaxSpawnDelay:200,MaxNearbyEntities:50}

and they spawn and track me properly, but they move really slow as if they had a potion of slowness. At first I was thinking collisionrule for teams but when I turned it off they were still really slow. Anyone know why? I am doing this in 1.9.2.

Best Answer

As of 1.9, a mob that is riding another mob will attempt to override the pathfinding of the host, including movement speed. The squid has a much slower movement speed than the zombie.

To circumvent that, you would need to either increase the movement speed of the squid or disable the squid's AI to prevent it from overriding.

As well, the Air tag is stored as a short, meaning it has a minimum of -32768 and maximum of 32767. Inputting a value outside that range will cause it to overflow to a value you may not want. In this instance, it overflows to negatives.

You do not want to set a tag's value to a random high number. You need to stay within the boundaries of the datatype. You can find the datatypes and their storage sizes here.

Fixed command, disabling the squid's AI:

/setblock ~ ~1 ~ minecraft:mob_spawner 0 replace {SpawnData:{id:"Zombie",ArmorItems:[{},{},{},{id:skull,Damage:2,Count:1}],Attributes:[{Name:generic.followRange,Base:200}],Silent:1,LeftHanded:1,Team:"Attack",Passengers:[{id:"Squid",NoAI:1b,Air:32767,Silent:1,Team:"Attack",ActiveEffects:[{Id:14,Amplifier:0,Duration:199999980,ShowParticles:0b}]}]},SpawnCount:1,SpawnRange:3,RequiredPlayerRange:2000,Delay:1,MinSpawnDelay:1,MaxSpawnDelay:200,MaxNearbyEntities:50}