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

A living entity can go thru cobwebs faster if next to sweet berry bushes in an increased axis

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • 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
    • None
    • Community Consensus
    • Entities
    • Low
    • Gameplay

      The Bug:

      When a living entity is falling next to a berry bush and a cobweb, the block that has the higher position in certain axes will be the one to change the velocity multiplier. This can cause an entity to fall quicker thru a cobweb than it normally should. The block that has the slower velocity multiplier should take priority rather than by position. Watch video for a better example than the setup below.

      Steps:

      1) Create a world.

      2) Create the following setup:

      3) Fall on the different sides to see how the velocity differs.

      Code analysis:

      Using Yarn mapping 1.16.3:

      In the CobwebBlock, it used the entity.slowMovement method.

      public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
          entity.slowMovement(state, new Vec3d(0.25, 0.05f, 0.25));
      }
      

      In the SweetBerryBushBlock, it uses the same thing.

      public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
      //removed code
          entity.slowMovement(state, new Vec3d(0.8f, 0.75, 0.8f));
      //removed code
      }

      As they are both using the same call, the one that is called last will change the velocity. 

      Video:

      https://youtu.be/-2uqQVb_8aA

            Unassigned Unassigned
            Kman032317 Kyle Weber
            Votes:
            21 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: