All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
NMSRelighter, NullRelighter

public interface Relighter extends AutoCloseable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addChunk(int cx, int cz, byte[] skipReason, int bitmask)
    Add a chunk to be relit when removeLighting() etc are called.
    void
    addLightUpdate(int x, int y, int z)
    Add a block to be relit.
    void
    Clear all chunks and blocks to be relit.
    void
    Fix block light values in all chunks added to relighter.
    void
    fixLightingSafe(boolean sky)
    Safely? Fix block lighting.
    void
    Fix sky light values in all chunks added to relighter.
     
    boolean
    Are there any block or chunk added to be relit.
    boolean
    Returns true if the Relighter has been flushed
    default void
    removeAndRelight(boolean sky)
    Remove lighting and then relight safely.
    void
    Remove all block and sky light values (set to 0 light) in all chunks added to relighter.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • addChunk

      boolean addChunk(int cx, int cz, byte[] skipReason, int bitmask)
      Add a chunk to be relit when removeLighting() etc are called.
      Parameters:
      cx - chunk x
      cz - chunk z
      skipReason - byte array of Relighter.SkipReason for each chunksection in the chunk. Use case? No idea.
      bitmask - Initial bitmask of the chunk (if being edited beforehand)
      Returns:
      Was the chunk added
    • addLightUpdate

      void addLightUpdate(int x, int y, int z)
      Add a block to be relit.
      Parameters:
      x - block x
      y - block y
      z - block z
    • fixLightingSafe

      void fixLightingSafe(boolean sky)
      Safely? Fix block lighting.
      Parameters:
      sky - whether to also relight sky light values
    • removeAndRelight

      default void removeAndRelight(boolean sky)
      Remove lighting and then relight safely.
      Parameters:
      sky - whether to also relight sky light values
    • clear

      void clear()
      Clear all chunks and blocks to be relit.
    • removeLighting

      void removeLighting()
      Remove all block and sky light values (set to 0 light) in all chunks added to relighter.
    • fixBlockLighting

      void fixBlockLighting()
      Fix block light values in all chunks added to relighter.
    • fixSkyLighting

      void fixSkyLighting()
      Fix sky light values in all chunks added to relighter.
    • isEmpty

      boolean isEmpty()
      Are there any block or chunk added to be relit.
      Returns:
      is the relight stuff to be relit empty
    • getLock

      ReentrantLock getLock()
    • isFinished

      boolean isFinished()
      Returns true if the Relighter has been flushed
      Returns:
      true if finished