From 7f4817a0f760ad5efae28e9f17091ad4880dd30b Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 12 Oct 2026 20:09:53 -0400 Subject: [PATCH] Stop splitting once the sub-level has been removed Assembling one split piece can leave the parent sub-level without mass, which destroys its remaining blocks and marks it removed inside the split loop. The next piece's assembly then throws "Sub-level assembly attempted inside plot of already removed sub-level" (#1376, #1344). --- .../sable/sublevel/plot/heat/SubLevelHeatMapManager.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/heat/SubLevelHeatMapManager.java b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/heat/SubLevelHeatMapManager.java index 6816fda13..12a8b4327 100644 --- a/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/heat/SubLevelHeatMapManager.java +++ b/common/src/main/java/dev/ryanhcode/sable/sublevel/plot/heat/SubLevelHeatMapManager.java @@ -233,6 +233,13 @@ private void split() { final Level level = this.subLevel.getLevel(); for (final List blocks : newSubLevelBlocks.values()) { + // assembling a previous split can leave this sub-level without mass, which destroys its remaining blocks + // and marks it removed. there is nothing left to split off then, and assembling from inside a removed + // sub-level's plot throws + if (this.subLevel.isRemoved()) { + break; + } + final BoundingBox3i bounds = Objects.requireNonNull(BoundingBox3i.from(blocks)).expand(1, 1, 1); for (final SplitListener listener : LISTENERS) {