23 lines
771 B
Java
23 lines
771 B
Java
package net.minecraft.world.level;
|
|
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.level.lighting.LevelLightEngine;
|
|
|
|
public interface BlockAndTintGetter extends BlockGetter {
|
|
LevelLightEngine getLightEngine();
|
|
|
|
int getBlockTint(final BlockPos fk, final ColorResolver colorResolver);
|
|
|
|
default int getBrightness(final LightLayer bkc, final BlockPos fk) {
|
|
return this.getLightEngine().getLayerListener(bkc).getLightValue(fk);
|
|
}
|
|
|
|
default int getRawBrightness(final BlockPos fk, final int integer) {
|
|
return this.getLightEngine().getRawBrightness(fk, integer);
|
|
}
|
|
|
|
default boolean canSeeSky(final BlockPos fk) {
|
|
return this.getBrightness(LightLayer.SKY, fk) >= this.getMaxLightLevel();
|
|
}
|
|
}
|