chore(repo): improve readmes and update licenses and mcmetas

This commit is contained in:
omo50
2026-04-22 21:58:05 -06:00
parent a238f6ac08
commit 1033ed6275
14 changed files with 263 additions and 22 deletions

View File

@@ -31,7 +31,7 @@ body:
label: Minecraft Version
description: What version of Minecraft are you running?
options:
- 26.1.1
- 26.1.2
- 1.21.10
- 1.21.8
- 1.21.5

21
.github/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Lasting Legacy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

4
.gitignore vendored
View File

@@ -1,3 +1,4 @@
# General
build
.DS_Store
*.exe
@@ -10,16 +11,19 @@ modpacks/**/Logs
modpacks/refresh-all.sh
modpacks/update-all.sh
modpacks/export-all.sh
# IntelliJ
.idea/
*.iml
*.ipr
*.iws
# Visual Studio Code
.settings/
.vscode/
.classpath
.project
# Logs and errors
hs_err_*.log
replay_*.log

6
modpacks/2k/README Normal file
View File

@@ -0,0 +1,6 @@
# 2000s Edition
Re-Console+ is a modpack meant to not just re-create Legacy Console Edition entirely from scratch, but expand on top of it with modern Java Edition QoL and features. From OptiFine Parity, to BetterGrass, and a whole lot more!

View File

@@ -1,6 +0,0 @@
# 2000s Edition
2000s Edition is a modpack meant to remake LCE as if it was made for the 6th Generation of Video Game Consoles

View File

@@ -1 +1,3 @@
This is the general directory for all files for our modpacks.
This is the general directory for all files for our modpacks.
To run batch updates on every version of a pack, install Packwiz Wrapper and run ``pw batch update --all -y`` to update every mod, and ``pw batch refresh`` to fix any issues in the ``index.toml``

View File

@@ -1,14 +1,10 @@
{
"overlays": {
"entries": [
{"directory": "1.21.5", "formats": [55, 100]},
{"directory": "1.21.4", "formats": [46, 100]},
{"directory": "1.21.1", "formats": [34, 100]}
]
},
"pack": {
"description": "Minor fix to chest models when utilizing the Mash-up packs.",
"pack_format": 15,
"supported_formats": {"max_inclusive": 420, "min_inclusive": 15}
"pack_format": 69,
"pack_format": 16,
"min_format": 16,
"max_format": 999,
"supported_formats": [ 16, 999 ]
}
}
}

View File

@@ -1,6 +1,10 @@
{
"pack": {
"pack_format": 34,
"description": "Resources required for the Simply Legacy modpack"
"description": "Resources for Re-Console Plus and Simply Legacy,
"pack_format": 69,
"pack_format": 16,
"min_format": 16,
"max_format": 999,
"supported_formats": [ 16, 999 ]
}
}

2
modpacks/lce-core/README Normal file
View File

@@ -0,0 +1,2 @@
# LCE Core
WIP modular core for Simply Legacy and Re-Console+

3
modpacks/rc-plus/README Normal file
View File

@@ -0,0 +1,3 @@
# Re-Console+
Re-Console+ is a modpack meant to not just re-create Legacy Console Edition entirely from scratch, but expand on top of it with modern Java Edition QoL and features. From OptiFine Parity, to BetterGrass, and a whole lot more!

View File

@@ -1,4 +1,3 @@
# Simply Legacy
Simply Legacy is a modpack with the goal of bringing LCE to the modern day, just like Re-Console, but in a more slimmed down package that aims provide a more focused, more performant, and more faithful Legacy Console experience.
Simply Legacy is a modpack designed to bring the experience of Minecraft's Legacy Console Edition to a more up-to-date version of the game, acting as a vision of what the game would've looked like if it continued to get content updates to this day.

4
src/README Normal file
View File

@@ -0,0 +1,4 @@
# SRC
The actions for the monorepo are written in Rust.
WIP

2
tools/README Normal file
View File

@@ -0,0 +1,2 @@
# Tools
Tools is intended for CI/CD to utilize, via TypeScript.

204
tools/auto-update/pr.ts Normal file
View File

@@ -0,0 +1,204 @@
import { execFileSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';
const FORGEJO_URL = 'https://git.nostalgica.net';
const BRANCH = 'auto-update';
const TARGET = 'main';
const PR_TITLE = 'chore: auto-update mods';
const token = process.env.FORGEJO_TOKEN;
const repo = process.env.GITHUB_REPOSITORY;
if (!token) {
console.error('FORGEJO_TOKEN not set');
process.exit(1);
}
if (!repo) {
console.error('GITHUB_REPOSITORY not set');
process.exit(1);
}
const apiBase = `${FORGEJO_URL}/api/v1/repos/${repo}`;
async function api(
method: string,
path: string,
body?: unknown,
): Promise<Response> {
const res = await fetch(`${apiBase}${path}`, {
method,
headers: {
Authorization: `token ${token}`,
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: body ? JSON.stringify(body) : undefined,
});
return res;
}
interface ForgejoPR {
number: number;
state: string;
head: { ref: string };
base: { ref: string };
title: string;
}
async function findOpenPR(): Promise<ForgejoPR | null> {
const owner = repo!.split('/')[0];
const res = await api(
'GET',
`/pulls?state=open&head=${owner}:${BRANCH}&base=${TARGET}&limit=50`,
);
if (!res.ok) {
throw new Error(`list PRs failed: ${res.status} ${await res.text()}`);
}
const prs = (await res.json()) as ForgejoPR[];
const match = prs.find(
(p) => p.head.ref === BRANCH && p.base.ref === TARGET && p.state === 'open',
);
return match ?? null;
}
async function postComment(prNumber: number, body: string): Promise<void> {
const res = await api('POST', `/issues/${prNumber}/comments`, { body });
if (!res.ok) {
throw new Error(`comment failed: ${res.status} ${await res.text()}`);
}
}
async function createPR(body: string): Promise<number> {
const res = await api('POST', '/pulls', {
title: PR_TITLE,
body,
head: BRANCH,
base: TARGET,
});
if (!res.ok) {
throw new Error(`create PR failed: ${res.status} ${await res.text()}`);
}
const pr = (await res.json()) as ForgejoPR;
return pr.number;
}
async function updatePR(prNumber: number, body: string): Promise<void> {
const res = await api('PATCH', `/pulls/${prNumber}`, { body });
if (!res.ok) {
throw new Error(`update PR failed: ${res.status} ${await res.text()}`);
}
}
function runModDiff(
oldRef: string,
newRef: string,
pathPrefix: string,
): string {
const bin = process.env.MOD_DIFF_BIN || './updater-bin/mod-diff';
if (!fs.existsSync(bin)) {
console.warn(`mod-diff bin not found at ${bin}; skipping diff`);
return '';
}
try {
return execFileSync(bin, [oldRef, newRef, pathPrefix], {
encoding: 'utf-8',
}).trim();
} catch (e) {
console.warn(
`mod-diff failed for ${pathPrefix}: ${e instanceof Error ? e.message : e}`,
);
return '';
}
}
function findModpackSubdirs(): Array<[string, string]> {
const out: Array<[string, string]> = [];
const root = 'modpacks';
if (!fs.existsSync(root)) return out;
for (const pack of fs.readdirSync(root)) {
const packPath = path.join(root, pack);
if (!fs.statSync(packPath).isDirectory()) continue;
for (const sub of fs.readdirSync(packPath)) {
if (!/-mr$|-cf$/.test(sub)) continue;
const subPath = path.join(packPath, sub);
if (fs.statSync(subPath).isDirectory()) {
out.push([`${pack}/${sub}`, subPath]);
}
}
}
return out;
}
function buildPRBody(): string {
const sections: string[] = [];
sections.push(
'Automated PR from the auto update action.);
const subdirs = findModpackSubdirs();
const diffSections: string[] = [];
for (const [label, subdir] of subdirs) {
const md = runModDiff(`origin/${TARGET}`, 'HEAD', subdir);
if (md) {
diffSections.push(`### ${label}\n\n${md}`);
}
}
if (diffSections.length === 0) {
sections.push(
'\n## Mod Updates\n\n_No mod version changes detected.',
);
} else {
sections.push('\n## Mod Updates\n\n' + diffSections.join('\n\n'));
}
const timestamp = new Date().toISOString();
sections.push(`\n---\n_Last updated: ${timestamp}_`);
return sections.join('\n');
}
async function prePush(): Promise<void> {
const existing = await findOpenPR();
if (!existing) {
console.log('no existing open PR; nothing to announce.');
return;
}
const timestamp = new Date().toISOString();
await postComment(
existing.number,
`Force-pushing updated auto-update branch (${timestamp}).`,
);
console.log(`posted force-push notice to PR #${existing.number}`);
}
async function postPush(): Promise<void> {
const body = buildPRBody();
const existing = await findOpenPR();
if (existing) {
await updatePR(existing.number, body);
console.log(`updated PR #${existing.number}`);
} else {
const num = await createPR(body);
console.log(`created PR #${num}`);
}
}
const phase = process.argv[2];
(async () => {
try {
if (phase === 'pre-push') {
await prePush();
} else if (phase === 'post-push') {
await postPush();
} else {
console.error('usage: tsx pr.ts <pre-push|post-push>');
process.exit(1);
}
} catch (e) {
console.error(`pr.ts ${phase} failed:`, e instanceof Error ? e.message : e);
process.exit(1);
}
})();