Skip to content

fix(radar): detect unloaded VS ships and fix radius config double clamp on 1.18.2#28

Open
yuuri5656 wants to merge 6 commits intoSuperSpaceEye:1.18.2from
yuuri5656:1.18.2
Open

fix(radar): detect unloaded VS ships and fix radius config double clamp on 1.18.2#28
yuuri5656 wants to merge 6 commits intoSuperSpaceEye:1.18.2from
yuuri5656:1.18.2

Conversation

@yuuri5656
Copy link
Copy Markdown

Background

Radar had a long-range ship detection issue where some ships were not detected, and Radar config values (max_entity_search_radius / max_ship_search_radius) could be clamped to 4.9E-324 instead of preserving -1.
Also, build stability issues were observed on 1.18.2 environments.

Root Cause

  1. Ship scanning depended on nearby-transform-based behavior, which can miss ships not covered by that path.
  2. CDouble used Double.MIN_VALUE as a lower bound, which is the smallest positive value, not a negative lower bound.
  3. Build configuration had Kotlin/JVM target and memory pressure issues under the current environment.

Changes

  1. Switched radar ship enumeration to level.shipObjectWorld.allShips.
  2. Added radius filtering using coordinate delta squared distance (dx*dx + dy*dy + dz*dz <= radiusSq).
  3. Added deduplication by ship.id.
  4. Updated CDouble default range to support negative values (NEGATIVE_INFINITY..POSITIVE_INFINITY) so -1 is preserved.
  5. Set Kotlin JVM target to 17 for 1.18.2 compatibility.
  6. Tuned Gradle memory/worker settings to avoid GC thrashing during build.

Scope / Impact

  • Affects Radar ship scanning behavior (scan, scanForShips path).
  • Fixes config value preservation for radar radius doubles.
  • No intentional public API changes.
  • Build settings updated for stability on current 1.18.2 setup.

Verification

Executed and confirmed:

  • .gradlew.bat buildBUILD SUCCESSFUL
  • A ship more than 100,000 blocks away has been detected.
  • max_entity_search_radius = -1 is preserved.
  • max_ship_search_radius = -1 is preserved.

Copilot AI review requested due to automatic review settings March 21, 2026 09:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets radar reliability and config correctness on Minecraft 1.18.2 by changing Valkyrien Skies ship enumeration to catch previously-missed ships, fixing the default Double config bounds so -1 is preserved, and updating build settings to JVM 17.

Changes:

  • Update radar ship scanning to enumerate ships via level.shipObjectWorld.allShips, apply radius filtering, and deduplicate by ship id.
  • Fix config delegate default bounds for doubles to allow negative values (so sentinel values like -1 aren’t clamped).
  • Configure Kotlin compilation to target JVM 17; adjust Gradle properties (but the current diff includes unresolved conflicts and generated build artifacts).

Reviewed changes

Copilot reviewed 10 out of 36 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
gradle.properties Updates Gradle JVM/memory settings and local jar path config (currently contains merge-conflict markers).
build.gradle Sets Kotlin JVM target to 17 across projects.
common/src/main/kotlin/net/spaceeye/someperipherals/stuff/radar/scanInRadius.kt Changes ship scanning to enumerate all ships, filter by distance, and dedupe results.
common/src/main/kotlin/net/spaceeye/someperipherals/config/ConfigTypes.kt Changes CDouble default range to allow negative values.
common/AcceleratedRaycasting-0.0.1-dev.jar Adds a vendored binary jar (likely a local/dev dependency).
fabric/build/tmp/sourcesJar/MANIFEST.MF Generated build artifact.
fabric/build/tmp/shadowJar/MANIFEST.MF Generated build artifact.
fabric/build/tmp/remapSourcesJar/MANIFEST.MF Generated build artifact.
fabric/build/tmp/remapJar/MANIFEST.MF Generated build artifact.
fabric/build/tmp/jar/MANIFEST.MF Generated build artifact.
fabric/build/tmp/.cache/expanded/expanded.lock Generated build cache/lock artifact.
fabric/build/resources/main/some_peripherals.mixins.json Generated build artifact.
fabric/build/resources/main/fabric.mod.json Generated build artifact.
fabric/build/devlibs/Some-Peripherals-0.0.12-dev.jar Generated build artifact (binary).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/SomePeripheralsFabricClient.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/SomePeripheralsFabric.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/PlatformUtilsImpl.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$1.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$2.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$3.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$4.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$5.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$6.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$7.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricConfigBuilder$makeItem$8.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/FabricBlockEntityInventory.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/net/spaceeye/someperipherals/fabric/ExtendedItemStackHandler.class Generated build artifact (compiled class).
fabric/build/classes/kotlin/main/META-INF/Some-Peripherals.kotlin_module Generated build artifact.
fabric/build/classes/java/main/net/spaceeye/someperipherals/fabric/integrations/cc/SomePeripheralsPeripheralProviderFabric.class Generated build artifact (compiled class).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants