Contents
Class FullBrightLightCalculation
java.lang.Object
com.hypixel.hytale.server.core.universe.world.lighting.FullBrightLightCalculation
- All Implemented Interfaces:
LightCalculation
- Since:
- 20/10/17.
- Version:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionFullBrightLightCalculation(ChunkLightingManager chunkLightingManager, LightCalculation delegate) -
Method Summary
Modifier and TypeMethodDescriptioncalculateLight(org.joml.Vector3i chunkPosition) Calculates the lighting for a chunk section.voidinit(ChunkGrid chunkGrid, Ref<ChunkStore> sectionRef) booleaninvalidateLightAtBlock(ChunkGrid chunkGrid, int blockX, int blockY, int blockZ, BlockType blockType, int oldHeight, int newHeight) Updates or queues an update for lighting at a block position.booleaninvalidateLightInChunkSections(ChunkGrid chunkGrid, int chunkX, int chunkZ, int sectionIndexFrom, int sectionIndexTo) Updates or queues an update for lighting in chunk for sections in rangesectionIndexFrom(inclusive) tosectionIndexTo(exclusive)static voidsetFullBright(ChunkGrid chunkGrid, int chunkX, int chunkY, int chunkZ)
-
Constructor Details
-
FullBrightLightCalculation
public FullBrightLightCalculation(ChunkLightingManager chunkLightingManager, LightCalculation delegate)
-
-
Method Details
-
init
- Specified by:
initin interfaceLightCalculation
-
calculateLight
Description copied from interface:LightCalculationCalculates the lighting for a chunk section.- Specified by:
calculateLightin interfaceLightCalculation- Parameters:
chunkPosition- The position of the chunk to calculate lighting for.- Returns:
trueif the chunk was processed andfalseif 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:LightCalculationUpdates or queues an update for lighting at a block position.- Specified by:
invalidateLightAtBlockin interfaceLightCalculation- 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:
trueif the update has been handled orfalseif the update is deferred.
-
invalidateLightInChunkSections
public boolean invalidateLightInChunkSections(@Nonnull ChunkGrid chunkGrid, int chunkX, int chunkZ, int sectionIndexFrom, int sectionIndexTo) Description copied from interface:LightCalculationUpdates or queues an update for lighting in chunk for sections in rangesectionIndexFrom(inclusive) tosectionIndexTo(exclusive)- Specified by:
invalidateLightInChunkSectionsin interfaceLightCalculation- 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:
trueif the update has been handled now
-
setFullBright
-