Class FullBrightLightCalculation

java.lang.Object
com.hypixel.hytale.server.core.universe.world.lighting.FullBrightLightCalculation
All Implemented Interfaces:
LightCalculation

public class FullBrightLightCalculation extends Object implements LightCalculation
Since:
20/10/17.
Version:
1.0
  • Constructor Details

  • Method Details

    • init

      public void init(ChunkGrid chunkGrid, Ref<ChunkStore> sectionRef)
      Specified by:
      init in interface LightCalculation
    • calculateLight

      @Nonnull public CalculationResult calculateLight(@Nonnull org.joml.Vector3i chunkPosition)
      Description copied from interface: LightCalculation
      Calculates the lighting for a chunk section.
      Specified by:
      calculateLight in interface LightCalculation
      Parameters:
      chunkPosition - The position of the chunk to calculate lighting for.
      Returns:
      true if the chunk was processed and false if the chunk is waiting for something
    • invalidateLightAtBlock

      public boolean invalidateLightAtBlock(@Nonnull ChunkGrid chunkGrid, int blockX, int blockY, int blockZ, @Nonnull BlockType blockType, int oldHeight, int newHeight)
      Description copied from interface: LightCalculation
      Updates or queues an update for lighting at a block position.
      Specified by:
      invalidateLightAtBlock in interface LightCalculation
      Parameters:
      chunkGrid - The chunk store containing the block.
      blockX - The x coordinate of the block.
      blockY - The y coordinate of the block.
      blockZ - The z coordinate of the block.
      blockType - The type of the block.
      oldHeight - The old height of the block.
      newHeight - The new height of the block.
      Returns:
      true if the update has been handled or false if the update is deferred.
    • invalidateLightInChunkSections

      public boolean invalidateLightInChunkSections(@Nonnull ChunkGrid chunkGrid, int chunkX, int chunkZ, int sectionIndexFrom, int sectionIndexTo)
      Description copied from interface: LightCalculation
      Updates or queues an update for lighting in chunk for sections in range sectionIndexFrom (inclusive) to sectionIndexTo (exclusive)
      Specified by:
      invalidateLightInChunkSections in interface LightCalculation
      Parameters:
      chunkGrid - The chunk to update lighting for.
      chunkX - The chunk x coordinate.
      chunkZ - The chunk z coordinate.
      sectionIndexFrom - The section index to start from (inclusive).
      sectionIndexTo - The section index to end at (exclusive).
      Returns:
      true if the update has been handled now
    • setFullBright

      public static void setFullBright(@Nonnull ChunkGrid chunkGrid, int chunkX, int chunkY, int chunkZ)