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

Blocks cannot be placed on a block you are next to


    • Icon: Bug Bug
    • Resolution: Fixed
    • Snapshot 13w04a, Minecraft 1.7.4, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w32d, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1, Minecraft 1.8.2-pre4, Minecraft 1.8.2-pre5, Minecraft 1.8.2-pre6, Minecraft 1.8.2-pre7, Minecraft 1.8.2, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w32a, Minecraft 16w04a, Minecraft 16w05a, Minecraft 16w05b, Minecraft 1.9 Pre-Release 1, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w14a, Minecraft 16w15a, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 1.11, Minecraft 17w06a
    • Confirmed
    • Creative

      The bug

      Sometimes blocks cannot be placed on a block you directly standing next to. When you place them they appear for a short moment (client-side) but directly afterwards disappear.

      How to reproduce

      1. Dig a 1 block deep hole
      2. Move up against any side or corner of the hole
      3. Attempt to place a repeater or comparator on the block you moved towards
        → The repeater will appear and disappear immediately, as if the server thinks you are occupying the space and cannot place a block.

      If you cannot reproduce the bug, try sprinting against the block.


      The cause seems to be that the server thinks the player is intersecting with the collision box of the block to be placed while the client thinks he is not.
      For example

      To check: box[13.0, 4.0, 8.0 -> 14.0, 4.875, 9.0]
      Client player: box[14.0, 4.0, 8.080747030085668 -> 14.600000023841854, 5.799999952316284, 8.680747053927526]
      Server player: box[13.999999999999998, 4.0, 8.085848427457286 -> 14.600000023841856, 5.799999952316284, 8.685848451299144]

      However, it is interesting that the server let the client move inside the block in the first place.

      Code analysis

      Based on 1.11.2 decompiled using MCP 9.35 rc1

      Removed part
      The reason why the method net.minecraft.network.NetHandlerPlayServer.processPlayer(CPacketPlayer) did not prevent the movement then is because it contracts the player bounding box by 0.0625. Removing this might solve the problem as well, but could result in the player being teleported back when running with the speed effect against a wall or similar.

      Edit: Code analysis was partwise wrong. The actual reason is not quite clear.

            Unassigned Unassigned
            kpreid Kevin Reid
            25 Vote for this issue
            11 Start watching this issue