occlusion: skip calculating if less then 256 blocks set in chunk

When there are less than 256 blocks set, you will always be able to look from one side to another.
This commit is contained in:
Moritz Zwerger 2025-03-09 15:24:38 +01:00
parent 58a36aa454
commit 31fa6a809d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -46,7 +46,7 @@ class SectionOcclusion(
fun recalculate(notify: Boolean) {
if (!calculate) return
if (provider.isEmpty) {
if (provider.count < ProtocolDefinition.SECTION_WIDTH_X * ProtocolDefinition.SECTION_WIDTH_Z) { // When there are less than 256 blocks set, you will always be able to look from one side to another
clear(notify)
return
}