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

Double slabs can be placed accidentally when clicking too fast



    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.15.2, 20w07a, 20w49a, 1.17.1, 1.18 Release Candidate 3
    • None
    • Confirmed
    • Input


      The bug

      When placing slabs very fast, it is possible to place double slabs even though that should not be possible based on the viewing angle of the player.

      To reproduce

      1. Set your "Use Item/Place Block" controls setting to a keyboard key
      2. Look straight at a wall
      3. Sneak
      4. Place slabs
        Sometimes, double slabs will be placed

      Original description

      When using a macro to place slabs really fast at eye level, i expected all the slabs to be placed as if i had placed them 1 by 1, creating a floor.

      What actually happened was they all became double slabs, even though my cursor was never on the bottom or top of the slabs (this happens for both upper and lower slabs, as well as in the different game modes).

      Steps to Reproduce:
      1. Align your cursor to place slabs at eye level (top or bottom half works)
      2. Click absurdly fast using a macro
      3. Voila, a row of double slabs, rather than a row of normal slabs

      Code analysis

      Code analysis by mexiscool in this comment:

      In the SlabBlock class, the getStateForPlacement(...) method does not check if the click location height matches that of the empty half before making it a double slab.




            Unassigned Unassigned
            TheSkullyKO Spencer Frenette
            7 Vote for this issue
            4 Start watching this issue