Class LightDataCollector

java.lang.Object
dev.engine_room.flywheel.backend.engine.LightDataCollector

public abstract class LightDataCollector extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.world.level.lighting.LayerLightEventListener
     
    protected final net.minecraft.world.level.LevelAccessor
     
    protected final net.minecraft.world.level.lighting.LayerLightEventListener
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LightDataCollector(net.minecraft.world.level.LevelAccessor level, net.minecraft.world.level.lighting.LayerLightEventListener skyLayerListener, net.minecraft.world.level.lighting.LayerLightEventListener blockLayerListener)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    collectLightData(long ptr, long section)
     
    void
    collectSection(long ptr, long section)
     
    of(net.minecraft.world.level.LevelAccessor level)
     
    protected static void
    write(long ptr, int x, int y, int z, int block, int sky)
    Write to the given section.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • level

      protected final net.minecraft.world.level.LevelAccessor level
    • skyLayerListener

      protected final net.minecraft.world.level.lighting.LayerLightEventListener skyLayerListener
    • blockLayerListener

      protected final net.minecraft.world.level.lighting.LayerLightEventListener blockLayerListener
  • Constructor Details

    • LightDataCollector

      protected LightDataCollector(net.minecraft.world.level.LevelAccessor level, net.minecraft.world.level.lighting.LayerLightEventListener skyLayerListener, net.minecraft.world.level.lighting.LayerLightEventListener blockLayerListener)
  • Method Details

    • of

      public static LightDataCollector of(net.minecraft.world.level.LevelAccessor level)
    • collectSection

      public void collectSection(long ptr, long section)
    • collectLightData

      protected abstract void collectLightData(long ptr, long section)
    • write

      protected static void write(long ptr, int x, int y, int z, int block, int sky)
      Write to the given section.
      Parameters:
      ptr - Pointer to the base of a section's data.
      x - X coordinate in the section, from [-1, 16].
      y - Y coordinate in the section, from [-1, 16].
      z - Z coordinate in the section, from [-1, 16].
      block - The block light level, from [0, 15].
      sky - The sky light level, from [0, 15].