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

/spreadplayers gives misleading error when there are no solid blocks present

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 20w21a, 1.16 Pre-release 2, 1.16 Pre-release 8, 1.16.2, 1.16.3, 1.16.4, 20w51a, 1.16.5, 21w19a, 1.17, 1.17.1, 1.18, 1.18.1, 22w03a, 1.18.2, 1.19, 1.19.1, 1.19.3, 1.19.4
    • None
    • Confirmed
    • Text
    • Low
    • Platform

      The /spreadplayers command gives a completely nonsensical error message when there are no solid blocks on top of which the players can be spread. The same nonsensical error message happens when there is no room for an entity in the spread range due to the lack of any air blocks (i.e. all possible spread positions are occupied by solid blocks).

      This is most easily seen when using the new under parameter for /spreadplayers, but can also happen when trying to use /spreadplayers without the new parameter in a completely void world.

      To Reproduce:

      1. Create a new superflat world with the following preset:

      113*minecraft:air,minecraft:sandstone;minecraft:desert
      

      2. Run the following command:

      /spreadplayers 0 0 0 100 under 40 false @a
      

      The command should either teleport the player into the void or throw an error that there are no solid blocks available for teleport. Instead, the following error appears:

      Could not spread 1 entities around 0.5, 0.5 (too many entities for space - try using spread of at most 0.00)
      

      Which is ridiculous, as the spread distance is already 0.

            Unassigned Unassigned
            elyg Ely G
            Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              CHK: