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

/spreadplayers maxRange has to be >= 1 despite not being centered on block grid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 18w05a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w08b, 21w17a, 1.17
    • Confirmed
    • (Unassigned)

      The bug

      The maxRange parameter of /spreadplayers has to be greater than or equal to 1 despite not being centered on the block grid. This makes it difficult to consistently limit the amount of valid locations to less than 9.

      This does not apply to 1.12.2 since /spreadplayers run apparently centered on the block grid.

      How to reproduce

      1. Use the following command
        /execute as @s at @s align xz run teleport @s ~0.1 ~ ~0.1
        
      2. Spawn multiple entities around you, for example armor stands
      3. Use the following /spreadplayers command
        /spreadplayers ~ ~ 0.0 1 false @e[type=!player]
        

        → The entities are teleported to 9 possible blocks, but how would you define that only the closest 4 blocks should be used?

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

              Created:
              Updated:
              CHK: