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

Spectator mode uses survival block and entity reach distance instead of creative

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 1.10.2, Minecraft 16w41a, Minecraft 1.11, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b, Minecraft 18w06a, Minecraft 1.13.1, 1.15.1, 1.15.2 Pre-release 2, 1.15.2, 1.16.3, 1.16.4 Pre-release 1, 20w46a, 21w03a, 21w05b, 21w06a, 1.20.2, 1.20.3 Pre-Release 2, 24w05b, 1.21
    • Confirmed
    • Spectator
    • Player

      The bug

      In spectator mode you have the same block and entity reach distance as in survival or adventure mode when you try to open containers.
      I would expect it to use the reach distance of creative mode as a higher reach distance gives no gameplay advantage in spectator mode but makes interaction a little bit easier.

      How to reproduce

      1. Change your gamemode to creative
      2. Stand in the middle of a block
      3. Use the following command or just place a chest in +x direction manually
        /setblock ~1 ~ ~ chest
        
      4. Use the following command
        /tp ~-4.4 ~ ~
        
      5. Try to open the chest; it should work
      6. Switch to spectator mode and try to open the chest again
        You are unable to open the chest

      The reason

      The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

      The method net.minecraft.client.multiplayer.PlayerControllerMP.getBlockReachDistance() returns only 4.5 if the player is in creative mode otherwise it returns 4. Additionally the method net.minecraft.client.multiplayer.PlayerControllerMP.extendedReach() is called to test if the player is in creative mode and in that case sets the entity reach distance to 6 (might not be the case anymore in 1.11+).

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            11 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: