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:
aidanandClaude Opus 5.5 committed 2026-11-10 17:27:24 -06:00
1 parent 6d94493e58
commit 05d169a2dd
210 files changed
+1862 -849

No files matched your search

+14 -9
View File
@@ -8,6 +8,12 @@ on:
- "src/**"
- "scripts/**"
- "build.gradle"
- "settings.gradle"
- "stonecutter.gradle"
- "gradle.properties"
- "versions/**/gradle.properties"
- "gradle/**"
- "check/**"
- ".github/workflows/injector.yml"
jobs:
@@ -75,7 +81,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check release packaging
run: python3 scripts/test_release.py
run: |
python3 scripts/test_release.py
python3 check/bundle_payloads_check.py
- uses: actions/setup-java@v4
with:
distribution: temurin
@@ -88,15 +96,12 @@ jobs:
- name: Build remapped jar
run: |
chmod +x ./gradlew
./gradlew remapJar --console=plain
./gradlew bundlePayloads -PpythonExecutable=python3 --console=plain
- name: Upload jar
uses: actions/upload-artifact@v4
with:
name: payload-jar # also the Fabric mod: drop prestige-*.jar into mods/
path: |
build/libs/prestige-*.jar
!build/libs/*-dev.jar
!build/libs/*-sources.jar
name: payload-bundle
path: build/bundle
if-no-files-found: error
injector:
@@ -151,8 +156,8 @@ jobs:
- name: Download payload jar
uses: actions/download-artifact@v4
with:
name: payload-jar
path: build/libs
name: payload-bundle
path: build/bundle
- name: Build
run: cargo build --release --manifest-path injector/Cargo.toml
- name: Test
+1
View File
@@ -17,6 +17,7 @@ hs_err_pid*
openvape.zip
/dist/
/work/
/injector/target/
/tools
/examples
+94
View File
@@ -0,0 +1,94 @@
# Minecraft multi-version compatibility
Implemented targets: every release from **1.21.1 through 1.21.11**. The editor
version remains 1.21.11; Stonecutter 0.9.8 produces eleven exact-version variants
from the shared source tree. Dependencies are pinned in each version directory.
## Verified on Windows x64, JDK 21
- All eleven variants compile, remap, and pass access-widener validation.
- Every variant passes bytecode checks of ClassTransform target classes, shadow
fields, method selectors, callback parameters, and invocation targets.
- Every variant launches a development client, initializes all applicable
modules, loads every engine target, and exits normally.
- The release contains one injector and one native library. The native library
embeds one common JAR and eleven version payloads, selecting the exact target
from Fabric metadata before loading it.
- Native loading tests on 1.21.1 and 1.21.11 select and extract the correct
payload plus the common JAR. These tests run with the mod already present,
so bootstrap deliberately skips installing a second set of hooks.
- Recombining each thin payload with common.jar reproduces every original
remapped JAR entry byte for byte. Exact-version guard and bundle reconstruction
checks pass.
- The split payloads total 46,889,252 bytes, versus 174,127,644 bytes for the
eleven standalone JARs. The Windows release ZIP is 45,882,051 bytes.
| Minecraft | Initialized modules | Loaded engine targets | Startup |
| --- | ---: | ---: | --- |
| 1.21.1 | 117 | 40 | Passed |
| 1.21.2 | 117 | 41 | Passed |
| 1.21.3 | 117 | 41 | Passed |
| 1.21.4 | 117 | 41 | Passed |
| 1.21.5 | 117 | 41 | Passed |
| 1.21.6 | 117 | 41 | Passed |
| 1.21.7 | 117 | 41 | Passed |
| 1.21.8 | 117 | 41 | Passed |
| 1.21.9 | 117 | 42 | Passed |
| 1.21.10 | 117 | 42 | Passed |
| 1.21.11 | 121 | 42 | Passed |
Spear modules are omitted before 1.21.11 because those game versions do not
contain spears. Their manifest and UI entries are omitted as well. Engine
anchors, transformer lists, and named/intermediary target lists are generated
from each version’s compiled annotations and Yarn mappings.
## Runtime limits
The user reports Dawn 1.21.11 working. The checks above are development Fabric
clients; full Dawn injection and world gameplay have not been tested separately
on every patch version. Startup checks do not exercise every module.
The existing nonfatal prestige:inter font JSON warning remains. Previous
isolated-loader injection self-tests had hierarchy-related failures; this work
does not claim to resolve those self-test limitations. ARM64, Linux, and macOS
build scripts are updated but were not built or hardware-tested in this Windows
session.
Only the eleven listed versions are selected. Minecraft 1.21, snapshots, and
unrecognized versions are rejected rather than assigned the nearest payload.
## Build and use
```powershell
./gradlew :1.21.1:build # one standalone Fabric mod
./gradlew bundlePayloads # all variants, checks, shared bundle
./build-injector.ps1 # offline Windows injector ZIP
```
Use JDK 21, Python 3, and Rust with MSVC build tools. Override the Python command
with `build-injector.ps1 -Python <python.exe>` or
`./gradlew bundlePayloads -PpythonExecutable=<python.exe>` when needed.
Extract the complete release ZIP. Keep OpenPrestigeInjector.exe and
prestige_native.dll together, start a supported game, then select its JVM in the
injector. The native release needs no loose payload JARs or runtime downloads.
Use either injection or a standalone Fabric mod, and start a fresh game process
when testing a replacement native release.
Per-version standalone mods are in `versions/<minecraft>/build/libs/`. The
`build/bundle/*.jar` files are split injector inputs and must not be installed
as standalone mods. Per-version development worlds live in separate run
directories.
```powershell
./gradlew validateHooks
python check/bundle_payloads_check.py
python scripts/test_release.py
./gradlew -I check/resource-provider.gradle :1.21.11:resourceProviderCheck
cargo test --manifest-path injector/Cargo.toml -p prestige_native --offline
```
The resource-provider regression retains the generated-class fallback used by
the Dawn fix. Single-target developer builds can explicitly set
`PRESTIGE_PAYLOAD`; normal native builds require the complete bundle and never
pick an arbitrary newest JAR.
Binary file not shown.
+30 -5
View File
@@ -1,8 +1,11 @@
# Open Prestige
**Minecraft 1.21.1 through 1.21.11:** shared sources are built with Stonecutter.
See [COMPATIBILITY.md](COMPATIBILITY.md) for verification and runtime limits.
This repository builds the fully offline OpenPrestige CLI with its payload embedded in the native library. The graphical launcher and runtime downloads are maintained in the separate Prestige repository. See [injector build instructions](injector/README.md).
A fully deobfuscated, IntelliJ-ready, runnable open sourced version of the Prestige client for Fabric 1.21.11.
A fully deobfuscated, IntelliJ-ready, runnable open sourced version of the Prestige client for Fabric 1.21.1–1.21.11.
---
- we will work on removing the param obf and also renaming vars in the coming days. stay tuned!
@@ -36,17 +39,39 @@ run.bat
Open in IntelliJ: File > Open > this folder (`build.gradle`), "Open as Project", Gradle JVM = JDK 21,
then use the generated **Minecraft Client** run configuration.
Build a self-contained mod jar (imgui-java + natives and ClassTransform are bundled):
Build one exact-version Fabric mod (replace the version as needed):
```
gradlew build
gradlew :1.21.1:build
```
Build all eleven variants and the shared-library payload bundle:
```
gradlew bundlePayloads
```
Build the offline Windows injector ZIP with all versions embedded:
```powershell
./build-injector.ps1
```
The native library selects the exact game version before loading the client.
ImGui, native libraries, ClassTransform, and identical assets are stored once.
Standalone mod JARs remain in `versions/<minecraft>/build/libs/`; install only the
one matching your game. `build/bundle/*.jar` are split injector inputs, not mods.
JDK 21, Python 3, and Rust with platform build tools are required. If Python is not
on PATH, use `build-injector.ps1 -Python <python.exe>` or Gradle's
`-PpythonExecutable=<python.exe>`. Linux/macOS host builds use `build-injector.sh`.
Stonecutter's active editor version is 1.21.11. Each version has its own dev run
folder; do not move test worlds between game versions.
## Credits
- **technix**: sourcing / Frida scripts
- **stutheguyy**: fixing
- **bynbang / nitrogenoliquido**: ZKM transformers
- **dario**: AI models
- **aidan** for being cool and awesome and hot and updating to support dawn client aswell as every single version from 1.21 to 1.21.11
- **downrizz** aidan again, hes so fucking cool
-22
View File
@@ -1,22 +0,0 @@
OpenPrestige 0.1.0 - windows-x86_64
Extract this complete folder and run OpenPrestigeInjector.exe.
Original CLI: Up/Down selects a Minecraft JVM, Enter injects, Esc quits.
Keep prestige_native.dll beside the executable.
The native library embeds its payload. No external JAR or runtime download is required.
It selects the exact game version and stores common libraries once.
The launcher has no downloader or update checks.
Requires a 64-bit Minecraft 1.21.1 through 1.21.11 Fabric JVM.
Linux/macOS: run from a terminal as the same user as the game; attach must be enabled.
The Fabric mod JAR is available separately. Use either injection or the mod.
All versions have build and startup checks; Dawn gameplay still needs per-version verification.
Credits
Cracked by Skid Solutions
technix sourcing / Frida scripts
stutheguyy fixing
bynbang / nitrogenoliquido ZKM transformers
dario AI models
Discord: https://discord.gg/x2FJyGrDNg
+45
View File
@@ -0,0 +1,45 @@
"""Run with python check/bundle_payloads_check.py."""
import importlib.util
import tempfile
import zipfile
from pathlib import Path
spec = importlib.util.spec_from_file_location('bundle_payloads', Path(__file__).resolve().parents[1] / 'scripts/bundle_payloads.py')
bundle = importlib.util.module_from_spec(spec)
spec.loader.exec_module(bundle)
def entries(path):
with zipfile.ZipFile(path) as jar:
return {name: jar.read(name) for name in jar.namelist()}
test_root = Path(__file__).resolve().parents[1] / 'work'
test_root.mkdir(exist_ok=True)
with tempfile.TemporaryDirectory(dir=test_root) as temporary:
directory = Path(temporary)
inputs = {}
for version in ('1.21.1', '1.21.11'):
path = directory / f'input-{version}.jar'
with zipfile.ZipFile(path, 'w') as jar:
jar.writestr('prestige-engine/minecraft-version.txt', version)
jar.writestr('imgui/ImGui.class', b'shared library')
jar.writestr('library/Different.class', version.encode())
jar.writestr('dev/zprestige/Prestige.class', b'keep game code local')
jar.writestr('fabric.mod.json', b'keep metadata local')
inputs[version] = path
output = directory / 'output'
bundle.pack(inputs, output)
common = entries(output / 'common.jar')
assert common == {'imgui/ImGui.class': b'shared library'}
for version, original in inputs.items():
variant = entries(output / f'{version}.jar')
assert not common.keys() & variant.keys()
assert common | variant == entries(original), 'Split must reconstruct every original entry exactly'
try:
bundle.pack({'1.21.2': inputs['1.21.1']}, directory / 'bad')
except ValueError:
pass
else:
raise AssertionError('Mismatched payload target accepted')
print('Bundle reconstruction and target checks passed')
@@ -0,0 +1,70 @@
package dev.zprestige.prestige.engine;
import java.lang.reflect.Constructor;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;
import net.lenni0451.classtransform.utils.tree.IClassProvider;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
/** Exercises an actual resource-less generated class without requiring native injection. */
public final class ResourceClassProviderCheck {
public static void main(String[] args) throws Exception {
String name = "prestige.check.GeneratedLocalRef";
String internal = name.replace('.', '/');
ClassWriter writer = new ClassWriter(0);
writer.visit(Opcodes.V21, Opcodes.ACC_PUBLIC, internal, null, "java/lang/Object", null);
MethodVisitor init = writer.visitMethod(Opcodes.ACC_STATIC, "<clinit>", "()V", null, null);
init.visitCode();
init.visitTypeInsn(Opcodes.NEW, "java/lang/AssertionError");
init.visitInsn(Opcodes.DUP);
init.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/lang/AssertionError", "<init>", "()V", false);
init.visitInsn(Opcodes.ATHROW);
init.visitMaxs(2, 0);
init.visitEnd();
writer.visitEnd();
byte[] definition = writer.toByteArray();
class GeneratedLoader extends ClassLoader {
GeneratedLoader() { super(ResourceClassProviderCheck.class.getClassLoader()); }
Class<?> define() { return defineClass(name, definition, 0, definition.length); }
}
GeneratedLoader loader = new GeneratedLoader();
Class<?> generated = loader.define();
if (loader.getResourceAsStream(internal + ".class") != null) throw new AssertionError("fixture has a resource");
AtomicInteger calls = new AtomicInteger();
Function<Class<?>, byte[]> live = type -> {
calls.incrementAndGet();
if (type != generated) throw new AssertionError("wrong generated class");
return definition;
};
IClassProvider provider = provider(loader, null, live);
if (!Arrays.equals(definition, provider.getClass(name))) throw new AssertionError("wrong live bytes");
provider.getClass("java.lang.String");
if (calls.get() != 1) throw new AssertionError("resource-backed classes must not use live capture");
String tiny = "tiny\t2\t0\tintermediary\tnamed\nc\t" + internal + "\tprestige/check/NamedLocalRef\n";
if (!Arrays.equals(definition, provider(loader, tiny.getBytes(StandardCharsets.UTF_8), live)
.getClass("prestige.check.NamedLocalRef"))) throw new AssertionError("mapped fallback failed");
rejects(provider(loader, null, null), name);
rejects(provider(loader, null, type -> null), name);
rejects(provider(loader, null, type -> new byte[0]), name);
rejects(provider(loader, null, live), "prestige.check.MissingClass");
System.out.println("Generated-class resource fallback checks passed (class was not initialized)");
}
private static IClassProvider provider(ClassLoader loader, byte[] tiny, Function<Class<?>, byte[]> live) throws Exception {
Class<?> type = Class.forName("dev.zprestige.prestige.engine.EnginePlugin$ResourceClassProvider");
Constructor<?> constructor = type.getDeclaredConstructor(ClassLoader.class, Set.class, byte[].class, Function.class);
constructor.setAccessible(true);
return (IClassProvider) constructor.newInstance(loader, Set.of(), tiny, live);
}
private static void rejects(IClassProvider provider, String name) throws Exception {
try { provider.getClass(name); }
catch (ClassNotFoundException expected) { return; }
throw new AssertionError("accepted unavailable bytes for " + name);
}
}
@@ -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);
}
}
+17
View File
@@ -0,0 +1,17 @@
// Run with: gradlew -I check/resource-provider.gradle resourceProviderCheck
gradle.projectsEvaluated {
def project = gradle.rootProject.project(':1.21.11')
def compileCheck = project.tasks.register('compileResourceProviderCheck', JavaCompile) {
dependsOn project.tasks.named('classes')
source project.rootProject.file('check/dev/zprestige/prestige/engine/ResourceClassProviderCheck.java')
classpath = project.sourceSets.main.runtimeClasspath
destinationDirectory = project.layout.buildDirectory.dir('checks/resource-provider')
options.release = 21
options.encoding = 'UTF-8'
}
project.tasks.register('resourceProviderCheck', JavaExec) {
dependsOn compileCheck
classpath = project.files(compileCheck.flatMap { it.destinationDirectory }) + project.sourceSets.main.runtimeClasspath
mainClass = 'dev.zprestige.prestige.engine.ResourceClassProviderCheck'
}
}
+2 -3
View File
@@ -1,10 +1,9 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
org.gradle.workers.max=2
dev.kikugie.stonecutter.hard_mode=true
# Fabric (https://modmuss50.me/fabric.html)
minecraft_version=1.21.11
yarn_mappings=1.21.11+build.4
loader_version=0.19.2
fabric_version=0.141.6+1.21.11
# Mod
mod_version=0.1.0
maven_group=dev.prestige
+94
View File
@@ -0,0 +1,94 @@
// Compile-time Java checks cannot see the string descriptors used by ClassTransform.
tasks.register('validateHooks') {
dependsOn tasks.named('compileJava')
inputs.files(tasks.named('compileJava').flatMap { it.destinationDirectory }, sourceSets.main.compileClasspath)
def report = layout.buildDirectory.file('reports/hooks.txt')
outputs.file(report)
doLast {
def jars = sourceSets.main.compileClasspath.files.findAll { it.name.endsWith('.jar') }
.collect { new java.util.zip.ZipFile(it) }
try {
def cache = [:]
Closure readClass = { String name ->
if (cache.containsKey(name)) return cache[name]
def zip = jars.find { it.getEntry("${name}.class") != null }
if (zip == null) return null
def node = hookAsm.node()
hookAsm.reader(zip.getInputStream(zip.getEntry("${name}.class"))).accept(node, 0)
cache[name] = node
node
}
def annotations = { node -> (node.visibleAnnotations ?: []) + (node.invisibleAnnotations ?: []) }
def properties = { annotation ->
def result = [:]
def values = annotation.values ?: []
for (int i = 0; i < values.size(); i += 2) result[values[i]] = values[i + 1]
result
}
def errors = []
int handlers = 0
fileTree(tasks.named('compileJava').get().destinationDirectory).matching {
include 'dev/zprestige/prestige/mixin/*.class', 'dev/zprestige/prestige/inject/hooks/*.class'
}.each { file ->
def hook = hookAsm.node()
hookAsm.reader(file.bytes).accept(hook, 0)
def transformer = annotations(hook).find { it.desc.endsWith('/CTransformer;') }
if (transformer == null) return
def targets = properties(transformer).value.collect { readClass(it.internalName) }
if (targets.any { it == null }) errors.add("${hook.name}: missing target class")
targets.findAll { it != null }.each { target ->
hook.fields.each { field ->
def shadow = annotations(field).find { it.desc.endsWith('/CShadow;') }
if (shadow != null) {
def name = properties(shadow).value ?: field.name
def owner = target
def found = false
while (owner != null && !found) {
found = owner.fields.any { it.name == name && it.desc == field.desc }
owner = found ? null : readClass(owner.superName)
}
if (!found) errors.add("${hook.name}.${field.name}: missing shadow ${target.name}.${name} ${field.desc}")
}
}
hook.methods.each { method ->
annotations(method).findAll { it.desc.contains('/annotations/injection/') }.each { annotation ->
def config = properties(annotation)
(config.method ?: []).each { selector ->
def matches = target.methods.findAll {
selector.contains('(') ? it.name + it.desc == selector : it.name == selector
}
handlers++
if (matches.isEmpty()) errors.add("${hook.name}.${method.name}: missing ${target.name}.${selector}")
if (annotation.desc.endsWith('/CInject;')) {
def parameters = hookAsm.arguments(method.desc).toList()
if (parameters && parameters.last().descriptor == 'Lnet/lenni0451/classtransform/InjectionCallback;') parameters.removeLast()
if (parameters && !matches.any { hookAsm.arguments(it.desc).toList() == parameters }) {
errors.add("${hook.name}.${method.name}: callback parameters ${parameters} do not match ${target.name}.${selector} ${matches.collect { it.desc }}")
}
}
def points = config.target instanceof List ? config.target : config.target ? [config.target] : []
points.each { point ->
def injection = properties(point)
if (injection.value == 'INVOKE') {
def expected = injection.target
def found = matches.any { candidate -> candidate.instructions.any { instruction ->
hookAsm.methodInstruction(instruction) && "L${instruction.owner};${instruction.name}${instruction.desc}" == expected
} }
if (!found) errors.add("${hook.name}.${method.name}: missing invocation ${expected} in ${target.name}.${selector}")
}
}
}
}
}
}
}
report.get().asFile.parentFile.mkdirs()
report.get().asFile.text = "Checked ${handlers} handlers for Minecraft ${project.minecraft_version}\n" + errors.join('\n') + '\n'
if (errors) throw new GradleException("${errors.size()} hook compatibility errors; see ${report.get().asFile}")
logger.lifecycle("Verified ${handlers} hook handlers for Minecraft ${project.minecraft_version}")
} finally {
jars.each { it.close() }
}
}
}
tasks.named('check') { dependsOn tasks.named('validateHooks') }
+35 -5
View File
@@ -7,8 +7,13 @@ repository. There is no GUI or HTTP dependency in this injector and no edition b
## Build
Run `build-injector.ps1` on Windows or `build-injector.sh` on Linux/macOS. Both build the Fabric JAR,
then the native library and CLI, collecting the results in `dist/`. The native library always embeds
the exact remapped JAR. The loose JAR is provided for optional installation as a Fabric mod.
then the native library and CLI, collecting the results and a host ZIP in `dist/`.
Stonecutter compiles every target from 1.21.1 through 1.21.11. `bundlePayloads`
requires every variant to build and pass access-widener and hook checks before
splitting the JARs into `build/bundle/common.jar` and eleven exact-version payloads.
The native library embeds those files, sharing byte-identical libraries and assets
once. Versioned game classes, hooks, mappings, and metadata stay in each payload.
Standalone Fabric mods are available in `versions/<minecraft>/build/libs/`.
Run `build-release.bat` on Windows to build all platforms. `dist/release/` contains:
@@ -18,7 +23,6 @@ openprestige-<version>-windows-aarch64.zip
openprestige-<version>-linux-x86_64.zip
openprestige-<version>-linux-aarch64.zip
openprestige-<version>-macos-universal.zip
prestige-<version>.jar
SHA256SUMS.txt
```
@@ -37,14 +41,16 @@ OpenPrestigeInjector <pid> [lib path] # optional explicit library path
Keep the native library beside the executable. The CLI uses that library and never looks in
Prestige's downloaded runtime cache. It has no update checks or `--download` command.
The library writes its embedded JAR locally so the JVM can load it. No external JAR is needed for
The library reads Fabric metadata, rejects unsupported targets, then extracts the
shared JAR and only the matching version payload so the JVM can load them. No external JAR is needed for
injection. Linux/macOS require a terminal, the same user as the game, and JVM attach enabled.
## Platforms and requirements
Windows and Linux support x86_64 and ARM64. macOS supports Intel and Apple Silicon.
The injector, library and JVM architectures must match. ARM64 execution needs hardware testing.
The game code currently targets Minecraft 1.21.11 Fabric, Fabric Loader 0.19+ and Fabric API.
The game code targets Minecraft 1.21.1 through 1.21.11 Fabric, Fabric Loader 0.19+
and a Fabric API build matching the game. Spear modules are included only on 1.21.11.
Build tools require Rust, Python 3 and JDK 21. On Windows, the full release build also requires
MSVC build tools for x64 and ARM64. `build-release.bat` fetches pinned ImGui sources and builds
@@ -64,3 +70,27 @@ working files or edition build flags. Game code fixes must be ported between rep
| Linux | `$XDG_DATA_HOME/.openprestige` or `~/.local/share/.openprestige` |
Configs live in `configs/`, logs in `logs/`, and local runtime files in `runtime/`.
## Developer checks
```powershell
./gradlew validateHooks
python check/bundle_payloads_check.py
python scripts/test_release.py
./gradlew -I check/resource-provider.gradle :1.21.11:resourceProviderCheck
```
`validateHooks` checks target classes, shadow fields, method selectors, callback
parameters, and invocation targets against each version's mapped game bytecode.
Engine anchor classes and target lists are generated from compiled transformer
annotations and that version's Yarn mappings.
Normal Cargo builds require the complete `build/bundle` directory. Set
`PRESTIGE_BUNDLE` to use a different complete bundle directory. An explicit
`PRESTIGE_PAYLOAD=<fat-remapped.jar>` remains available for single-target developer
builds, with the Java exact-target guard retained. There is no newest-JAR fallback.
Windows-only native loading smoke tests can use the existing engine command file
with `loadnative <absolute DLL path>`, followed by `wait 40` and `exit`. In a dev
client already running Prestige as a Fabric mod, bootstrap skips installing a
second set of hooks. This exercises native metadata lookup and payload selection.
+63 -2
View File
@@ -170,7 +170,7 @@ unsafe extern "system" fn collect(hwnd: Handle, param: isize) -> i32 {
1
}
/// Visible top-level windows that belong to java.exe / javaw.exe, one entry per process.
/// Visible JVM windows, including clients that embed HotSpot in their own executable.
pub fn java_processes() -> Vec<JavaProcess> {
let mut windows: Vec<(u32, String)> = Vec::new();
unsafe {
@@ -185,7 +185,10 @@ pub fn java_processes() -> Vec<JavaProcess> {
continue;
};
let exe = path.rsplit(['\\', '/']).next().unwrap_or("").to_string();
if exe.eq_ignore_ascii_case("javaw.exe") || exe.eq_ignore_ascii_case("java.exe") {
if exe.eq_ignore_ascii_case("javaw.exe")
|| exe.eq_ignore_ascii_case("java.exe")
|| module_loaded(pid, "jvm.dll")
{
out.push(JavaProcess { pid, title, exe });
}
}
@@ -344,3 +347,61 @@ unsafe fn inject_into(process: Handle, pid: u32, dll: &Path) -> Result<(), Strin
}
Err(format!("LoadLibraryW returned {exit:#x} but {file_name} is not mapped (missing dependency or blocked by security software?)"))
}
#[cfg(test)]
mod tests {
use super::*;
extern "system" {
fn LoadLibraryExW(path: *const u16, file: Handle, flags: u32) -> Handle;
fn FreeLibrary(module: Handle) -> i32;
}
#[link(name = "user32")]
extern "system" {
fn CreateWindowExW(ex: u32, class: *const u16, title: *const u16, style: u32,
x: i32, y: i32, width: i32, height: i32, parent: Handle, menu: Handle,
instance: Handle, param: *mut c_void) -> Handle;
fn DestroyWindow(window: Handle) -> i32;
}
struct Fixture { window: Handle, library: Handle }
impl Drop for Fixture {
fn drop(&mut self) {
unsafe {
if !self.window.is_null() { DestroyWindow(self.window); }
if !self.library.is_null() { FreeLibrary(self.library); }
}
}
}
#[test]
fn discovers_a_custom_executable_only_when_it_hosts_a_jvm() {
let pid = std::process::id();
let image = image_name(pid).expect("read test executable path");
assert!(!image.ends_with("\\java.exe") && !image.ends_with("\\javaw.exe"));
let home = std::env::var_os("JAVA_HOME").expect("set JAVA_HOME to a 64-bit JDK for this test");
let jvm = Path::new(&home).join("bin/server/jvm.dll");
assert!(jvm.is_file(), "missing {}", jvm.display());
unsafe {
let mut fixture = Fixture { window: std::ptr::null_mut(), library: std::ptr::null_mut() };
// The picker requires a visible window; place this 1px fixture off-screen.
fixture.window = CreateWindowExW(0, wide(Path::new("STATIC")).as_ptr(),
wide(Path::new("OpenPrestige JVM discovery test")).as_ptr(), 0x90000000,
-32000, -32000, 1, 1, std::ptr::null_mut(), std::ptr::null_mut(),
GetModuleHandleW(std::ptr::null()), std::ptr::null_mut());
assert!(!fixture.window.is_null(), "{}", last_error("CreateWindowExW"));
assert!(!module_loaded(pid, "jvm.dll"));
assert!(!java_processes().iter().any(|process| process.pid == pid));
fixture.library = LoadLibraryExW(wide(&jvm).as_ptr(), std::ptr::null_mut(), 0x00001100);
assert!(!fixture.library.is_null(), "{}", last_error("LoadLibraryExW(jvm.dll)"));
assert!(module_loaded(pid, "JVM.DLL"));
assert!(!module_loaded(pid, "openprestige-missing-test-module.dll"));
let processes = java_processes();
let found = processes.iter().find(|process| process.pid == pid)
.expect("custom executable hosting HotSpot was not listed");
assert_eq!(found.title, "OpenPrestige JVM discovery test");
}
}
}
+28 -41
View File
@@ -1,46 +1,33 @@
//! Locates the remapped Prestige payload jar (built by `gradlew remapJar`) so lib.rs can embed it with include_bytes!.
use std::env;
use std::fs;
use std::path::PathBuf;
//! Embed exact-version payloads and one copy of their common libraries.
use std::{env, fs, path::{Path, PathBuf}};
fn include(path: &Path) -> String {
let path = path.canonicalize().unwrap_or_else(|e| panic!("{}: {e}", path.display()));
println!("cargo:rerun-if-changed={}", path.display());
format!("include_bytes!({:?})", path.to_str().expect("UTF-8 payload path"))
}
fn main() {
println!("cargo:rerun-if-env-changed=PRESTIGE_PAYLOAD");
let jar = match env::var("PRESTIGE_PAYLOAD") {
Ok(p) => PathBuf::from(p),
Err(_) => newest_remapped_jar(),
};
if !jar.is_file() {
panic!(
"payload jar not found: {} (run `gradlew remapJar` or set PRESTIGE_PAYLOAD)",
jar.display()
);
}
println!("cargo:rerun-if-changed={}", jar.display());
println!("cargo:rustc-env=PRESTIGE_PAYLOAD_JAR={}", jar.display());
}
fn newest_remapped_jar() -> PathBuf {
let libs = PathBuf::from(env::var("CARGO_MANIFEST_DIR").unwrap()).join("../../../build/libs");
let mut best: Option<(std::time::SystemTime, PathBuf)> = None;
if let Ok(entries) = fs::read_dir(&libs) {
for entry in entries.flatten() {
let name = entry.file_name().to_string_lossy().to_string();
if !name.starts_with("prestige-")
|| !name.ends_with(".jar")
|| name.ends_with("-dev.jar")
|| name.ends_with("-sources.jar")
{
continue;
}
let time = entry
.metadata()
.and_then(|m| m.modified())
.unwrap_or(std::time::UNIX_EPOCH);
if best.as_ref().map_or(true, |(t, _)| time > *t) {
best = Some((time, entry.path()));
}
println!("cargo:rerun-if-env-changed=PRESTIGE_BUNDLE");
let generated = if let Ok(jar) = env::var("PRESTIGE_PAYLOAD") {
// Explicit single-target developer builds retain Java's exact-target guard.
format!("static COMMON: &[u8] = &[];\nstatic PAYLOADS: &[(&str, &[u8])] = &[(\"\", {})];", include(Path::new(&jar)))
} else {
let dir = env::var_os("PRESTIGE_BUNDLE").map(PathBuf::from).unwrap_or_else(||
PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap()).join("../../../build/bundle"));
let manifest = dir.join("versions.txt");
println!("cargo:rerun-if-changed={}", manifest.display());
let versions = fs::read_to_string(&manifest)
.expect("run gradlew bundlePayloads before building the native bundle");
let expected: Vec<_> = (1..=11).map(|n| format!("1.21.{n}")).collect();
assert_eq!(versions.lines().collect::<Vec<_>>(), expected, "incomplete payload matrix");
let mut code = format!("static COMMON: &[u8] = {};\nstatic PAYLOADS: &[(&str, &[u8])] = &[\n", include(&dir.join("common.jar")));
for version in versions.lines() {
code.push_str(&format!("({version:?}, {}),\n", include(&dir.join(format!("{version}.jar")))));
}
}
best.map(|(_, p)| p)
.unwrap_or_else(|| libs.join("prestige-0.1.0.jar"))
code.push_str("];\n");
code
};
fs::write(PathBuf::from(env::var_os("OUT_DIR").unwrap()).join("payloads.rs"), generated).unwrap();
}
+1 -1
View File
@@ -1,4 +1,4 @@
//! prestige_native.dll: loaded into a running Minecraft 1.21.11 (Fabric) JVM by PrestigeInjector.exe.
//! prestige_native.dll: loads the exact Minecraft 1.21.1–1.21.11 Fabric payload for the running JVM.
//!
//! The DLL worker waits for the JVM, appends the embedded Prestige payload jar to Fabric's Knot class loader, registers the
//! JVMTI-backed natives of `dev.zprestige.prestige.inject.NativeBridge` and starts `Bootstrap`, which transforms the already
+75 -5
View File
@@ -15,7 +15,7 @@ extern "system" {
fn GetProcAddress(module: *mut c_void, name: *const c_char) -> *mut c_void;
}
static PAYLOAD: &[u8] = include_bytes!(env!("PRESTIGE_PAYLOAD_JAR"));
include!(concat!(env!("OUT_DIR"), "/payloads.rs"));
const NATIVE_BRIDGE: &str = "dev.zprestige.prestige.inject.NativeBridge";
const BOOTSTRAP: &str = "dev.zprestige.prestige.inject.Bootstrap";
@@ -45,7 +45,17 @@ unsafe fn install() -> Result<(), String> {
init_jvmti(vm)?;
log!("JVMTI ready");
let jar = write_payload()?;
let (_, fabric_loader) = locate_fabric(&jni)?;
let version = minecraft_version(&jni, fabric_loader)?;
let payload = select_payload(&version, PAYLOADS)
.ok_or_else(|| format!("unsupported Minecraft {version}; bundled targets: {}",
PAYLOADS.iter().map(|(target, _)| *target).collect::<Vec<_>>().join(", ")))?;
log!("selected Minecraft {version} payload");
if !COMMON.is_empty() {
let common = write_payload("common", COMMON)?;
add_to_knot(&jni, &common)?;
}
let jar = write_payload(&version, payload.1)?;
log!("using payload at {}", jar.display());
let loader = add_to_knot(&jni, &jar)?;
@@ -103,15 +113,53 @@ unsafe fn find_vm() -> Result<VmPtr, String> {
Err("no JavaVM was created".into())
}
fn write_payload() -> Result<PathBuf, String> {
fn write_payload(target: &str, bytes: &[u8]) -> Result<PathBuf, String> {
let dir = crate::paths::initialize().map_err(|e| format!("create OpenPrestige data directory: {e}"))?
.join("runtime").join("payloads");
std::fs::create_dir_all(&dir).map_err(|e| format!("create {}: {e}", dir.display()))?;
let path = dir.join(format!("prestige-payload-{}.jar", std::process::id()));
std::fs::write(&path, PAYLOAD).map_err(|e| format!("write {}: {e}", path.display()))?;
if !target.bytes().all(|c| c.is_ascii_alphanumeric() || c == b'.' || c == b'-') {
return Err(format!("invalid Minecraft target: {target}"));
}
let path = dir.join(format!("prestige-{target}-{}.jar", std::process::id()));
std::fs::write(&path, bytes).map_err(|e| format!("write {}: {e}", path.display()))?;
Ok(path)
}
/// Read stable Fabric metadata before adding a payload to the game loader.
unsafe fn minecraft_version(jni: &Jni, loader: JObject) -> Result<String, String> {
let api = load_fabric_class(jni, "net.fabricmc.loader.api.FabricLoader", loader)?;
let instance = jni.get_static_method_id(api, "getInstance", "()Lnet/fabricmc/loader/api/FabricLoader;");
jni.check("FabricLoader.getInstance lookup")?;
let fabric = jni.call_static_object(api, instance, &[]);
jni.check("FabricLoader.getInstance")?;
let get_mod = jni.get_method_id(api, "getModContainer", "(Ljava/lang/String;)Ljava/util/Optional;");
jni.check("FabricLoader.getModContainer lookup")?;
let minecraft = jni.new_string("minecraft");
let optional = jni.call_object(jni_non_null(fabric)?, get_mod, &[obj(minecraft)]);
jni.check("Minecraft mod container")?;
let optional_class = jni.find_class("java/util/Optional");
let get = jni.get_method_id(optional_class, "get", "()Ljava/lang/Object;");
jni.check("Optional.get lookup")?;
let container = jni.call_object(jni_non_null(optional)?, get, &[]);
jni.check("Minecraft mod present")?;
let container_class = load_fabric_class(jni, "net.fabricmc.loader.api.ModContainer", loader)?;
let metadata = jni.get_method_id(container_class, "getMetadata", "()Lnet/fabricmc/loader/api/metadata/ModMetadata;");
jni.check("ModContainer.getMetadata lookup")?;
let metadata = jni.call_object(jni_non_null(container)?, metadata, &[]);
jni.check("Minecraft metadata")?;
let metadata_class = load_fabric_class(jni, "net.fabricmc.loader.api.metadata.ModMetadata", loader)?;
let version = jni.get_method_id(metadata_class, "getVersion", "()Lnet/fabricmc/loader/api/Version;");
jni.check("ModMetadata.getVersion lookup")?;
let version = jni.call_object(jni_non_null(metadata)?, version, &[]);
jni.check("Minecraft version")?;
let version_class = load_fabric_class(jni, "net.fabricmc.loader.api.Version", loader)?;
let friendly = jni.get_method_id(version_class, "getFriendlyString", "()Ljava/lang/String;");
jni.check("Version.getFriendlyString lookup")?;
let friendly = jni.call_object(jni_non_null(version)?, friendly, &[]);
jni.check("Minecraft version string")?;
Ok(jni.get_string_utf(jni_non_null(friendly)?))
}
/// FabricLauncherBase.getLauncher().addToClassPath(path) so the payload and the game classes share the Knot class loader.
/// Returns a local reference to the Fabric launcher's target class loader.
unsafe fn add_to_knot(jni: &Jni, jar: &std::path::Path) -> Result<JObject, String> {
@@ -156,6 +204,28 @@ unsafe fn add_to_knot(jni: &Jni, jar: &std::path::Path) -> Result<JObject, Strin
const FABRIC_BASE: &str = "net.fabricmc.loader.impl.launch.FabricLauncherBase";
fn select_payload<'a>(version: &str, payloads: &'a [(&str, &[u8])]) -> Option<&'a (&'a str, &'a [u8])> {
payloads.iter().find(|(target, _)| target.is_empty() || *target == version)
}
#[cfg(test)]
mod payload_tests {
use super::select_payload;
#[test]
fn only_selects_exact_target() {
let versions: Vec<_> = (1..=11).map(|n| format!("1.21.{n}")).collect();
let payloads: Vec<_> = versions.iter().enumerate()
.map(|(i, version)| (version.as_str(), &b"123456789ab"[i..i+1])).collect();
for (index, version) in versions.iter().enumerate() {
assert_eq!(select_payload(version, &payloads).unwrap().1, &b"123456789ab"[index..index+1]);
}
for unsupported in ["1.21", "1.21.0", "1.21.12", "1.21.1-pre1", ""] {
assert!(select_payload(unsupported, &payloads).is_none());
}
}
}
/// Prefer the render thread's context loader when a launcher supplies its own loader hierarchy.
/// Fall back to the system loader and then the other thread context loaders.
unsafe fn locate_fabric(jni: &Jni) -> Result<(JClass, JObject), String> {
Binary file not shown.
+1 -1
View File
@@ -13,7 +13,7 @@ echo Logging to %LOG%
rem Everything gradle/game prints goes to the console AND logs\run_<time>.log
rem extra args are passed through, e.g. run.bat -PuiCmd=run\cmd\c.txt
set "ARGS=%*"
powershell -NoProfile -Command "& { & '.\gradlew.bat' runClient --console=plain $env:ARGS 2>&1 | ForEach-Object { $_; Add-Content -LiteralPath '%LOG%' -Value $_ -Encoding UTF8 }; exit $LASTEXITCODE }"
powershell -NoProfile -Command "& { & '.\gradlew.bat' :1.21.11:runClient --console=plain $env:ARGS 2>&1 | ForEach-Object { $_; Add-Content -LiteralPath '%LOG%' -Value $_ -Encoding UTF8 }; exit $LASTEXITCODE }"
set "RC=%ERRORLEVEL%"
rem keep a copy of the game's own latest.log and any crash report written during this run
+62
View File
@@ -0,0 +1,62 @@
"""Split all remapped variants into version payloads and one shared library JAR."""
import contextlib
import shutil
import tempfile
import zipfile
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
VERSIONS = tuple(f"1.21.{patch}" for patch in range(1, 12))
def pack(inputs, destination):
"""Keep game classes version-local; share only byte-identical libraries/assets."""
with contextlib.ExitStack() as stack:
jars = {version: stack.enter_context(zipfile.ZipFile(path))
for version, path in inputs.items()}
for version, jar in jars.items():
actual = jar.read("prestige-engine/minecraft-version.txt").decode().strip()
if actual != version:
raise ValueError(f"{version}: payload targets {actual}")
first = next(iter(jars.values()))
candidates = {name for name in first.namelist()
if not name.endswith('/') and not name.startswith((
'dev/zprestige/', 'prestige-engine/', 'META-INF/'))
and name != 'fabric.mod.json' and not name.endswith((
'.mixins.json', '.accesswidener'))}
shared = {name: first.read(name) for name in sorted(candidates)
if all(name in jar.namelist() and jar.read(name) == first.read(name)
for jar in jars.values())}
destination.mkdir(parents=True, exist_ok=True)
with zipfile.ZipFile(destination / 'common.jar', 'w', zipfile.ZIP_DEFLATED) as common:
for name, data in shared.items():
common.writestr(name, data)
for version, jar in jars.items():
with zipfile.ZipFile(destination / f'{version}.jar', 'w', zipfile.ZIP_DEFLATED) as payload:
for name in sorted(jar.namelist()):
if name not in shared and not name.endswith('/'):
payload.writestr(name, jar.read(name))
(destination / 'versions.txt').write_text('\n'.join(inputs) + '\n', encoding='utf-8')
def main():
inputs = {}
for version in VERSIONS:
candidates = [p for p in (ROOT / 'versions' / version / 'build/libs').glob('prestige-*.jar')
if not p.name.endswith(('-sources.jar', '-dev.jar'))]
if len(candidates) != 1:
raise ValueError(f'{version}: expected one remapped JAR, found {len(candidates)}; build all variants first')
inputs[version] = candidates[0]
# Stage only after every input is present. Never publish an incomplete version matrix.
(ROOT / 'build').mkdir(parents=True, exist_ok=True)
with tempfile.TemporaryDirectory(dir=ROOT / 'build') as staging:
pack(inputs, Path(staging))
output = ROOT / 'build/bundle'
output.mkdir(parents=True, exist_ok=True)
for path in Path(staging).iterdir():
shutil.copy2(path, output / path.name)
print(f'Packed {len(inputs)} versions with common.jar in {output}')
if __name__ == '__main__':
main()
+3 -1
View File
@@ -40,10 +40,12 @@ def make_zip(out_dir, version, platform, injector, lib, jar):
"Original CLI: Up/Down selects a Minecraft JVM, Enter injects, Esc quits.\n"
f"Keep {os.path.basename(lib)} beside the executable.\n"
"The native library embeds its payload. No external JAR or runtime download is required.\n"
"It selects the exact game version and stores common libraries once.\n"
"The launcher has no downloader or update checks.\n\n"
"Requires a matching 64-bit Minecraft 1.21.11 Fabric JVM.\n"
"Requires a 64-bit Minecraft 1.21.1 through 1.21.11 Fabric JVM.\n"
"Linux/macOS: run from a terminal as the same user as the game; attach must be enabled.\n"
"The Fabric mod JAR is available separately. Use either injection or the mod.\n"
"All versions have build and startup checks; Dawn gameplay still needs per-version verification.\n"
+ FOOTER)
add(bundle, f"{name}/README.txt", readme.encode(), 0o644)
print(f" wrote {out} ({os.path.getsize(out) // 1024} KiB)")
+13
View File
@@ -9,4 +9,17 @@ pluginManagement {
}
}
plugins {
id 'dev.kikugie.stonecutter' version '0.9.8'
}
rootProject.name = 'prestige'
stonecutter {
kotlinController = false
centralScript = 'build.gradle'
create(rootProject) {
versions '1.21.1', '1.21.2', '1.21.3', '1.21.4', '1.21.5', '1.21.6',
'1.21.7', '1.21.8', '1.21.9', '1.21.10', '1.21.11'
}
}
@@ -119,7 +119,11 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
(float)damage,
mc.world.getDamageSources().explosion(null),
target.getArmor(),
//? if >=1.21.2 {
(float)target.getAttributeInstance(EntityAttributes.ARMOR_TOUGHNESS).getValue()
//? } else {
/* (float)target.getAttributeInstance(EntityAttributes.GENERIC_ARMOR_TOUGHNESS).getValue()
*///? }
);
damage = this.applyResistance(target, damage);
damage = applyProtectionEnchantments(target, damage, mc.world.getDamageSources().explosion(null));
@@ -148,7 +152,11 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
(float)damage,
mc.world.getDamageSources().explosion(null),
target.getArmor(),
//? if >=1.21.2 {
(float)target.getAttributeInstance(EntityAttributes.ARMOR_TOUGHNESS).getValue()
//? } else {
/* (float)target.getAttributeInstance(EntityAttributes.GENERIC_ARMOR_TOUGHNESS).getValue()
*///? }
);
damage = this.applyResistance(target, damage);
damage = applyProtectionEnchantments(target, damage, mc.world.getDamageSources().explosion(null));
@@ -175,7 +183,11 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
(float)damage,
mc.world.getDamageSources().explosion(null),
target.getArmor(),
//? if >=1.21.2 {
(float)target.getAttributeInstance(EntityAttributes.ARMOR_TOUGHNESS).getValue()
//? } else {
/* (float)target.getAttributeInstance(EntityAttributes.GENERIC_ARMOR_TOUGHNESS).getValue()
*///? }
);
damage = applyProtectionEnchantments(target, damage, mc.world.getDamageSources().explosion(null));
return damage < 0.0 ? 0.0 : damage;
@@ -210,7 +222,11 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
(float)damage,
mc.world.getDamageSources().explosion(null),
target.getArmor(),
//? if >=1.21.2 {
(float)target.getAttributeInstance(EntityAttributes.ARMOR_TOUGHNESS).getValue()
//? } else {
/* (float)target.getAttributeInstance(EntityAttributes.GENERIC_ARMOR_TOUGHNESS).getValue()
*///? }
);
damage = applyProtectionEnchantments(target, damage, mc.world.getDamageSources().explosion(null));
return damage < 0.0 ? 0.0 : damage;
@@ -225,7 +241,7 @@ public class ExplosionDamageCalculator implements MinecraftAccess {
int protectionFactor = 0;
Object2IntMap enchantments = (Object2IntMap)ENCHANTMENT_BUFFER.get();
for (EquipmentSlot slot : AttributeModifierSlot.ARMOR) {
for (EquipmentSlot slot : new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET}) {
collectEnchantments(target.getEquippedStack(slot), enchantments);
int protection = getEnchantmentLevel(enchantments, Enchantments.PROTECTION);
if (protection > 0) {
@@ -26,6 +26,7 @@ public final class PearlFollowSimulatedPearl extends PersistentProjectileEntity
if (hitResult.getType() != Type.MISS) {
this.onCollision(hitResult);
} else {
//? if >=1.21.2
this.tickBlockCollision();
if (!this.landed) {
Vec3d motion = this.getVelocity();
@@ -72,7 +73,15 @@ public final class PearlFollowSimulatedPearl extends PersistentProjectileEntity
this.setVelocity(scaledMotion);
this.setYaw((float)(MathHelper.atan2(scaledMotion.x, scaledMotion.z) * 180.0F / (float)Math.PI));
this.setPitch((float)(MathHelper.atan2(scaledMotion.y, scaledMotion.horizontalLength()) * 180.0F / (float)Math.PI));
//? if >=1.21.5 {
this.lastYaw = this.getYaw();
//? } else {
/* this.prevYaw = this.getYaw();
*///? }
//? if >=1.21.5 {
this.lastPitch = this.getPitch();
//? } else {
/* this.prevPitch = this.getPitch();
*///? }
}
}
@@ -27,6 +27,7 @@ public final class PearlTrajectorySimulatedPearl extends PersistentProjectileEnt
this.onCollision(hitResult);
}
//? if >=1.21.2
this.tickBlockCollision();
Vec3d motion = this.getVelocity();
double nextX = this.getX() + motion.x;
@@ -68,7 +69,15 @@ public final class PearlTrajectorySimulatedPearl extends PersistentProjectileEnt
this.setVelocity(scaledMotion);
this.setYaw((float)(MathHelper.atan2(scaledMotion.x, scaledMotion.z) * 180.0F / (float)Math.PI));
this.setPitch((float)(MathHelper.atan2(scaledMotion.y, scaledMotion.horizontalLength()) * 180.0F / (float)Math.PI));
//? if >=1.21.5 {
this.lastYaw = this.getYaw();
//? } else {
/* this.prevYaw = this.getYaw();
*///? }
//? if >=1.21.5 {
this.lastPitch = this.getPitch();
//? } else {
/* this.prevPitch = this.getPitch();
*///? }
}
}
@@ -27,6 +27,7 @@ public final class TrajectoriesSimulatedPearl extends PersistentProjectileEntity
this.onCollision(hitResult);
}
//? if >=1.21.2
this.tickBlockCollision();
Vec3d motion = this.getVelocity();
double nextX = this.getX() + motion.x;
@@ -68,7 +69,15 @@ public final class TrajectoriesSimulatedPearl extends PersistentProjectileEntity
this.setVelocity(scaledMotion);
this.setYaw((float)(MathHelper.atan2(scaledMotion.x, scaledMotion.z) * 180.0F / (float)Math.PI));
this.setPitch((float)(MathHelper.atan2(scaledMotion.y, scaledMotion.horizontalLength()) * 180.0F / (float)Math.PI));
//? if >=1.21.5 {
this.lastYaw = this.getYaw();
//? } else {
/* this.prevYaw = this.getYaw();
*///? }
//? if >=1.21.5 {
this.lastPitch = this.getPitch();
//? } else {
/* this.prevPitch = this.getPitch();
*///? }
}
}
@@ -82,28 +82,76 @@ public class VisualRotationManager implements MinecraftAccess {
this.savedPitch = mc.player.getPitch();
this.savedBodyYaw = mc.player.bodyYaw;
this.savedHeadYaw = mc.player.headYaw;
//? if >=1.21.5 {
this.savedLastYaw = mc.player.lastYaw;
//? } else {
/* this.savedLastYaw = mc.player.prevYaw;
*///? }
//? if >=1.21.5 {
this.savedLastPitch = mc.player.lastPitch;
//? } else {
/* this.savedLastPitch = mc.player.prevPitch;
*///? }
//? if >=1.21.5 {
this.savedLastBodyYaw = mc.player.lastBodyYaw;
//? } else {
/* this.savedLastBodyYaw = mc.player.prevBodyYaw;
*///? }
//? if >=1.21.5 {
this.savedLastHeadYaw = mc.player.lastHeadYaw;
//? } else {
/* this.savedLastHeadYaw = mc.player.prevHeadYaw;
*///? }
mc.player.setYaw(this.renderYaw);
mc.player.setPitch(this.renderPitch);
mc.player.bodyYaw = this.renderYaw;
mc.player.headYaw = this.renderYaw;
//? if >=1.21.5 {
mc.player.lastYaw = this.prevRenderYaw;
//? } else {
/* mc.player.prevYaw = this.prevRenderYaw;
*///? }
//? if >=1.21.5 {
mc.player.lastPitch = this.prevRenderPitch;
//? } else {
/* mc.player.prevPitch = this.prevRenderPitch;
*///? }
//? if >=1.21.5 {
mc.player.lastBodyYaw = this.prevRenderYaw;
//? } else {
/* mc.player.prevBodyYaw = this.prevRenderYaw;
*///? }
//? if >=1.21.5 {
mc.player.lastHeadYaw = this.prevRenderYaw;
//? } else {
/* mc.player.prevHeadYaw = this.prevRenderYaw;
*///? }
this.applied = true;
} else if (event.getPhase() == EventPhase.POST && this.applied) {
mc.player.setYaw(this.savedYaw);
mc.player.setPitch(this.savedPitch);
mc.player.bodyYaw = this.savedBodyYaw;
mc.player.headYaw = this.savedHeadYaw;
//? if >=1.21.5 {
mc.player.lastYaw = this.savedLastYaw;
//? } else {
/* mc.player.prevYaw = this.savedLastYaw;
*///? }
//? if >=1.21.5 {
mc.player.lastPitch = this.savedLastPitch;
//? } else {
/* mc.player.prevPitch = this.savedLastPitch;
*///? }
//? if >=1.21.5 {
mc.player.lastBodyYaw = this.savedLastBodyYaw;
//? } else {
/* mc.player.prevBodyYaw = this.savedLastBodyYaw;
*///? }
//? if >=1.21.5 {
mc.player.lastHeadYaw = this.savedLastHeadYaw;
//? } else {
/* mc.player.prevHeadYaw = this.savedLastHeadYaw;
*///? }
this.applied = false;
}
}
@@ -12,7 +12,11 @@ import net.minecraft.resource.ResourcePack;
import net.minecraft.resource.ResourcePackInfo;
import net.minecraft.resource.ResourceType;
import net.minecraft.resource.ResourcePack.ResultConsumer;
//? if >=1.21.4 {
import net.minecraft.resource.metadata.ResourceMetadataSerializer;
//? } else {
/*import net.minecraft.resource.metadata.ResourceMetadataReader;
*///? }
import net.minecraft.util.Identifier;
import org.jetbrains.annotations.Nullable;
@@ -40,7 +44,11 @@ public class ClasspathResourcePack implements ResourcePack {
@Nullable
@Override
//? if >=1.21.4 {
public Object parseMetadata(ResourceMetadataSerializer metadataSerializer) throws IOException {
//? } else {
/* public Object parseMetadata(ResourceMetadataReader metadataSerializer) throws IOException {
*///? }
return null;
}
@@ -22,11 +22,13 @@ public record OutlineCaptureConsumer(MeshBuilder writer) implements VertexConsum
return this;
}
//? if >=1.21.11 {
@Override
public VertexConsumer lineWidth(float width) {
return this;
}
//? }
@Override
public VertexConsumer texture(float u, float v) {
this.writer.putFloats(new float[]{u, v});
@@ -65,6 +65,7 @@ public final class EngineDev implements ClientModInitializer {
switch (cmd) {
case "wait" -> waitTicks = Integer.parseInt(arg);
case "report" -> log(EngineState.details());
case "loadnative" -> System.load(Path.of(arg).toAbsolutePath().toString());
case "injectselftest" -> log(dev.zprestige.prestige.inject.SelfTest.run());
case "listeners" -> {
String text = DevCmd.listeners();
@@ -131,7 +132,11 @@ public final class EngineDev implements ClientModInitializer {
case "server" -> {
var server = mc.getServer();
if (server == null) { log("no integrated server"); return; }
//? if >=1.21.10 {
server.execute(() -> server.getCommandManager().parseAndExecute(server.getCommandSource(), arg));
//? } else {
/* server.execute(() -> server.getCommandManager().executeWithPrefix(server.getCommandSource(), arg));
*///? }
log("server command: " + arg);
}
case "newworld" -> { newWorldName = arg.isEmpty() ? "engine-test" : arg; newWorldStage = 1; }
@@ -144,27 +149,45 @@ public final class EngineDev implements ClientModInitializer {
case "shot" -> {
Path out = Path.of(arg).toAbsolutePath();
Files.createDirectories(out.getParent());
//? if >=1.21.5 {
ScreenshotRecorder.takeScreenshot(mc.getFramebuffer(), img -> {
try { img.writeTo(out); log("shot written " + out); } catch (Exception e) { log("shot failed " + e); } finally { img.close(); }
});
//? } else {
/* try (var img = ScreenshotRecorder.takeScreenshot(mc.getFramebuffer())) { img.writeTo(out); log("shot written " + out); }
*///? }
}
case "exit" -> { log("final: " + EngineState.details()); mc.scheduleStop(); }
default -> log("unknown command: " + line);
}
}
private static void openCreateWorld(MinecraftClient mc) {
//? if >=1.21.9 {
CreateWorldScreen.show(mc, () -> {});
//? } elif >=1.21.2 {
/*CreateWorldScreen.show(mc, mc.currentScreen);
*///? } else {
/*CreateWorldScreen.create(mc, mc.currentScreen);
*///? }
}
/** Creates a world through the vanilla Create World screen (default settings) and waits until the player exists. */
private static void newWorld(MinecraftClient mc) {
Screen s = mc.currentScreen;
switch (newWorldStage) {
case 1 -> { CreateWorldScreen.show(mc, () -> {}); newWorldStage = 2; waitTicks = 0; newWorldDelay = 40; }
case 1 -> { openCreateWorld(mc); newWorldStage = 2; waitTicks = 0; newWorldDelay = 40; }
case 2 -> {
if (newWorldDelay-- > 0) return;
if (s instanceof CreateWorldScreen) {
for (var c : s.children()) {
if (c instanceof ButtonWidget b && b.getMessage().getString().toLowerCase().contains("create new world")) {
try { ((net.minecraft.client.gui.widget.TextFieldWidget) findName(s)).setText(newWorldName); } catch (Throwable t) { log("name field: " + t); }
//? if >=1.21.9 {
b.onPress(null);
//? } else {
/* b.onPress();
*///? }
log("create world pressed: " + newWorldName);
newWorldStage = 3;
newWorldDelay = 20 * 120;
@@ -10,6 +10,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
import java.util.function.Supplier;
import net.fabricmc.loader.api.FabricLoader;
import net.lenni0451.classtransform.TransformerManager;
@@ -85,9 +86,15 @@ public final class EnginePlugin implements IMixinConfigPlugin {
/** Builds the ClassTransform manager for the given runtime namespace ("named" or "intermediary") and transformer class names. */
public static TransformerManager createManager(String namespace, List<String> transformers) throws IOException {
return createManager(namespace, transformers, null);
}
/** Injection can also supply bytes for generated classes that have no class-path resource. */
public static TransformerManager createManager(String namespace, List<String> transformers,
Function<Class<?>, byte[]> liveBytes) throws IOException {
ClassLoader loader = EnginePlugin.class.getClassLoader();
byte[] tiny = namespace.equals("named") ? null : resource("prestige-engine/mappings.tiny");
TransformerManager manager = new TransformerManager(new ResourceClassProvider(loader, new HashSet<>(transformers), tiny), tiny == null ? null : new ByteArrayInputStream(tiny));
TransformerManager manager = new TransformerManager(new ResourceClassProvider(loader, new HashSet<>(transformers), tiny, liveBytes), tiny == null ? null : new ByteArrayInputStream(tiny));
// A transformer whose target method does not exist in this runtime (Lunar's Genesis loader names some methods differently
// from the bundled mappings) is skipped on its own. CANCEL would drop every hook of the whole class and abort the injection.
manager.setFailStrategy(FailStrategy.CONTINUE);
@@ -99,12 +106,14 @@ public final class EnginePlugin implements IMixinConfigPlugin {
private static final class ResourceClassProvider implements IClassProvider {
private final ClassLoader loader;
private final Set<String> transformers;
private final Function<Class<?>, byte[]> liveBytes;
/** Named (Yarn) class name -> intermediary name, from the bundled mapping. Lunar's jar only has the intermediary files. */
private final Map<String, String> namedToIntermediary;
ResourceClassProvider(ClassLoader loader, Set<String> transformers, byte[] tiny) {
ResourceClassProvider(ClassLoader loader, Set<String> transformers, byte[] tiny, Function<Class<?>, byte[]> liveBytes) {
this.loader = loader;
this.transformers = transformers;
this.namedToIntermediary = classNames(tiny);
this.liveBytes = liveBytes;
}
private static Map<String, String> classNames(byte[] tiny) {
@@ -129,6 +138,18 @@ public final class EnginePlugin implements IMixinConfigPlugin {
in = loader.getResourceAsStream(slashed + ".class");
}
}
if (in == null && liveBytes != null) {
// MixinExtras defines LocalRefImpl at runtime without publishing a .class resource.
// Resolve without initialization, then ask the injection byte source for its actual definition.
try {
byte[] bytes = liveBytes.apply(Class.forName(slashed.replace('/', '.'), false, loader));
if (bytes != null && bytes.length != 0) {
return transformers.contains(slashed.replace('/', '.')) ? gate(bytes) : bytes;
}
} catch (ClassNotFoundException | LinkageError | RuntimeException e) {
throw new ClassNotFoundException(name + " (could not read generated class " + slashed + ")", e);
}
}
if (in == null) throw new ClassNotFoundException(name + " (missing resource " + slashed + ".class)");
try (InputStream stream = in) {
byte[] bytes = stream.readAllBytes();
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_4970$class_4971: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_4970$class_4971", remap = false, priority = 2000)
public abstract class I00 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_2248: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_2248", remap = false, priority = 2000)
public abstract class I01 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_309: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_309", remap = false, priority = 2000)
public abstract class I02 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_310: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_310", remap = false, priority = 2000)
public abstract class I03 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_312: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_312", remap = false, priority = 2000)
public abstract class I04 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_279: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_279", remap = false, priority = 2000)
public abstract class I05 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_329: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_329", remap = false, priority = 2000)
public abstract class I06 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_4603: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_4603", remap = false, priority = 2000)
public abstract class I07 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_437: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_437", remap = false, priority = 2000)
public abstract class I08 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_743: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_743", remap = false, priority = 2000)
public abstract class I09 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_742: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_742", remap = false, priority = 2000)
public abstract class I10 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_634: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_634", remap = false, priority = 2000)
public abstract class I11 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_746: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_746", remap = false, priority = 2000)
public abstract class I12 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_636: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_636", remap = false, priority = 2000)
public abstract class I13 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_640: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_640", remap = false, priority = 2000)
public abstract class I14 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_9919: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_9919", remap = false, priority = 2000)
public abstract class I15 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_702: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_702", remap = false, priority = 2000)
public abstract class I16 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_4184: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_4184", remap = false, priority = 2000)
public abstract class I17 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_757: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_757", remap = false, priority = 2000)
public abstract class I18 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_765: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_765", remap = false, priority = 2000)
public abstract class I19 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_9975: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_9975", remap = false, priority = 2000)
public abstract class I20 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_761: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_761", remap = false, priority = 2000)
public abstract class I21 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_852: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_852", remap = false, priority = 2000)
public abstract class I22 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_11683: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_11683", remap = false, priority = 2000)
public abstract class I23 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_8138$class_8141: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_8138$class_8141", remap = false, priority = 2000)
public abstract class I24 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_897: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_897", remap = false, priority = 2000)
public abstract class I25 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_922: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_922", remap = false, priority = 2000)
public abstract class I26 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_758: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_758", remap = false, priority = 2000)
public abstract class I27 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_759: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_759", remap = false, priority = 2000)
public abstract class I28 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_638: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_638", remap = false, priority = 2000)
public abstract class I29 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_1297: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_1297", remap = false, priority = 2000)
public abstract class I30 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_1309: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_1309", remap = false, priority = 2000)
public abstract class I31 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_1657: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_1657", remap = false, priority = 2000)
public abstract class I32 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_1799: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_1799", remap = false, priority = 2000)
public abstract class I33 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_2535: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_2535", remap = false, priority = 2000)
public abstract class I34 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_3294: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_3294", remap = false, priority = 2000)
public abstract class I35 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_3304: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_3304", remap = false, priority = 2000)
public abstract class I36 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_3218: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_3218", remap = false, priority = 2000)
public abstract class I37 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_5223: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_5223", remap = false, priority = 2000)
public abstract class I38 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_1937: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_1937", remap = false, priority = 2000)
public abstract class I39 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_2818: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_2818", remap = false, priority = 2000)
public abstract class I40 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.class_5868: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.class_5868", remap = false, priority = 2000)
public abstract class I41 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.block.AbstractBlock$AbstractBlockState: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.block.AbstractBlock$AbstractBlockState", remap = false, priority = 2000)
public abstract class N00 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.block.Block: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.block.Block", remap = false, priority = 2000)
public abstract class N01 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.Keyboard: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.Keyboard", remap = false, priority = 2000)
public abstract class N02 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.MinecraftClient: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.MinecraftClient", remap = false, priority = 2000)
public abstract class N03 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.Mouse: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.Mouse", remap = false, priority = 2000)
public abstract class N04 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.gl.PostEffectProcessor: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.gl.PostEffectProcessor", remap = false, priority = 2000)
public abstract class N05 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.gui.hud.InGameHud: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.gui.hud.InGameHud", remap = false, priority = 2000)
public abstract class N06 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.gui.hud.InGameOverlayRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.gui.hud.InGameOverlayRenderer", remap = false, priority = 2000)
public abstract class N07 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.gui.screen.Screen: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.gui.screen.Screen", remap = false, priority = 2000)
public abstract class N08 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.input.KeyboardInput: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.input.KeyboardInput", remap = false, priority = 2000)
public abstract class N09 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.network.AbstractClientPlayerEntity: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.network.AbstractClientPlayerEntity", remap = false, priority = 2000)
public abstract class N10 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.network.ClientPlayNetworkHandler: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.network.ClientPlayNetworkHandler", remap = false, priority = 2000)
public abstract class N11 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.network.ClientPlayerEntity: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.network.ClientPlayerEntity", remap = false, priority = 2000)
public abstract class N12 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.network.ClientPlayerInteractionManager: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.network.ClientPlayerInteractionManager", remap = false, priority = 2000)
public abstract class N13 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.network.PlayerListEntry: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.network.PlayerListEntry", remap = false, priority = 2000)
public abstract class N14 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.option.InactivityFpsLimiter: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.option.InactivityFpsLimiter", remap = false, priority = 2000)
public abstract class N15 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.particle.ParticleManager: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.particle.ParticleManager", remap = false, priority = 2000)
public abstract class N16 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.Camera: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.Camera", remap = false, priority = 2000)
public abstract class N17 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.GameRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.GameRenderer", remap = false, priority = 2000)
public abstract class N18 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.LightmapTextureManager: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.LightmapTextureManager", remap = false, priority = 2000)
public abstract class N19 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.SkyRendering: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.SkyRendering", remap = false, priority = 2000)
public abstract class N20 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.WorldRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.WorldRenderer", remap = false, priority = 2000)
public abstract class N21 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.chunk.ChunkOcclusionDataBuilder", remap = false, priority = 2000)
public abstract class N22 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.command.ModelCommandRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.command.ModelCommandRenderer", remap = false, priority = 2000)
public abstract class N23 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.entity.DisplayEntityRenderer$TextDisplayEntityRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.entity.DisplayEntityRenderer$TextDisplayEntityRenderer", remap = false, priority = 2000)
public abstract class N24 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.entity.EntityRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.entity.EntityRenderer", remap = false, priority = 2000)
public abstract class N25 {}
@@ -1,7 +0,0 @@
package dev.zprestige.prestige.engine.mixin;
import org.spongepowered.asm.mixin.Mixin;
/** Engine anchor for net.minecraft.client.render.entity.LivingEntityRenderer: gives Mixin a target so EnginePlugin.preApply runs the ClassTransform hooks on it. */
@Mixin(targets = "net.minecraft.client.render.entity.LivingEntityRenderer", remap = false, priority = 2000)
public abstract class N26 {}
Loaded 100 of 210 files, more files were not shown because too many files have changed in this diff. Show more