forked from BynBang/OpenPrestige
Sync local working tree: injector, engine, mixin and build updates
Add compatibility notes, resource-provider and hook checks, and payload bundling script. Remove generated engine mixin stubs, engine target lists and prebuilt binaries now produced by the build. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
6d94493e58
commit
05d169a2dd
210 files changed
+1862
-849
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package dev.zprestige.prestige.inject;
|
||||
|
||||
/** JDK-only check; no game, Fabric runtime or native injection required. */
|
||||
public final class MinecraftTargetCheck {
|
||||
public static void main(String[] args) {
|
||||
for (int patch = 1; patch <= 11; patch++) {
|
||||
String target = "1.21." + patch;
|
||||
MinecraftTarget.require(target, target);
|
||||
for (int other = 1; other <= 11; other++) {
|
||||
if (patch != other) rejects(target, "1.21." + other);
|
||||
}
|
||||
}
|
||||
rejects("1.21.11", "1.21.11-pre1");
|
||||
rejects("1.21.11", "1.21.110");
|
||||
rejects("", "");
|
||||
System.out.println("Minecraft target checks passed");
|
||||
}
|
||||
|
||||
private static void rejects(String target, String actual) {
|
||||
try {
|
||||
MinecraftTarget.require(target, actual);
|
||||
} catch (IllegalStateException expected) {
|
||||
if (!expected.getMessage().contains(actual)) throw new AssertionError(expected);
|
||||
return;
|
||||
}
|
||||
throw new AssertionError("Accepted mismatched target " + target + " / " + actual);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user