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

Spawner Minecarts MaxNearbyEntities ignores SpawnRange

XMLWordPrintable

    • Unconfirmed
    • Creative

      EDIT: Error seems to be the elevation difference. And while alterable height/targetable region for MaxNearbyEntities would be nice, it seems to be Working as Intended.

      While attempting to recreate a scene from The Hobbit for my Brit Lit class, I built a rail line with Minecart Spawners behind a back wall. The spawner was set to a delay of 1 tick, maximum and minimum. I set the mobs to have coordinates about 50 blocks away (via the Pos tags), changed SpawnRange to 200, and set MaxNearbyEntities to 1. the spawn destination was about 10 blocks lower than the Minecart.

      I expected that, since I was spawning the mob at a position well within 200 blocks of the spawner, once a single mob had been spawned no more would be able to.

      They spawned. Rapidly. Noting the Gandalfs (renamed Witches) and Bilbos (renamed Baby Zombie Pigman) flooding the diorama, I quickly switched the difficulty to peaceful.

      Steps to reproduce:
      1. Place a minecart spawner.
      2. Use an NBT editor to spawn mobs at coordinates 30 blocks away.
      3. Set SpawnRange to 500.
      4. Set MaxNearbyEntities to 1.
      5. Set max and min delay to 10.

      After checking a copy of the source code, I suspect the problem is located in zs.class(MobSpawnerBaseLogic) at line 99, which searches for entities in a certain area with one parameter being 4.0D (the default spawn range), but that's just a guess.

            Unassigned Unassigned
            SquirrelFriend Alex Chong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: