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
.
Confirmed.