Skip to content

Comments

1.21 Model fix#4674

Open
Taskeren wants to merge 2 commits intoGregTechCEu:1.21from
Taskeren:1.21-model-fix
Open

1.21 Model fix#4674
Taskeren wants to merge 2 commits intoGregTechCEu:1.21from
Taskeren:1.21-model-fix

Conversation

@Taskeren
Copy link
Contributor

What

Extra data is now stored in neoforge_data instead of forge_data.

Implementation Details

A script is used to migrate all JSONs in /resources:

import { readdir } from "node:fs/promises";

const ROOT_DIR = "../src/main/resources";

// find all json files in /resources
const files = (await readdir(ROOT_DIR, { recursive: true }))
    .filter(path => path.endsWith(".json"));

console.log(`Found ${files.length} files.`);
for await (const path of files) {
    try {
        const file = Bun.file(ROOT_DIR + "/" + path);
        const content = await file.text();
        const updatedContent = fix(content);
        if (content != updatedContent) {
            await Bun.write(file, updatedContent);
            console.log(`Updated ${path}`);
        }
    } catch (e) {
        console.error(`Error processing ${path}:`, e);
    }
}

function fix(content: string): string {
    // "forge_data" -> "neoforge_data"
    content = content.replaceAll(/(?<!neo)forge_data/g, "neoforge_data");
    // "neoneoforge" -> "neoforge"
    content = content.replaceAll(/neoneoforge/g, "neoforge");
    return content;
}

And re-generated all generated JSONs. (so there's something changed in language files, I'm not sure why.) (and it seems that the indent is also being changed from 2 spaces to 4)

@Taskeren Taskeren requested a review from a team as a code owner February 21, 2026 02:23
@github-actions github-actions bot added the 1.21 label Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant