Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-2575

Custom populators are added twice when creating world using WorldCreator/Bukkit.createWorld

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None

      This is issue causes this issue in my plugin: https://github.com/Barteks2x/173generator/issues/10. It happens only when using multi-world plugin (multiverse in this case, but it doesn't really matter).

      The bug in my plugin is that snow layer is generated twice. The reason is that my populator is always called twice, even if I return only one populator from ChunkGenerator.getDefaultPopulators.

      The reason in code:
      CraftServer.createWorld(...) first creates new WorldServer, and calls method b(). b() has craftbukkit patch to add all populators from custom generator.

      Then CraftServer.createWorld(...) adds all populators again, which results in all populators being added twice.

      For most generators it doesn't cause any visible issues because they are pseudo-random but deterministic. Positions of generated structures and resources are always the same, so the second time they are simply overwritten. But it does make generation much slower and may cause duplication bugs (like in my plugin).

            Unassigned Unassigned
            Barteks2x Bartosz Skrzypczak
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: