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

Chunk Snapshot getBlockType(x,y,z) incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None
    • Plugin Test Environment running Ubuntu

      No plugins besides the one I'm testing

    • git-Spigot-fe3ab0d-162bda9 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)git-Spigot-
    • Yes

      ChunkSnapshot.getBlockType(x,y,z) will return an incorrect Material type for a specific location. It seems to be off by one in the y coordinate.

      What I'm trying to do is scan a chunk starting at y = 60 until I find air blocks which are 1 block above water blocks, so that I can store a set of block changes to go ahead and make back on the main thread later. The idea here is to simulate a 1 block sea level rise in a chunk.

      From what i've read ChunkSnapshot is meant for plugins like dynmap where an off by one in the Y coordinate isn't a big deal.

      I've attached the log file from my testing. The true sea level is indeed at y=62, and notice that the chunk snapshot method returns that y=62 for the entire chunk is AIR, when it is not.

      Since the plugin I'm testing which recreates this issue is not quite available yet, I attached the two source files which I've been using to test. These wont be usable in-game without a bit of other stuff, but it gives you an idea for what I'm trying to do.

       

       

       

       

        1. EffectEngine.java
          2 kB
        2. latest.log
          67 kB
        3. SeaLevelRise.java
          3 kB

            Unassigned Unassigned
            nsporillo Nick Porillo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: