Skip to content

Add Additional API for Finding Depleted Veins and Updating Clients#102

Open
Vlamonster wants to merge 8 commits into
masterfrom
prospecting-drills
Open

Add Additional API for Finding Depleted Veins and Updating Clients#102
Vlamonster wants to merge 8 commits into
masterfrom
prospecting-drills

Conversation

@Vlamonster

@Vlamonster Vlamonster commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary

This requires another PR to be merged to compile: Add Prospecting & Depletion Marking to Multi Drills #7505.

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@Auynonymous Auynonymous added the Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison. label Jul 19, 2026

@Algent Algent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I know it's not clear at glance but the server cache isn't really supposed to be set on server cache side.

Now that we have team the only safe way is probably to setVeinDepleted on the team data (+markdirty & veindepletionmessage).

As for the whole auto depletion thing I'm really not sure this is a great idea but I suppose on paper it could work. I'm probably just a bit scared adding more block scan. That said it's possibly already done on GT side for the drill miner, see my comment there

@@ -1,7 +1,12 @@
package com.sinthoras.visualprospecting.database;

import static com.sinthoras.visualprospecting.VisualProspecting_API.LogicalClient.setOreVeinDepleted;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

setOreVeinDepleted is @SideOnly(Side.CLIENT)
You can't use it on server cache this will just crash the server.

* @param oreVeins ore veins to deliver. May be empty; must not be {@code null}.
* @param fluids underground fluid positions to deliver. May be empty; must not be {@code null}.
*/
public static void deliverProspectingResults(UUID player, List<OreVeinPosition> oreVeins,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's a lot of duplicated code.

}

public static boolean isVeinDepleted(World world, int dimensionId, int chunkX, int chunkZ, int chunkRadius) {
final int centerX = Utils.mapToCenterOreChunkCoord(chunkX << 4) >> 4;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maths are wrong here.

Also, VP only care about the center ore chunk. Scanning for depletion on a 3x3 (assuming this was what you wanted to do) is not even going to be this reliable due to vein being able to gen continues outside of these boundaries.

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

Labels

Enhancement Improve an existing mechanic. Please explain the change with a before/after comparison.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants