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

Custom spawners with no delay variance crash the game

XMLWordPrintable

    • Unconfirmed

      I was trying to modify my custom map to have a set delay in spawning entities. Timing is important, so even a 1 tick delay makes a difference. So I modified the spawner to have exactly the same minimum and maximum delay.

      What I expected to happen was to have a spawner that could spawn using exact timing and would not randomize the amount of time needed to spawn the next entity.

      What actually happened was the spawner crashed the game because the randomizer could not accept 0 as a difference between values.

      Steps to reproduce:
      1. Place a spawner in Minecraft.
      2. Open MCEdit and use the Change Spawners filter, modify the values of the minimum and maximum delay to the same amount (doesn't need a specific value). Save the world.
      3. Open the world in Minecraft and go into the detection range of the spawner. You will receive a crash report. (I have included mine as an attachment)

      Temporary Workarounds
      If the delay difference has a difference even by 1 tick, it will work as intended. However, I need my map to spawn the entities at that exact rate, or it will not work. Thus this workaround is useless for me.

      Possible fixes
      Use an if-else statement to check if the delay difference is 0, and if so, skip the randomizer and use that delay instead.

            dinnerbone [Mojang] Nathan Adams
            grygrflzr GrygrFlzr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: