From 71556340a349b73b03d0f6b7fe6ec4d00354a14e Mon Sep 17 00:00:00 2001 From: "pozdn.r.a" Date: Mon, 11 May 2026 14:29:46 +0700 Subject: [PATCH] test(claim-fanout): seed sibling claim in a distinct chunk unrelatedClaimStateIsPreservedWhenSiblingClaimIsDeleted placed the target at local (2,2,2) and the sibling at (13,2,13). Both block positions resolve to the same ChunkPos under the chunk-aligned harness_empty origin, so seedClaim's getClaim(chunkPos) lookup returned the existing target RecruitsClaim and aliased both "claims" onto a single instance with one UUID. The sibling treasury deposit then went to the target's ledger, which the fanout correctly removed -- failing the parity assertion. Move the sibling to (18,2,18) so it lands in a different chunk than the target (>= 16 crosses the boundary under a chunk-aligned origin) while staying inside the 20x5x20 template bounds. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../bannermod/BannerModClaimRemovalFanoutGameTests.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gametest/java/com/talhanation/bannermod/BannerModClaimRemovalFanoutGameTests.java b/src/gametest/java/com/talhanation/bannermod/BannerModClaimRemovalFanoutGameTests.java index 20b9c0e7..f1a156e4 100644 --- a/src/gametest/java/com/talhanation/bannermod/BannerModClaimRemovalFanoutGameTests.java +++ b/src/gametest/java/com/talhanation/bannermod/BannerModClaimRemovalFanoutGameTests.java @@ -110,7 +110,11 @@ public static void unrelatedClaimStateIsPreservedWhenSiblingClaimIsDeleted(GameT Player otherOwner = createPlayer(helper, level, OTHER_UUID, "fanout-other", OTHER_TEAM_ID); BlockPos targetPos = new BlockPos(2, 2, 2); - BlockPos siblingPos = new BlockPos(13, 2, 13); // different chunk + // Sibling must land in a *different* chunk than target. The harness_empty + // template is placed at a chunk-aligned origin, so local x/z >= 16 crosses + // the chunk boundary; (13,_,13) was still in chunk (0,0) and caused + // seedClaim to alias the two claims onto a single RecruitsClaim instance. + BlockPos siblingPos = new BlockPos(18, 2, 18); RecruitsClaim targetClaim = BannerModDedicatedServerGameTestSupport.seedClaim( level, helper.absolutePos(targetPos), OWNER_TEAM_ID, OWNER_UUID, owner.getScoreboardName());