Class LightDataCollector
java.lang.Object
dev.engine_room.flywheel.backend.engine.LightDataCollector
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.world.level.lighting.LayerLightEventListenerprotected final net.minecraft.world.level.LevelAccessorprotected final net.minecraft.world.level.lighting.LayerLightEventListener -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLightDataCollector(net.minecraft.world.level.LevelAccessor level, net.minecraft.world.level.lighting.LayerLightEventListener skyLayerListener, net.minecraft.world.level.lighting.LayerLightEventListener blockLayerListener) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcollectLightData(long ptr, long section) voidcollectSection(long ptr, long section) static LightDataCollectorof(net.minecraft.world.level.LevelAccessor level) protected static voidwrite(long ptr, int x, int y, int z, int block, int sky) Write to the given section.
-
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
-
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].
-