Skip to content

Commit ceeb1b0

Browse files
authored
fix: reverse getRawBrightness changes (#2)
1 parent e28b06f commit ceeb1b0

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ minecraft_version=1.16.5
77
yarn_mappings=1.16.5+build.6
88
loader_version=0.16.9
99
# Mod Properties
10-
mod_version=1.2.0
10+
mod_version=1.2.1
1111
target_version=1.16.x
1212
backport_version=1.1.3
1313
maven_group=ca.spottedleaf.starlight

src/main/java/ca/spottedleaf/starlight/mixin/common/lightengine/LevelLightEngineMixin.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ public void retainData(final ChunkPos pos, final boolean retainData) {
159159
*/
160160
@Overwrite
161161
public int getRawBrightness(final BlockPos pos, final int ambientDarkness) {
162-
return this.lightEngine.getRawBrightness(pos, ambientDarkness);
162+
// need to use new light hooks for this
163+
final int sky = this.lightEngine.getSkyReader().getLightValue(pos) - ambientDarkness;
164+
final int block = this.lightEngine.getBlockReader().getLightValue(pos);
165+
return Math.max(sky, block);
163166
}
164167

165168
@Unique

0 commit comments

Comments
 (0)