forked from BynBang/OpenPrestige
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]>
29 lines
1.1 KiB
Java
29 lines
1.1 KiB
Java
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);
|
|
}
|
|
}
|