From c0b5c358cde4de2ee2ef8dc8fea9bff887a97e24 Mon Sep 17 00:00:00 2001 From: Robotgiggle <88736742+Robotgiggle@users.noreply.github.com> Date: Mon, 3 Aug 2026 14:59:38 -0400 Subject: [PATCH 1/3] Fix off-by-one error in spell circle bounds --- .../api/casting/circles/CircleExecutionState.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java index 92c5f3d3e..4fafcb8bd 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/circles/CircleExecutionState.java @@ -60,7 +60,7 @@ public class CircleExecutionState { protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, HashSet reachedPositions, BlockPos currentPos, Direction enteredFrom, CastingImage currentImage, @Nullable UUID caster, - @Nullable FrozenPigment casterPigment, Long reachedSlate, BlockPos greaterCorner, BlockPos lesserPos) { + @Nullable FrozenPigment casterPigment, Long reachedSlate, BlockPos greaterCorner, BlockPos lesserCorner) { this.impetusPos = impetusPos; this.impetusDir = impetusDir; this.reachedPositions = reachedPositions; @@ -72,8 +72,8 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, HashSe this.reachedSlate = reachedSlate; this.greaterCorner = greaterCorner; - this.lesserCorner = lesserPos; - this.bounds = new BlockBox(greaterCorner, lesserPos); + this.lesserCorner = lesserCorner; + this.bounds = new BlockBox(greaterCorner, lesserCorner); } public @Nullable ServerPlayer getCaster(ServerLevel world) { @@ -165,7 +165,7 @@ protected CircleExecutionState(BlockPos impetusPos, Direction impetusDir, HashSe new CircleExecutionState(impetus.getBlockPos(), impetus.getStartDirection(), reachedPositions, impetus.getBlockPos().offset(impetus.getStartDirection().getNormal()), impetus.getStartDirection(), new CastingImage(), casterUUID, colorizer, 0L, - positiveBlock.move(1,1,1), negativeBlock)); + positiveBlock, negativeBlock)); } public CompoundTag save() { From 0382ff86d2f89eff6174b2a5c77748f22f968420 Mon Sep 17 00:00:00 2001 From: Robotgiggle <88736742+Robotgiggle@users.noreply.github.com> Date: Mon, 3 Aug 2026 15:00:31 -0400 Subject: [PATCH 2/3] Fix fold reflections not giving the center of the corner block --- .../common/casting/actions/circles/OpCircleBounds.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt index 9ee8d04a8..98f73e0a5 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/circles/OpCircleBounds.kt @@ -16,11 +16,11 @@ class OpCircleBounds(val max: Boolean) : ConstMediaAction { throw MishapNoSpellCircle() val circle = env.impetus ?: throw MishapNoSpellCircle() - val aabb = circle.executionState!!.bounds // the circle should have an execution state since it's executing this. + val boundsBox = circle.executionState!!.bounds // the circle should have an execution state since it's executing this. return if (max) - aabb.aabb().maxPosition.asActionResult + boundsBox.max().asActionResult else - aabb.aabb().minPosition.asActionResult + boundsBox.min().asActionResult } } From bd83c44eaa8cd23b9947c781b77b38dd21b4961e Mon Sep 17 00:00:00 2001 From: Robotgiggle <88736742+Robotgiggle@users.noreply.github.com> Date: Mon, 3 Aug 2026 15:00:45 -0400 Subject: [PATCH 3/3] Update fold reflection lang to describe actual behavior --- .../main/resources/assets/hexcasting/lang/en_us.flatten.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 4ebfa8281..e99b5a75b 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -2029,8 +2029,8 @@ "circle/impetus_pos": "Returns the position of the $(l:greatwork/impetus)$(item)Impetus/$ of this spell circle.", "circle/impetus_dir": "Returns the direction the $(l:greatwork/impetus)$(item)Impetus/$ of this spell circle is facing as a unit vector.", - "circle/bounds/min": "Returns the position of the lower-north-west corner of the bounds of this spell circle.", - "circle/bounds/max": "Returns the position of the upper-south-east corner of the bounds of this spell circle.", + "circle/bounds/min": "Returns the position of the block at the lower-north-west corner of this spell circle's bounds.", + "circle/bounds/max": "Returns the position of the block at the upper-south-east corner of this spell circle's bounds.", }, akashic_patterns: {