From b8c36a1e80e63dad22232000cc084b3cd52e9d6a Mon Sep 17 00:00:00 2001 From: GitHub GTNH Actions <> Date: Tue, 16 Dec 2025 23:23:35 +0000 Subject: [PATCH] spotlessApply --- .../core/util/RelativeCoordinatePacker.java | 4 ++-- .../core/util/RelativeCoordinatePackerTest.java | 10 +++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePacker.java b/src/main/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePacker.java index 1df2a0f2fd..4f097d4a74 100644 --- a/src/main/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePacker.java +++ b/src/main/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePacker.java @@ -3,8 +3,8 @@ /** * Packs relative coordinates into an int with optional side bits. Layout: [6 side bits][8 Y][9 Z][9 X] *

- * Valid range: X/Z: -256 to +255 (9-bit signed), Y: -128 to +127 (8-bit signed). - * Values outside this range will silently wrap due to masking. + * Valid range: X/Z: -256 to +255 (9-bit signed), Y: -128 to +127 (8-bit signed). Values outside this range will + * silently wrap due to masking. */ public final class RelativeCoordinatePacker { diff --git a/src/test/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePackerTest.java b/src/test/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePackerTest.java index feb089b139..394b064886 100644 --- a/src/test/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePackerTest.java +++ b/src/test/java/micdoodle8/mods/galacticraft/core/util/RelativeCoordinatePackerTest.java @@ -9,14 +9,10 @@ public class RelativeCoordinatePackerTest { @Test void testPackUnpackRoundTrip() { // X/Z: 9-bit signed (-256 to +255), Y: 8-bit signed (-128 to +127) - int[][] coords = { - { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, - { -1, 0, 0 }, { 0, -1, 0 }, { 0, 0, -1 }, { -1, -1, -1 }, - { 31, 31, 31 }, { -32, -32, -32 }, { -15, 10, -20 }, + int[][] coords = { { 0, 0, 0 }, { 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 1 }, { -1, 0, 0 }, { 0, -1, 0 }, { 0, 0, -1 }, + { -1, -1, -1 }, { 31, 31, 31 }, { -32, -32, -32 }, { -15, 10, -20 }, // Extended range tests - { 255, 127, 255 }, { -256, -128, -256 }, - { 100, -50, -200 }, { -200, 100, 150 }, - }; + { 255, 127, 255 }, { -256, -128, -256 }, { 100, -50, -200 }, { -200, 100, 150 }, }; for (int[] c : coords) { int packed = RelativeCoordinatePacker.pack(c[0], c[1], c[2]); assertEquals(c[0], RelativeCoordinatePacker.unpackX(packed), "X for " + c[0]);