BlockPopulator Crash in Negative Coords

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: 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.

       

      @Override
      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);
      
      }

       

            Assignee:
            Unassigned
            Reporter:
            Lootly Bularia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: