--- a/net/minecraft/world/gen/NoiseChunkGenerator.java
+++ b/net/minecraft/world/gen/NoiseChunkGenerator.java
@@ -520,8 +520,8 @@
                         objectlistiterator1.back(objectlist1.size());
                         BlockState blockstate = this.func_236086_a_(d18, i2);
                         if (blockstate != field_222562_i) {
-                           if (blockstate.func_185906_d() != 0) {
-                              blockpos$mutable.func_181079_c(i3, i2, l3);
+                           blockpos$mutable.func_181079_c(i3, i2, l3);
+                           if (blockstate.getLightValue(chunkprimer, blockpos$mutable) != 0) {
                               chunkprimer.func_201637_h(blockpos$mutable);
                            }
 
