Skip to content

Commit

Permalink
Start pre/1.21/1.21.2-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 21, 2024
1 parent b11299c commit eb1772e
Show file tree
Hide file tree
Showing 118 changed files with 253,958 additions and 0 deletions.
39 changes: 39 additions & 0 deletions versions/pre/1.21/1.21.2-rc2/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"official": true,
"merge_patches": true,
"java_target": 21,
"encoding": "UTF-8",
"test_remap_official": false,
"fernflower": {
"version": "org.vineflower:vineflower:1.10.1",
"java_version": 21,
"args": ["--decompile-inner", "--remove-bridge", "--decompile-generics", "--ascii-strings", "--remove-synthetic", "--include-classpath", "--variable-renaming=jad", "--ignore-invalid-bytecode", "--bytecode-source-mapping", "--dump-code-lines", "--indent-string= ", "--log-level=TRACE", "-cfg", "{libraries}", "{input}", "{output}"],
"jvmargs": ["-Xmx4G"]
},
"merge": {
"version": "net.neoforged:mergetool:2.0.3:fatjar",
"args": ["--client", "{client}", "--server", "{server}", "--ann", "{version}", "--output", "{output}", "--inject", "false"],
"jvmargs": []
},
"rename": {
"version": "net.neoforged:AutoRenamingTool:2.0.4:all",
"args": ["--input", "{input}", "--output", "{output}", "--map", "{mappings}", "--cfg", "{libraries}", "--ann-fix", "--ids-fix", "--src-fix", "--record-fix", "--unfinal-params"]
},
"bundler_extract_jar": {
"version": "net.neoforged.installertools:installertools:2.1.2:fatjar",
"args": ["--task", "bundler_extract", "--input", "{input}", "--output", "{output}", "--jar-only"]
},
"bundler_extract_libs": {
"version": "net.neoforged.installertools:installertools:2.1.2:fatjar",
"args": ["--task", "bundler_extract", "--input", "{input}", "--output", "{output}", "--libraries"]
},
"mergemap": {
"version": "net.neoforged.installertools:installertools:2.1.2:fatjar",
"args": ["--task", "MERGE_MAPPING", "--left", "{mappings}", "--right", "{official}", "--right-names", "right,left", "--classes", "--fields", "--methods", "--output", "{output}"]
},
"libraries": {
"client": ["com.google.code.findbugs:jsr305:3.0.2", "ca.weblite:java-objc-bridge:1.1", "org.jetbrains:annotations:26.0.1"],
"server": ["com.google.code.findbugs:jsr305:3.0.2", "org.jetbrains:annotations:26.0.1"],
"joined": ["com.google.code.findbugs:jsr305:3.0.2", "ca.weblite:java-objc-bridge:1.1", "net.neoforged:mergetool:2.0.3:api", "org.jetbrains:annotations:26.0.1"]
}
}
44 changes: 44 additions & 0 deletions versions/pre/1.21/1.21.2-rc2/inject/mcp/client/Start.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package mcp.client;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;

import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import net.minecraft.client.main.Main;

public class Start
{
public static void main(String[] args)
{
/*
* start minecraft game application
* --version is just used as 'launched version' in snoop data and is required
* Working directory is used as gameDir if not provided
*/
String assets = null;
String assetIndex = "17";
try (InputStream assetsInput = Start.class.getClassLoader().getResourceAsStream("assets.json")) {
if (assetsInput != null) {
JsonElement element = JsonParser.parseReader(new InputStreamReader(assetsInput));
assets = element.getAsJsonObject().get("assets").getAsString();
assetIndex = element.getAsJsonObject().get("asset_index").getAsString();
}
} catch (IOException e) {
e.printStackTrace();
}
if (assets == null) {
assets = System.getenv().containsKey("assetDirectory") ? System.getenv("assetDirectory") : "assets";
}
Main.main(concat(new String[] { "--version", "mcp", "--accessToken", "0", "--assetsDir", assets, "--assetIndex", assetIndex, "--userProperties", "{}" }, args));
}

public static <T> T[] concat(T[] first, T[] second)
{
T[] result = Arrays.copyOf(first, first.length + second.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}
Loading

0 comments on commit eb1772e

Please sign in to comment.