Single subterrain check per write

- Drop the repeated subterrain protection lookup inside MantleWriter.setData; the same position was already rejected before the chunk lock
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-22 01:32:15 -04:00
1 parent ad73c33480
commit ab51822fd4
1 file changed
+1 -1
@@ -244,7 +244,7 @@ public class MantleWriter implements ObjectPassPlacer, AutoCloseable {
synchronized (chunk) { synchronized (chunk) {
Matter matter = chunk.getOrCreate(y >> 4); Matter matter = chunk.getOrCreate(y >> 4);
if ((t instanceof NativeBlockState || t instanceof MatterCavern) if ((t instanceof NativeBlockState || t instanceof MatterCavern)
&& (hasProtectedHydrology(matter, x, y, z) || protectsSubterrainPlacement(x, y, z))) { && hasProtectedHydrology(matter, x, y, z)) {
return; return;
} }
if (t instanceof NativeBlockState) { if (t instanceof NativeBlockState) {