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

Structures check if they can spawn in a chunk 256 times per chunk, each

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • Minecraft 1.12.2
    • None
    • Unconfirmed

      In MapGenBase#generate(World, int, int, ChunkPrimer) a loop, by default, iterates over a 16x16 area as defined by int range and calls recursiveGenerate(World, int, int, int, int, ChunkPrimer) each iteration; as MapGenStructure extends MapGenBase but does not override the default constructor, range continues to be defined as 8, causing the structure to check canSpawnStructureAtCoords(int, int) a total of 256 times in every chunk it cannot generate in, otherwise it checks once and then checks the Long2ObjectMap 255 times.

       
      Edit:
      This also occurs during chunk loading.

            ProfMobius ProfMobius (Thomas Guimbretiere)
            skyboy skyboy
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: