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

worldborder add allows size >= 0 while worldborder set only allows size >= 1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.8.7, Minecraft 16w05a, Minecraft 1.9, Minecraft 1.9.1, Minecraft 1.9.2, Minecraft 16w15b, Minecraft 1.10.2, Minecraft 16w41a, Minecraft 16w42a, Minecraft 1.11.2, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b
    • Fix Version/s: Minecraft 18w02a
    • Confirmation Status:
      Confirmed

      Description

      The bug

      When using /worldborder set 0 it gives you an error message and says that it has to be at least 1.0, however when using /worldborder add -60000000 it works perfectly fine. When you try after that to reduce the size of the worldborder, it will say that the maximum size is 0.

      /worldborder set
      [14:20:26] [Client thread/INFO]: [CHAT] Set world border to 1,0 blocks wide (from 10,0 blocks)
      [14:20:29] [Client thread/INFO]: [CHAT] The number you have entered (0.0) is too small, it must be at least 1.0
      
      /worldborder add
      [14:20:36] [Client thread/INFO]: [CHAT] Set world border to 0,0 blocks wide (from 1,0 blocks)
      [14:20:37] [Client thread/INFO]: [CHAT] The number you have entered (-1.0) is too small, it must be at least -0.0
      

      The reason

      The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

      The reason why this happens is because the method net.minecraft.command.CommandWorldBorder.execute(MinecraftServer, ICommandSender, String[]) only tests for the "add" argument if the value is between -diameter and 60,000,000 - diameter. Instead it should test if the value is between -diameter + 1 and 60,000,000 - diameter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                marcono1234 [Mod] Marcono1234
              • Votes:
                3 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: