Paper/patches/server/0510-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch
Jason fd263ef962
Fix empty/null chunk section check in LevelChunk#getBlockData, rename… (#7039)
… patch and methods to make more sense with Mojang mappings
2021-12-05 15:32:02 -08:00

19 lines
936 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mariell Hoversholm <proximyst@proximyst.com>
Date: Sun, 27 Sep 2020 16:25:24 +0200
Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086)
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
index 80aae4303e011dad13ce818136f0383e12ab5c41..17a71e2fce455552c0e8af4073c516c21bc3e208 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -229,6 +229,7 @@ public class ChunkHolder {
}
public void blockChanged(BlockPos pos) {
+ if (!pos.isInsideBuildHeightAndWorldBoundsHorizontal(levelHeightAccessor)) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks
LevelChunk chunk = this.getTickingChunk();
if (chunk != null) {