Class LightEngine<M extends LightDataMap<M>,S extends SectionLightStorage<M>>

java.lang.Object
net.minecraft.world.lighting.LevelBasedGraph
net.minecraft.world.lighting.LightEngine<M,S>
All Implemented Interfaces:
ILightListener, IWorldLightListener
Direct Known Subclasses:
BlockLightEngine, SkyLightEngine

public abstract class LightEngine<M extends LightDataMap<M>,S extends SectionLightStorage<M>> extends LevelBasedGraph implements IWorldLightListener
  • Field Details

  • Constructor Details

  • Method Details

    • checkNode

      protected void checkNode(long p_215473_1_)
      Overrides:
      checkNode in class LevelBasedGraph
    • getChunk

      @Nullable private IBlockReader getChunk(int p_215615_1_, int p_215615_2_)
    • clearCache

      private void clearCache()
    • getStateAndOpacity

      protected BlockState getStateAndOpacity(long p_227468_1_, @Nullable org.apache.commons.lang3.mutable.MutableInt p_227468_3_)
    • getShape

      protected VoxelShape getShape(BlockState p_223405_1_, long p_223405_2_, Direction p_223405_4_)
    • getLightBlockInto

      public static int getLightBlockInto(IBlockReader p_215613_0_, BlockState p_215613_1_, BlockPos p_215613_2_, BlockState p_215613_3_, BlockPos p_215613_4_, Direction p_215613_5_, int p_215613_6_)
    • isSource

      protected boolean isSource(long p_215485_1_)
      Specified by:
      isSource in class LevelBasedGraph
    • getComputedLevel

      protected int getComputedLevel(long p_215477_1_, long p_215477_3_, int p_215477_5_)
      Specified by:
      getComputedLevel in class LevelBasedGraph
    • getLevel

      protected int getLevel(long p_215471_1_)
      Specified by:
      getLevel in class LevelBasedGraph
    • getLevel

      protected int getLevel(NibbleArray p_215622_1_, long p_215622_2_)
    • setLevel

      protected void setLevel(long p_215476_1_, int p_215476_3_)
      Specified by:
      setLevel in class LevelBasedGraph
    • computeLevelFromNeighbor

      protected int computeLevelFromNeighbor(long p_215480_1_, long p_215480_3_, int p_215480_5_)
      Specified by:
      computeLevelFromNeighbor in class LevelBasedGraph
    • hasLightWork

      public boolean hasLightWork()
    • runUpdates

      public int runUpdates(int p_215616_1_, boolean p_215616_2_, boolean p_215616_3_)
    • queueSectionData

      protected void queueSectionData(long p_215621_1_, @Nullable NibbleArray p_215621_3_, boolean p_215621_4_)
    • getDataLayerData

      @Nullable public NibbleArray getDataLayerData(SectionPos p_215612_1_)
      Specified by:
      getDataLayerData in interface IWorldLightListener
    • getLightValue

      public int getLightValue(BlockPos p_215611_1_)
      Specified by:
      getLightValue in interface IWorldLightListener
    • getDebugData

      public String getDebugData(long p_215614_1_)
    • checkBlock

      public void checkBlock(BlockPos p_215617_1_)
    • onBlockEmissionIncrease

      public void onBlockEmissionIncrease(BlockPos p_215623_1_, int p_215623_2_)
    • updateSectionStatus

      public void updateSectionStatus(SectionPos p_215566_1_, boolean p_215566_2_)
      Specified by:
      updateSectionStatus in interface ILightListener
    • enableLightSources

      public void enableLightSources(ChunkPos p_215620_1_, boolean p_215620_2_)
    • retainData

      public void retainData(ChunkPos p_223129_1_, boolean p_223129_2_)
    • queuedUpdateSize

      public abstract int queuedUpdateSize()
      Overrides:
      queuedUpdateSize in class LevelBasedGraph