Fix ores being unscannable in spawn chunks, and incorrect cache-rebuilding logic. - #78
Merged
Conversation
RecursivePineapple
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes 2 bugs with visual prospecting:
visualprospectingfolder entirely, as it tends to solve a lot of issues.Spawn Chunk Bug
This occurred due to an intermittent race condition:
The solution to this issue is simple: Ensure that the instance is registered before the world creation process begins.
This race condition seems very inconsistent in the current stable release (2.8.4), but can reliably be reproduced in experimental 80 using the following steps:
journeymap,TCNodeTracker, andvisualprospectingfolders in your.minecraftfolder./gamemode 1/gamemode 0You can confirm that the bug is happening/the fix is working by attaching an IDE to the full pack (experimental 80 is recommended), setting a breakpoint in the
ServerCacheconstructor, and on line325ofGTWorldgenerator(where theVeinGenerateEventevent is dispatched) and following the previous instructions. The breakpoint inGTWorldgeneratorshould trigger well before the one in the constructor ofServerCachewhen the bug occurs.For this PR to work in experimental 80, you will need to apply it as a patch to the current dev branch, since it already uses a pre-release version of VP.
This PR should address the root cause of the following issues:
Existing worlds where this issue is present will either need to run the
/vp_recachespawncommand, update their config to enable therecacheVeinsor delete their Visual Prospecting folder entirely to force a proper re-scan of the world.Cache Rebuild Bug
This bug occurred because VP was performing an incorrect subset check. It was asking if the ores found in an ore chunk were a subset of a vein type, instead of asking if the ores in a vein type were a subset of the ores found in an ore-chunk.
To reproduce this bug, and confirm that the bug is working you can follow these steps:
/tp -122 100 -24.minecraftfolder, delete thevisualprospectingfolderjavaw_qbE9AeVWsl.mp4
Known Edge Case Failings
There is still an edge case in which VP fails to detect a vein while analyzing the world to rebuild its cache:
The following vein is a good example of this edge case, as 2/4 of it's ores types just won't be ge generated becuase they would have generated in dirt or air:

We could probably put in some extra work to identify these ores, since we can do some "layer analysis," but honestly, I'm not sure how I would properly implement it. I know roughly how GT veins are laid out, but considering this is a fallback system that only ever gets triggered when things go catastrophically bad, I'm not sure it's worth the time investment.
GT5u needs a fix
There is a further bug where GT5u will tell VP that it has generated and placed a vein at a given location, even though it hasn't (usually because the vein was generated in the air or in blocks that cannot be replaced with ores). This needs to be addressed directly in GT5u. As the saying goes: garbage in, garbage out.