Add Additional API for Finding Depleted Veins and Updating Clients#102
Add Additional API for Finding Depleted Veins and Updating Clients#102Vlamonster wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
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; | |||
There was a problem hiding this comment.
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, |
| } | ||
|
|
||
| public static boolean isVeinDepleted(World world, int dimensionId, int chunkX, int chunkZ, int chunkRadius) { | ||
| final int centerX = Utils.mapToCenterOreChunkCoord(chunkX << 4) >> 4; |
There was a problem hiding this comment.
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.
Summary
This requires another PR to be merged to compile: Add Prospecting & Depletion Marking to Multi Drills #7505.
Checklist