Requiem - Pandemonium Expansion

Requiem - Pandemonium Expansion

55k Downloads

Mob Movement Speed Tweaks

PsychoBreadstick opened this issue ยท 6 comments

commented

I've noticed that a lot of mobs don't have accurate movement speeds when the player possesses them, turtles on land is one example of this, or foxes when they're scared. I think this should be fixed by setting values for movement speeds based on their conditions in vanilla.

commented

Thanks for the report ! Horses are a bit special as they only use their full speed when mounted, but turtles should be easy to fix. Would you mind listing all the mobs that are in this case ?

commented

Do foxes have higher base speed, or situational speed boosts ?

commented

Only took a year and a half to answer this, I believe their speed is situational only when near a threat or when damaged.

commented

Adding on to this issue, while some vanilla mobs (e.g. zombies) only have one speed value that they use to move around, many have two separate speed values instead of just one, including some hostile or neutral mobs like piglins, iron golems, vindicators and zombified piglins, and passive mobs like foxes (as mentioned above), cats, ocelots, sheep, cows and pigs.

These mobs change their speed based on certain conditions. For example, most mobs use their normal speed when roaming randomly. Hostile mobs usually speed up when attacking a target, while passive mobs speed up when running away from attackers or when running away from any entity (e.g. ocelots running away from players, rabbits running away from wolves). Some mobs (e.g. hoglins) speed up both when attacking and when they run away from attackers (since they can do both, depending on the occasion).

My idea is that for the mobs that have separate speed values, holding the sprint key while possessing the mob and walking will match the mob's faster speed, but not holding it will match it's normal speed. For example, foxes should normally walk using their regular roaming speed, but if you hold the sprint key they should use the speed they use while panicking. The same should apply to other mobs that panic and run faster when attacked or when avoiding certain entities (which basically means most passive mobs). This also applies to many hostile mobs, where holding the sprint key will match the mob's faster speed that it uses for attacking.

However, for the mobs that only have one speed value, holding down the sprint key should not change your speed at all while possessing them, so that you move at the same speed whether you're sprinting or not. This also means that vanilla sprinting should be disabled for these mobs (currently you can sprint as any mob).

@Pyrofab

commented

There are also differences in movement speeds between land and water (see above for turtle) and some mobs might even have two separate speed values when underwater (e.g. drowned swimming). I am not completely sure about that last thing, though. But it is something that should be considered.

commented

Also, #425 should be added to the list