Files
Shiroha/shiroha-server/minecraft-patches/features/0044-Add-config-for-heightmap-warning.patch
T
NanaChiyo0721 1bb895c165
Shiroha CI / build (push) Canceled after 0s
Shiroha CI / Event File (push) Canceled after 0s
Fix incorrect ticket lock size computing
Yeah this would fully solve the issue of chunk unloading race condition

The same fix was already initially added at "Force clamp grid-exponent to 1~6"
2026-08-09 14:57:32 +08:00

19 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrHua269 <mrhua269@gmail.com>
Date: Wed, 8 Jul 2026 23:34:17 +0800
Subject: [PATCH] Add config for heightmap warning
diff --git a/net/minecraft/world/level/levelgen/Heightmap.java b/net/minecraft/world/level/levelgen/Heightmap.java
index dffa0d4859ecd7e21a9345f946083c56205145a3..3dd499b5d7f7212494edec4d1868417496bb4be7 100644
--- a/net/minecraft/world/level/levelgen/Heightmap.java
+++ b/net/minecraft/world/level/levelgen/Heightmap.java
@@ -128,6 +128,7 @@ public class Heightmap {
if (rawData.length == data.length) {
System.arraycopy(data, 0, rawData, 0, data.length);
} else {
+ if (!io.nanachiyo0721.shiroha.config.modules.misc.DisableWarningConfig.disableHeightmapWarning) // Shiroha - Add config for heightmap warning
LOGGER.warn("Ignoring heightmap data for chunk {}, size does not match; expected: {}, got: {}", chunk.getPos(), rawData.length, data.length);
primeHeightmaps(chunk, EnumSet.of(type));
}