geforkt von Mirrors/Paper
Don't get block light level if the sky level is 15 (#6922)
Dieser Commit ist enthalten in:
Ursprung
bc04c3f9bc
Commit
3f7c1464c8
@ -3341,6 +3341,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ final ChunkAccess chunk = this.getAnyChunkNow(pos.getX() >> 4, pos.getZ() >> 4);
|
||||
+
|
||||
+ final int sky = this.getSkyLightValue(pos, chunk) - ambientDarkness;
|
||||
+ // Don't fetch the block light level if the skylight level is 15, since the value will never be higher.
|
||||
+ if (sky == 15) return 15;
|
||||
+ final int block = this.getBlockLightValue(pos, chunk);
|
||||
+ return Math.max(sky, block);
|
||||
+ }
|
||||
@ -4612,6 +4614,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public int getRawBrightness(final BlockPos pos, final int ambientDarkness) {
|
||||
+ // need to use new light hooks for this
|
||||
+ final int sky = this.theLightEngine.getSkyReader().getLightValue(pos) - ambientDarkness;
|
||||
+ // Don't fetch the block light level if the skylight level is 15, since the value will never be higher.
|
||||
+ if (sky == 15) return 15;
|
||||
+ final int block = this.theLightEngine.getBlockReader().getLightValue(pos);
|
||||
+ return Math.max(sky, block);
|
||||
+ }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren