From 361d407279049b057be54d67a36303fae23c7615 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 10 May 2026 21:00:12 +0300 Subject: [PATCH 1/2] Fix the ore prospection radius config's minimum value Made it 0 instead of -1 because a radius of 0 means nothing can be found in practice anyway --- .../java/com/gregtechceu/gtceu/config/ConfigHolder.java | 8 ++++---- .../gtceu/integration/map/cache/server/ServerCache.java | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java b/src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java index 2881a3539c4..8e617deda31 100644 --- a/src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java +++ b/src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java @@ -278,13 +278,13 @@ public static class MinimapCompatConfig { @Configurable @Configurable.Comment({ "The radius, in blocks, that picking up a surface rock will search for veins in.", - "-1 to disable.", "Default: 24" }) - @Configurable.Range(min = 1) + "0 to disable.", "Default: 24" }) + @Configurable.Range(min = 0) public int surfaceRockProspectRange = 24; @Configurable @Configurable.Comment({ "The radius, in blocks, that clicking an ore block will search for veins in.", - "-1 to disable", "Default: 24" }) - @Configurable.Range(min = 1) + "0 to disable", "Default: 24" }) + @Configurable.Range(min = 0) public int oreBlockProspectRange = 24; @Configurable diff --git a/src/main/java/com/gregtechceu/gtceu/integration/map/cache/server/ServerCache.java b/src/main/java/com/gregtechceu/gtceu/integration/map/cache/server/ServerCache.java index 629e6447852..389b53dd516 100644 --- a/src/main/java/com/gregtechceu/gtceu/integration/map/cache/server/ServerCache.java +++ b/src/main/java/com/gregtechceu/gtceu/integration/map/cache/server/ServerCache.java @@ -64,7 +64,7 @@ public void prospectSurfaceRockMaterial(ResourceKey dim, Material materia public void prospectBySurfaceRockMaterial(ResourceKey dim, final Material material, BlockPos pos, ServerPlayer player, int radius) { - if (radius < 0) return; + if (radius <= 0) return; List nearbyVeins = getNearbyVeins(dim, pos, radius); List foundVeins = new ArrayList<>(); for (GeneratedVeinMetadata nearbyVein : nearbyVeins) { @@ -87,7 +87,7 @@ public void prospectBySurfaceRockMaterial(ResourceKey dim, final Material public void prospectByOreMaterial(ResourceKey dim, Material material, BlockPos origin, ServerPlayer player, int radius) { - if (radius < 0) return; + if (radius <= 0) return; List nearbyVeins = getNearbyVeins(dim, origin, radius); List foundVeins = new ArrayList<>(); for (GeneratedVeinMetadata nearbyVein : nearbyVeins) { @@ -100,7 +100,7 @@ public void prospectByOreMaterial(ResourceKey dim, Material material, Blo public void prospectByDepositName(ResourceKey dim, String depositName, BlockPos origin, ServerPlayer player, int radius) { - if (radius < 0) return; + if (radius <= 0) return; List nearbyVeins = getNearbyVeins(dim, origin, radius); List foundVeins = new ArrayList<>(); for (GeneratedVeinMetadata nearbyVein : nearbyVeins) { From 5ad05e27a2ec1d7aacc49f47ebd4f7667a5bf2d4 Mon Sep 17 00:00:00 2001 From: screret <68943070+screret@users.noreply.github.com> Date: Sun, 10 May 2026 21:56:04 +0300 Subject: [PATCH 2/2] add to changelist --- docs/content/Modpacks/Changes/v8.0.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/Modpacks/Changes/v8.0.0.md b/docs/content/Modpacks/Changes/v8.0.0.md index fc7c33f8651..e41654c337d 100644 --- a/docs/content/Modpacks/Changes/v8.0.0.md +++ b/docs/content/Modpacks/Changes/v8.0.0.md @@ -130,4 +130,5 @@ A large number of machine feature interfaces have been removed, and have had the - `BlastingRecipeBuilder`, `CampfireRecipeBuilder`, `SmeltingRecipeBuilder` and `SmokingRecipeBuilder` have been merged into `SimpleCookingRecipeBuilder` - Example usage: `SimpleCookingRecipeBuilder.campfireCooking("cooking_chicken").input(new ItemStack(Items.CHICKEN)).output(new ItemStacks(Items.COOKED_CHICKEN)).cookingTime(100).experience(100).save(provider);` - `GTFluidImpl` has been merged into `GTFluid`, use `GTFluid.Flowing` and `GTFluid.Source` instead of `GTFluidImpl.Flowing` and `GTFluidImpl.Source`. -- Item behaviors have been moved to `common/item/behavior`, and some items have been moved from `api/item` to `common/item`. \ No newline at end of file +- Item behaviors have been moved to `common/item/behavior`, and some items have been moved from `api/item` to `common/item`. +- Changed the minimum value of the `compat.minimap.surfaceRockProspectRange` and `compat.minimap.oreBlockProspectRange` configs from -1 to 0. The behavior is still disabled with 0. \ No newline at end of file