added (commented out, for now) night render code
This commit is contained in:
3
chunk.py
3
chunk.py
@@ -43,7 +43,10 @@ def get_lighting_coefficient(skylight, blocklight):
|
|||||||
between 0.0 (fully lit) and 1.0 (fully black) that can be used as
|
between 0.0 (fully lit) and 1.0 (fully black) that can be used as
|
||||||
an alpha value for a blend with a black source image. It mimics
|
an alpha value for a blend with a black source image. It mimics
|
||||||
Minecraft lighting calculations."""
|
Minecraft lighting calculations."""
|
||||||
|
# Daytime
|
||||||
return 1.0 - pow(0.8, 15 - max(blocklight, skylight))
|
return 1.0 - pow(0.8, 15 - max(blocklight, skylight))
|
||||||
|
# Nighttime
|
||||||
|
#return 1.0 - pow(0.8, 15 - max(blocklight, skylight - 11))
|
||||||
|
|
||||||
def get_lvldata(filename):
|
def get_lvldata(filename):
|
||||||
"""Takes a filename and returns the Level struct, which contains all the
|
"""Takes a filename and returns the Level struct, which contains all the
|
||||||
|
|||||||
Reference in New Issue
Block a user