public class FloodLightCalculation implements LightCalculation
Class FloodLightCalculation. Provides floodlightcalculation functionality for the Hytale server.
java.lang.Object > FloodLightCalculation
Field Summary
x
Field x.
z
Field z.
chunk
Field chunk.
section
Field section.
chunkX
Field chunkX.
chunkY
Field chunkY.
chunkZ
Field chunkZ.
worldChunk
Field worldChunk.
chunkLightTiming
Field chunkLightTiming.
fineLoggable
Field fineLoggable.
accessor
Field accessor.
obj
Field obj.
toSection
Field toSection.
fluidSection
Field fluidSection.
localLightResult
Field localLightResult.
globalLightResult
Field globalLightResult.
chunkDiff
Field chunkDiff.
start
Field start.
solidAir
Field solidAir.
end
Field end.
diff
Field diff.
globalLight
Field globalLight.
bitSetQueue
Field bitSetQueue.
oldHeightChunk
Field oldHeightChunk.
newHeightChunk
Field newHeightChunk.
from
Field from.
to
Field to.
handled
Field handled.
world
Field world.
worldChunkTemp
Field worldChunkTemp.
sectionY
Field sectionY.
light
Field light.
column
Field column.
height
Field height.
changedColumns
Field changedColumns.
x2
Field x2.
z2
Field z2.
skyLight
Field skyLight.
propagatedValue
Field propagatedValue.
nx
Field nx.
nz
Field nz.
neighbourColumn
Field neighbourColumn.
neighbourSkyLight
Field neighbourSkyLight.
iterator
Field iterator.
column2
Field column2.
skyLight2
Field skyLight2.
toLight
Field toLight.
blockIndex
Field blockIndex.
skyValue
Field skyValue.
blockId
Field blockId.
blockType
Field blockType.
blockTypeLight
Field blockTypeLight.
fluidId
Field fluidId.
fluid
Field fluid.
fluidLight
Field fluidLight.
originY
Field originY.
hasSky
Field hasSky.
fromBlockType
Field fromBlockType.
fromOpacity
Field fromOpacity.
lightValue
Field lightValue.
redLight
Field redLight.
greenLight
Field greenLight.
blueLight
Field blueLight.
y
Field y.
ny
Field ny.
neighbourBlock
Field neighbourBlock.
blockParts
Field blockParts.
partSections
Field partSections.
directions
Field directions.
side
Field side.
fromSection
Field fromSection.
neighbourChunk
Field neighbourChunk.
fromSection2
Field fromSection2.
fromSectionsSides
Field fromSectionsSides.
fromLight
Field fromLight.
fromBlockIndex
Field fromBlockIndex.
toBlockIndex
Field toBlockIndex.
fromSectionsEdges
Field fromSectionsEdges.
fromSectionsCorners
Field fromSectionsCorners.
toBlockType
Field toBlockType.
toOpacity
Field toOpacity.
oldLightValue
Field oldLightValue.
Method Detail
FloodLightCalculation
Method FloodLightCalculation.
- Parameters:
final ChunkLightingManagerchunkLightingManager
initChunk
void
initChunk
(final int x, final int z)
Method initChunk.
- Parameters:
final intxfinal intz
initNeighbours
void
initNeighbours
(final int x, final int z)
Method initNeighbours.
- Parameters:
final intxfinal intz
initSection
Method initSection.
- Parameters:
@Nonnull final WorldChunkchunkfinal intxfinal intyfinal intz
Vector3i
new
Vector3i
(x, y, z)
Method Vector3i.
- Parameters:
xxyyzz
initNeighbourSections
void
initNeighbourSections
(@Nonnull final LocalCachedChunkAccessor accessor, final int x, final int y, final int z)
Method initNeighbourSections.
- Parameters:
@Nonnull final LocalCachedChunkAccessoraccessorfinal intxfinal intyfinal intz
updateLocalLight
CalculationResult
updateLocalLight
(final LocalCachedChunkAccessor accessor, @Nonnull final WorldChunk worldChunk, final int chunkX, final int chunkY, final int chunkZ, @Nonnull final BlockSection toSection, @Nonnull final FluidSection fluidSection, @Nonnull final AtomicLong chunkLightTiming, final boolean fineLoggable)
Method updateLocalLight.
- Parameters:
final LocalCachedChunkAccessoraccessor@Nonnull final WorldChunkworldChunkfinal intchunkXfinal intchunkYfinal intchunkZ@Nonnull final BlockSectiontoSection@Nonnull final FluidSectionfluidSection@Nonnull final AtomicLongchunkLightTimingfinal booleanfineLoggable
Section
Chunk
Section
(local)
Method Section.
- Parameters:
locallocal
updateGlobalLight
CalculationResult
updateGlobalLight
(@Nonnull final LocalCachedChunkAccessor accessor, @Nonnull final WorldChunk worldChunk, final int chunkX, final int chunkY, final int chunkZ, @Nonnull final BlockSection toSection, @Nonnull final AtomicLong chunkLightTiming, final boolean fineLoggable)
Method updateGlobalLight.
- Parameters:
@Nonnull final LocalCachedChunkAccessoraccessor@Nonnull final WorldChunkworldChunkfinal intchunkXfinal intchunkYfinal intchunkZ@Nonnull final BlockSectiontoSection@Nonnull final AtomicLongchunkLightTimingfinal booleanfineLoggable
ChunkLightDataBuilder
new
ChunkLightDataBuilder
(toSection.getLocalLight()
Method ChunkLightDataBuilder.
- Parameters:
toSection.getLocalLight(toSection.getLocalLight(
invalidateLightAtBlock
boolean
invalidateLightAtBlock
(@Nonnull final WorldChunk worldChunk, final int blockX, final int blockY, final int blockZ, @Nonnull final BlockType blockType, final int oldHeight, final int newHeight)
Method invalidateLightAtBlock.
- Parameters:
@Nonnull final WorldChunkworldChunkfinal intblockXfinal intblockYfinal intblockZ@Nonnull final BlockTypeblockTypefinal intoldHeightfinal intnewHeight
invalidateLightInChunkSections
boolean
invalidateLightInChunkSections
(@Nonnull final WorldChunk worldChunk, final int sectionIndexFrom, final int sectionIndexTo)
Method invalidateLightInChunkSections.
- Parameters:
@Nonnull final WorldChunkworldChunkfinal intsectionIndexFromfinal intsectionIndexTo
floodEmptyChunkSection
ChunkLightDataBuilder
floodEmptyChunkSection
(@Nonnull final WorldChunk worldChunk, final short changeCounter, final int chunkY)
Method floodEmptyChunkSection.
- Parameters:
@Nonnull final WorldChunkworldChunkfinal shortchangeCounterfinal intchunkY
floodChunkSection
ChunkLightDataBuilder
floodChunkSection
(@Nonnull final WorldChunk worldChunk, @Nonnull final BlockSection toSection, @Nonnull final FluidSection fluidSection, final int chunkY)
Method floodChunkSection.
- Parameters:
@Nonnull final WorldChunkworldChunk@Nonnull final BlockSectiontoSection@Nonnull final FluidSectionfluidSectionfinal intchunkY
if
else
if
(fluidLight != null)
Method if.
- Parameters:
fluidLight !=null
getSkyValue
byte
getSkyValue
(final WorldChunk worldChunk, final int chunkY, final int blockX, final int blockY, final int blockZ, final int sectionY, final int height)
Method getSkyValue.
- Parameters:
final WorldChunkworldChunkfinal intchunkYfinal intblockXfinal intblockYfinal intblockZfinal intsectionYfinal intheight
propagateLight
void
propagateLight
(@Nonnull final BitSet bitSetQueue, @Nonnull final BlockSection section, @Nonnull final ChunkLightDataBuilder light)
Method propagateLight.
- Parameters:
@Nonnull final BitSetbitSetQueue@Nonnull final BlockSectionsection@Nonnull final ChunkLightDataBuilderlight
testNeighboursForLocalLight
boolean
testNeighboursForLocalLight
(@Nonnull final LocalCachedChunkAccessor accessor, @Nonnull final WorldChunk worldChunk, final int chunkX, final int chunkY, final int chunkZ)
Method testNeighboursForLocalLight.
- Parameters:
@Nonnull final LocalCachedChunkAccessoraccessor@Nonnull final WorldChunkworldChunkfinal intchunkXfinal intchunkYfinal intchunkZ
propagateSides
void
propagateSides
(@Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder globalLight, @Nonnull final BitSet bitSetQueue)
Method propagateSides.
- Parameters:
@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuilderglobalLight@Nonnull final BitSetbitSetQueue
propagateSide
void
propagateSide
(@Nonnull final BitSet bitSetQueue, @Nullable final BlockSection fromSection, @Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder toLight, @Nonnull final IntBinaryOperator fromIndex, @Nonnull final IntBinaryOperator toIndex)
Method propagateSide.
- Parameters:
@Nonnull final BitSetbitSetQueue@Nullable final BlockSectionfromSection@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuildertoLight@Nonnull final IntBinaryOperatorfromIndex@Nonnull final IntBinaryOperatortoIndex
propagateEdges
void
propagateEdges
(@Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder globalLight, @Nonnull final BitSet bitSetQueue)
Method propagateEdges.
- Parameters:
@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuilderglobalLight@Nonnull final BitSetbitSetQueue
propagateEdge
void
propagateEdge
(@Nonnull final BitSet bitSetQueue, @Nullable final BlockSection fromSection, @Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder toLight, @Nonnull final Int2IntFunction fromIndex, @Nonnull final Int2IntFunction toIndex)
Method propagateEdge.
- Parameters:
@Nonnull final BitSetbitSetQueue@Nullable final BlockSectionfromSection@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuildertoLight@Nonnull final Int2IntFunctionfromIndex@Nonnull final Int2IntFunctiontoIndex
propagateCorners
void
propagateCorners
(@Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder globalLight, @Nonnull final BitSet bitSetQueue)
Method propagateCorners.
- Parameters:
@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuilderglobalLight@Nonnull final BitSetbitSetQueue
propagateCorner
void
propagateCorner
(@Nonnull final BitSet bitSetQueue, @Nullable final BlockSection fromSection, @Nonnull final BlockSection toSection, @Nonnull final ChunkLightDataBuilder toLight, final int fromBlockIndex, final int toBlockIndex)
Method propagateCorner.
- Parameters:
@Nonnull final BitSetbitSetQueue@Nullable final BlockSectionfromSection@Nonnull final BlockSectiontoSection@Nonnull final ChunkLightDataBuildertoLightfinal intfromBlockIndexfinal inttoBlockIndex