When touching any combination of Cobweb, Sweetberry bushes, and Powder Snow, the player (and any other entities) are slowed down according the SouthEast / South / East block.
All three blocks use the same method makeStuckInBlock
to set a vector stuckSpeedMultiplier
to slow the entity's movement for that tick, by different amounts. The method simply overrides the vector regardless if a previous block set it, so the last block to be processed determines the amount by which the entity is slowed. The outcome is that you can move through cobwebs faster than normal while walking through powder snow and Sweetberry bushes, but only on the North and West sides of the web.
A boolean flag is enough to make sure the 'strongest' slowdown is applied; Set the flag to true when makeStuckInBlock
is first called, and set the vector to the passed vector. On future calls (marked by the flag being true), compare the incoming vector to the old one, and use whichever is slower. Then, reset the flag to false after using {{stuckSpeedMultiplier}} in the Entity's movement method.
Linked issues
is duplicated by 1
Attachments
Comments 0
No comments.