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

/setblock at Y=256 shows unique message compared to using other outside-world setblock commands / Using /setblock at Y>256 says max building height is 256

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 17w45a
    • Minecraft 1.8.8, Minecraft 15w43c, Minecraft 15w44a, Minecraft 15w44b, Minecraft 15w45a, Minecraft 15w46a, Minecraft 15w47a, Minecraft 15w47c, Minecraft 15w49a, Minecraft 15w49b, Minecraft 15w50a, Minecraft 15w51b, Minecraft 16w06a, Minecraft 1.9 Pre-Release 1, Minecraft 1.9.4, Minecraft 16w20a, Minecraft 1.10.2, Minecraft 16w43a, Minecraft 1.11.2, Minecraft 17w14a, Minecraft 17w16b, Minecraft 1.12, Minecraft 1.12.1
    • Confirmed

      The bug

      Using the /setblock command at exactly Y=256 is the only command that shows the message "The block couldn't be placed". Using /setblock at all other Y-coordinates that are outside of the building range of the world shows the message "The number you have entered (Y) is too (big/small), it must be at (most/least) 256". This message also states that the max height for building is 256, which is false.

      To reproduce

      1. /setblock ~ 256 ~ stone
      2. /setblock ~ 257 ~ stone
      3. Compare the messages gotten from performing previous steps

      Code analysis

      By marcono1234

      The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.

      The reason for this is that the method net.minecraft.command.CommandBase.parseBlockPos(ICommandSender, String[], int, boolean) defines 256 as maximum y value.

      Suggested fix

      Making so attempting to place a block by not using /setblock at Y=256 shows the text "The block couldn't be placed", or more fitting, "You can't build this high" over the hotbar, just like when trying to sleep at day. Using /setblock at Y=256 should show the message "The number you have entered (256.00) is too big, it must be at most 255".

            Unassigned Unassigned
            swekob Swekob
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: