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

BlockPopulator Crash in Negative Coords


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • This server is running CraftBukkit version git-Spigot-798ea6a-2012f1e (MC: 1.14.4) (Implementing API version 1.14.4-R0.1-SNAPSHOT)
    • Yes

      In 1.13 - 1.14 + versions of spigot, blockpopulators crash the server when modifying blocks on the edge of the given chunk.  However, this only happens when the chunks have a negative coord values such as x being a negative number, z, or both being negative at the same time.  If both coords are positive, blocks on the edge of the chunk are able to be modified without the server crashing.


      This applies to both getting the block and modifying the block.


      public void populate(World wor, Random rand, Chunk chnk) {  
      int cX = chnk.getX() * 16; 
      int cZ = chnk.getZ() * 16; 
      int cXOff = cX; 
      int cZOff = cZ;  
      Location l = new Location(wor, cXOff, 100, cZOff);
      l.getBlock().setBlockData(Material.OBSIDIAN.createBlockData(), false);


            Unassigned Unassigned
            Evil_Lootly Lootly Bularia
            0 Vote for this issue
            5 Start watching this issue