Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-262496

Slowdown from Cobwebs / Sweet Berry Bushes / Powder Snow has directional priority

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.3, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w08b, 21w11a, 21w15a, 1.18.1, 1.19, 1.19.4
    • None
    • Plausible
    • Block states, Player
    • Normal
    • Gameplay

      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.

            Unassigned Unassigned
            MokaiDecidueye MokaiDecidueye
            Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: