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

Worlds created with the bukkit ChunkGenerator cannot save

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • None
    • Java 16, no plugins except world generator. 5GB Xms and Xmx

    • CraftBukkit version 3137-Spigot-66f9d3c-85b8c1f (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
    • Yes

      package org.basicworldgenerator.main;
      
      import java.util.Random;
      
      import org.bukkit.Material;
      import org.bukkit.World;
      import org.bukkit.generator.ChunkGenerator;
      
      public class BasicWorldChunkGenerator extends ChunkGenerator {
      
      	@Override
          public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, BiomeGrid biome) {
          	ChunkData chunk = createChunkData(world);
              
              for (int X = 0; X < 16; X++)
                  for (int Z = 0; Z < 16; Z++) {
                      for(int y = 1; y < 150; y++)
                          chunk.setBlock(X, y, Z, Material.DIRT);
      
                      chunk.setBlock(X, 150, Z, Material.GRASS_BLOCK);
                      chunk.setBlock(X, 0, Z, Material.BEDROCK);
                  }
              return chunk;
          }
      	
      }
      
      

      With this registered chunk generator class, the world will generate as per normal (all blocks correct), but if you stop the server with the stop command, and start it up again, this error will be spammed in the console, and all the chunks will be generated again (no saved blocks). 

      Steps to reproduce:

      1. Add the BasicChunkGenerator plugin to plugins folder
      2. Add this to bukkit.yml 
        worlds:
          world:
            generator: BasicChunkGenerator
        
      1. Run the server.
      2. Join the server, and break one grass block, then place it somewhere you can remember
      3. Stop the server with /stop
      4. Start the server
      5. See the errors, rejoin the game to check for the grass block you moved.

       

       

      Attached is the plugin used to reproduce this issue

       

      Additional notes: This bug did not happen when I only generated bedrock at y=0. It happened definitively after I added the dirt and grass blocks.

            Unassigned Unassigned
            Hex_27 Leonard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: