Carry: the oracle's facts only for the mods it loaded
With oracle/facts.json, a mod the oracle did not load (a library it needs is missing) lost every block: none of its ids were in the facts. It now keeps the guesses from its blockstates, as without an oracle. ATM10: Regions Unexplored (TerraBlender is CurseForge-only) gets its 805 blocks back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -139,11 +139,20 @@ pub fn carry(
|
||||
if !chosen {
|
||||
continue;
|
||||
}
|
||||
// The oracle's facts for the mods it ran; a mod it did not load (a
|
||||
// library missing) keeps the guesses from its blockstates.
|
||||
let prefix = format!("{}:", info.mod_id);
|
||||
let seen = |f: &&oracle::Facts| {
|
||||
f.blocks
|
||||
.keys()
|
||||
.chain(f.items.keys())
|
||||
.any(|k| k.starts_with(&prefix))
|
||||
};
|
||||
match carry::carry(
|
||||
jar,
|
||||
info,
|
||||
&work.join("mods").join(&r.key),
|
||||
facts.as_ref(),
|
||||
facts.as_ref().filter(seen),
|
||||
&allowed,
|
||||
) {
|
||||
Ok(report) => {
|
||||
|
||||
Reference in New Issue
Block a user