Skip to content

Commit

Permalink
Start snapshot/april/24w14potato
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 2, 2024
1 parent 2c65ec0 commit fb2cdf5
Show file tree
Hide file tree
Showing 311 changed files with 244,731 additions and 42 deletions.
13 changes: 4 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

import net.minecraftforge.mcpconfig.tasks.*
import net.minecraftforge.srgutils.MinecraftVersion
import net.neoforged.srgutils.MinecraftVersion
import java.nio.file.Files
import java.util.function.BiFunction
import java.util.stream.Collectors
Expand All @@ -20,7 +20,7 @@ ext {
PATH_BUILD = file('build').absolutePath

ASM_VERSION = '9.2'
SRGUTILS_VERSION = '0.5.4'
SRGUTILS_VERSION = '1.0.1'
}

logger.lifecycle('Timestamp: ' + TIMESTAMP)
Expand Down Expand Up @@ -149,7 +149,7 @@ subprojects {
}

dependencies {
srgutilsJar "net.minecraftforge:srgutils:${SRGUTILS_VERSION}"
srgutilsJar "net.neoforged:srgutils:${SRGUTILS_VERSION}"
if (FERNFLOWER.version) {
fernflower FERNFLOWER.version
}
Expand Down Expand Up @@ -349,12 +349,6 @@ subprojects {
cache = downloadLibraries.dest
dest = file(PATH_NATIVES)
}

task verify(type: VerifyMappings, dependsOn: [mergeJars, makeObfToIntermediate]) {
mappings = makeObfToIntermediate.dest
joined = mergeJars.dest
o2s2idMappings = file('joined.tsrg')
}

task decompileAll
task projectAll
Expand Down Expand Up @@ -512,6 +506,7 @@ subprojects {
[name: 'hotspot19', Name: 'HotSpot19', version: 19, official: false],
[name: 'hotspot20', Name: 'HotSpot20', version: 20, official: false],
[name: 'hotspot21', Name: 'HotSpot21', version: 21, official: false],
[name: 'hotspot22', Name: 'HotSpot22', version: 22, official: false],
[name: 'official8', Name: 'Official8', version: 8, official: true ],
[name: 'official16', Name: 'Official16', version: 16, official: true ],
[name: 'official17', Name: 'Official17', version: 17, official: true ],
Expand Down
3 changes: 1 addition & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ dependencies {
implementation 'com.google.guava:guava:25.1-jre'
implementation 'org.ow2.asm:asm:9.2'
implementation 'org.ow2.asm:asm-tree:9.2'
implementation 'net.minecraftforge:srgutils:0.5.4'
implementation 'net.neoforged:srgutils:1.0.1'
implementation 'org.tukaani:xz:1.8' // Extract API, to extract the runtime jars, as Mojang uses lzma
implementation 'de.undercouch:gradle-download-task:5.5.0' // Bulk DownloadLibraries task
implementation 'net.minecraftforge:mapping-verifier:2.0.8'
implementation 'net.sf.jopt-simple:jopt-simple:5.0.4' // Needed for verifier
implementation 'codechicken:DiffPatch:1.5.0.29'
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.gradle.api.file.*
import org.gradle.api.provider.*
import org.gradle.api.tasks.*
import groovy.json.JsonSlurper
import net.minecraftforge.srgutils.IMappingFile
import net.neoforged.srgutils.IMappingFile

public abstract class CreateProjectTemplate extends DefaultTask {
@Input abstract Property<String> getDistro()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract class DownloadAssets extends DefaultTask {

DownloadAssets() {
indexAction = new DownloadAction(project, this)
indexAction.overwrite(false)
indexAction.onlyIfModified(true)
indexAction.useETag('all')
assetAction = new DownloadAction(project, this)
assetAction.overwrite(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.gradle.api.file.*
import org.gradle.api.tasks.*
import groovy.io.FileType
import groovy.json.JsonSlurper
import net.minecraftforge.srgutils.IMappingFile
import net.neoforged.srgutils.IMappingFile

import static org.objectweb.asm.Opcodes.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.gradle.api.file.*
import org.gradle.api.tasks.*
import groovy.io.FileType
import groovy.json.JsonSlurper
import net.minecraftforge.srgutils.IMappingFile
import net.neoforged.srgutils.IMappingFile
import java.util.zip.ZipFile

import static org.objectweb.asm.Opcodes.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public abstract class MakePatches extends DefaultTask {
.bPath(modified.toPath())
.outputPath(patches.toPath())
.level(codechicken.diffpatch.util.LogLevel.WARN)
.lineEnding("\n")
.build().operate()

def exit = result.exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.api.tasks.*

import java.util.zip.*

import net.minecraftforge.srgutils.*
import net.neoforged.srgutils.*

public abstract class RenameMappings extends SingleFileOutput {
@InputFile abstract RegularFileProperty getIntermediate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.api.tasks.*

import java.nio.file.Files

import net.minecraftforge.srgutils.*
import net.neoforged.srgutils.*

public abstract class RenameSources extends DefaultTask {
@InputDirectory abstract RegularFileProperty getInput()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.gradle.api.tasks.*

import java.util.zip.*

import net.minecraftforge.srgutils.IMappingFile
import net.neoforged.srgutils.IMappingFile

public abstract class SplitJar extends DefaultTask {
@InputFile abstract RegularFileProperty getMappings()
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
10 changes: 5 additions & 5 deletions update.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
}

dependencies {
jarDeps "net.minecraftforge:srgutils:${SRGUTILS_VERSION}"
jarDeps "net.neoforged:srgutils:${SRGUTILS_VERSION}"
jarDeps "org.ow2.asm:asm:${ASM_VERSION}"
jarDeps "org.ow2.asm:asm-commons:${ASM_VERSION}"
jarDeps "org.ow2.asm:asm-tree:${ASM_VERSION}"
Expand All @@ -36,16 +36,16 @@ ext {
}

task downloadMappingToy(type: Download) {
ext.VER = '1.0.22'
src "https://maven.neoforged.net/releases/net/minecraftforge/lex/MappingToy/${VER}/MappingToy-${VER}-all.jar"
dest rootProject.file("build/libraries/net/minecraftforge/lex/MappingToy/${VER}/MappingToy-${VER}-all.jar")
ext.VER = '2.0.0'
src "https://maven.neoforged.net/releases/net/neoforged/MappingToy/${VER}/MappingToy-${VER}-all.jar"
dest rootProject.file("build/libraries/net/neoforged/MappingToy/${VER}/MappingToy-${VER}-all.jar")
overwrite false
}

task runMappingToy(type: JavaExec, dependsOn: downloadMappingToy) {
classpath.from configurations.jarDeps
classpath.from files(downloadMappingToy.dest)
mainClass = 'net.minecraftforge.lex.mappingtoy.MappingToy'
mainClass = 'net.neoforged.mappingtoy.MappingToy'
args = ['--libs', '--output', MAP_DATA, '--version', OLD_VERSION, '--version', NEW_VERSION]
def toolchainService = project.extensions.getByType(JavaToolchainService)
javaLauncher = toolchainService.launcherFor {
Expand Down
39 changes: 39 additions & 0 deletions versions/snapshot/april/24w14potato/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"official": true,
"merge_patches": true,
"java_target": 17,
"encoding": "UTF-8",
"test_remap_official": false,
"fernflower": {
"version": "org.vineflower:vineflower:1.9.3",
"java_version": 17,
"args": ["-din=1", "-rbr=1", "-dgs=1", "-asc=1", "-rsy=1", "-iec=1", "-jvn=1", "-iib=1", "-bsm=1", "-dcl=1", "-nls=1", "-ind= ", "-log=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:1.0.14:all",
"args": ["--input", "{input}", "--output", "{output}", "--map", "{mappings}", "--cfg", "{libraries}", "--ann-fix", "--ids-fix", "--src-fix", "--record-fix"]
},
"bundler_extract_jar": {
"version": "net.minecraftforge:installertools:1.3.2:fatjar",
"args": ["--task", "bundler_extract", "--input", "{input}", "--output", "{output}", "--jar-only"]
},
"bundler_extract_libs": {
"version": "net.minecraftforge:installertools:1.3.2:fatjar",
"args": ["--task", "bundler_extract", "--input", "{input}", "--output", "{output}", "--libraries"]
},
"mergemap": {
"version": "net.minecraftforge:installertools:1.3.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:24.1.0"],
"server": ["com.google.code.findbugs:jsr305:3.0.2", "org.jetbrains:annotations:24.1.0"],
"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:24.1.0"]
}
}
26 changes: 26 additions & 0 deletions versions/snapshot/april/24w14potato/inject/mcp/client/Start.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package mcp.client;

import java.util.Arrays;

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 = System.getenv().containsKey("assetDirectory") ? System.getenv("assetDirectory") : "assets";
Main.main(concat(new String[]{"--version", "mcp", "--accessToken", "0", "--assetsDir", assets, "--assetIndex", "15", "--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 fb2cdf5

Please sign in to comment.