mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-09 22:06:09 +01:00
f3c57b4ae4
- Move most user facing interfaces to flywheel.api package - Refactor InstanceData to have no package private classes - Remove 'I' prefix from many interfaces - ILightUpdateListener -> LightListener - IMultiProgram -> ContextAwareProgram - IFlatLight -> FlatLit - All materials use the same vertex format: UNLIT_MODEL
23 lines
621 B
Java
23 lines
621 B
Java
package com.jozufozu.flywheel.light;
|
|
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.level.BlockAndTintGetter;
|
|
import net.minecraft.world.level.LightLayer;
|
|
|
|
/**
|
|
* Wraps a world and minimally lowers the interface.
|
|
*/
|
|
public class BasicProvider implements LightProvider {
|
|
|
|
private final BlockAndTintGetter reader;
|
|
private final BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos();
|
|
|
|
public BasicProvider(BlockAndTintGetter reader) {
|
|
this.reader = reader;
|
|
}
|
|
|
|
@Override
|
|
public int getLight(LightLayer type, int x, int y, int z) {
|
|
return reader.getBrightness(type, pos.set(x, y, z));
|
|
}
|
|
}
|