diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2f7896d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/.gradle/7.4.2/checksums/checksums.lock b/.gradle/7.4.2/checksums/checksums.lock new file mode 100644 index 0000000..dbea282 Binary files /dev/null and b/.gradle/7.4.2/checksums/checksums.lock differ diff --git a/.gradle/7.4.2/checksums/md5-checksums.bin b/.gradle/7.4.2/checksums/md5-checksums.bin new file mode 100644 index 0000000..5ce834c Binary files /dev/null and b/.gradle/7.4.2/checksums/md5-checksums.bin differ diff --git a/.gradle/7.4.2/checksums/sha1-checksums.bin b/.gradle/7.4.2/checksums/sha1-checksums.bin new file mode 100644 index 0000000..842565a Binary files /dev/null and b/.gradle/7.4.2/checksums/sha1-checksums.bin differ diff --git a/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock b/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 0000000..b479a51 Binary files /dev/null and b/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock differ diff --git a/.gradle/7.4.2/dependencies-accessors/gc.properties b/.gradle/7.4.2/dependencies-accessors/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/7.4.2/executionHistory/executionHistory.bin b/.gradle/7.4.2/executionHistory/executionHistory.bin new file mode 100644 index 0000000..31be132 Binary files /dev/null and b/.gradle/7.4.2/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.4.2/executionHistory/executionHistory.lock b/.gradle/7.4.2/executionHistory/executionHistory.lock new file mode 100644 index 0000000..6108f71 Binary files /dev/null and b/.gradle/7.4.2/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.4.2/fileChanges/last-build.bin b/.gradle/7.4.2/fileChanges/last-build.bin new file mode 100644 index 0000000..f76dd23 Binary files /dev/null and b/.gradle/7.4.2/fileChanges/last-build.bin differ diff --git a/.gradle/7.4.2/fileHashes/fileHashes.bin b/.gradle/7.4.2/fileHashes/fileHashes.bin new file mode 100644 index 0000000..e7989ac Binary files /dev/null and b/.gradle/7.4.2/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.4.2/fileHashes/fileHashes.lock b/.gradle/7.4.2/fileHashes/fileHashes.lock new file mode 100644 index 0000000..ff07d21 Binary files /dev/null and b/.gradle/7.4.2/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.4.2/fileHashes/resourceHashesCache.bin b/.gradle/7.4.2/fileHashes/resourceHashesCache.bin new file mode 100644 index 0000000..c5c7ae6 Binary files /dev/null and b/.gradle/7.4.2/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/7.4.2/gc.properties b/.gradle/7.4.2/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 0000000..414b540 Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 0000000..1067050 --- /dev/null +++ b/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Thu Sep 21 16:48:14 EEST 2023 +gradle.version=7.4.2 diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin new file mode 100644 index 0000000..50ab29d Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe new file mode 100644 index 0000000..bc65e93 Binary files /dev/null and b/.gradle/file-system.probe differ diff --git a/.gradle/gradle.log b/.gradle/gradle.log new file mode 100644 index 0000000..e69de29 diff --git a/.gradle/vcs-1/gc.properties b/.gradle/vcs-1/gc.properties new file mode 100644 index 0000000..e69de29 diff --git a/.project b/.project new file mode 100644 index 0000000..24df0c7 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + CinderModlistCore + Project CinderModlistCore created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..702ab3d --- /dev/null +++ b/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home=/usr/share/java/gradle +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/Build.sh b/Build.sh new file mode 100755 index 0000000..14c1feb --- /dev/null +++ b/Build.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Clean the build environment +./gradlew clean + +# Ensure the required directory exists and create the mixins.srg file + mkdir -p build/tmp/reobf/ + touch build/tmp/reobf/mixins.srg + +# Build and create the jar file +./gradlew build jar +#./gradlew shadowJar diff --git a/README.md b/README.md index fbe9d11..c9c3374 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,37 @@ -# CinderModListCore +# anatawa12's ForgeGradle 1.2 fork for Gradle 4.4.1+ - example project -Mod list component for Cinder Core. Necessary for it to work. Only exists as separate plugin due to me not finding a ForgeGradle setup that can handle both mixins and access transformers at once. \ No newline at end of file +This is an example mod using the [fork of ForgeGradle-1.2 made by anatawa12](https://github.com/anatawa12/ForgeGradle-1.2). +This fork supports Gradle 4.4.1 and later. This example project uses Gradle 5.6.4. + +## How to use this example project + +You can download this example project from [here](https://github.com/anatawa12/ForgeGradle-example/archive/master.zip), or use it as a template on Github. +This project can be used as a replacement for Forge's 1.7.10 MDK. + +## How to replace ForgeGradle 1.2. with anatawa12's fork +Although this example project has some differences to Forge's 1.7.10 MDK, anatawa12's fork of ForgeGradle 1.2 can be used by most projects with only minimal changes to their Gradle build script. + +Here is a list of changes to Forge's 1.7.10 MDK Gradle build script, to replace the official ForgeGradle 1.2 plugin with the fork. These changes are likely to work with most projects based on Forge's 1.7.10 MDK. + +In the repositories block of the buildscript section, add jcenter, and switch the Forge maven to use HTTPS instead of HTTP: +```diff + repositories { + mavenCentral() + maven { + name = "forge" +- url = "http://files.minecraftforge.net/maven" ++ url = "https://maven.minecraftforge.net/" + } +``` + +Also in the dependencies block of the buildscript section, change the dependency on Forge's official ForgeGradle 1.2 to the fork: +```diff + dependencies { +- classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' ++ classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') { ++ changing = true ++ } + } +``` + +The Gradle wrapper should also be changed to use Gradle 4.4.1 or higher. diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..cc2439e --- /dev/null +++ b/build.gradle @@ -0,0 +1,164 @@ +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = "https://maven.minecraftforge.net/" + } + } + dependencies { + classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.1.+') { + changing = true + } + } +} + +plugins { + id 'java-library' + id 'maven-publish' +// id 'com.github.johnrengelman.shadow' version '6.1.0' // Use the latest version +} + +apply plugin: 'forge' + +// These settings allow you to choose what version of Java you want to be compatible with. Forge 1.7.10 runs on Java 6 to 8. +sourceCompatibility = 1.8 +targetCompatibility = 1.8 + +version = project.version +group = project.group +def yourMixinConfig = 'mixins.cindercore_modlist.json' +def refMapForYourConfig = 'mixins.cindercore_modlist.refmap.json' +def relativePathToMixinAP = 'libs/mixin-0.8-SNAPSHOT.jar' +def refMap = 'src/main/resources/' + refMapForYourConfig +def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" + +repositories { + flatDir { + dirs 'libs' + } + maven { + name = 'sponge' + url = 'https://repo.spongepowered.org/repository/maven-public' + } +} + +dependencies { +// implementation 'com.google.code.gson:gson:2.8.6' + implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT') { + // Mixin includes a lot of dependencies that are too up-to-date + exclude module: 'launchwrapper' + exclude module: 'guava' + exclude module: 'gson' + exclude module: 'commons-io' + exclude module: 'log4j-core' + } +// implementation name: 'mixin-0.8-SNAPSHOT', ext: 'jar' +// implementation name: 'SpongeMixins-1.5.0', ext: 'jar' + implementation name: 'cindercore', ext: 'jar' +} + +minecraft { + version = project.minecraft_version + "-" + project.forge_version + runDir = "run" +} + + +processResources { + // This will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // Replace values in only mcmod.info. + filesMatching('mcmod.info') { + // Replace version and mcversion. + expand 'version':project.version, 'mcversion':project.minecraft.version + } +} + +// Ensures that the encoding of source files is set to UTF-8, see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +// This task creates a .jar file containing the source code of this mod. +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = "sources" + from sourceSets.main.allSource +} + +// This task creates a .jar file containing a deobfuscated version of this mod, for other developers to use in a development environment. +task devJar(type: Jar) { + classifier = "dev" + from sourceSets.main.output +} + +// Creates the listed artifacts on building the mod. +artifacts { + archives sourcesJar + archives devJar +} + +// This block configures any maven publications you want to make. +publishing { + publications { + mavenJava(MavenPublication) { + // Add any other artifacts here that you would like to publish! + artifact(jar) { + builtBy build + } + artifact(sourcesJar) { + builtBy sourcesJar + } + artifact(devJar) { + builtBy devJar + } + } + } + + // This block selects the repositories you want to publish to. +} + +jar { + duplicatesStrategy = DuplicatesStrategy.INCLUDE + + from sourceSets.main.output.resourcesDir + from refMap + manifest { + attributes([ + "Manifest-Version": "1.0", + "TweakClass": "org.spongepowered.asm.launch.MixinTweaker", + 'MixinConfigs': yourMixinConfig, + "FMLCorePlugin": "com.zivilon.cindercore_modlist.coremod.ModListCore", + 'FMLCorePluginContainsFMLMod': 'true', + "ForceLoadAsMod": true + ]) + } +} +reobf { + addExtraSrgFile mixinSrg +} +afterEvaluate { + def fixedRelPathToAP = relativePathToMixinAP + if(fixedRelPathToAP.startsWith('./') || fixedRelPathToAP.startsWith('.\\')){ + fixedRelPathToAP = fixedRelPathToAP.substring(2) + } else if(fixedRelPathToAP.startsWith('/') || fixedRelPathToAP.startsWith('\\')){ + fixedRelPathToAP = fixedRelPathToAP.substring(1) + } + + tasks.withType(JavaCompile) { + options.annotationProcessorPath = files(projectDir.absolutePath + '/' + fixedRelPathToAP) + println "Refmap path: ${refMap}" + options.compilerArgs += [ + "-ArefMapFile=${refMap}", + "-AoutRefMapFile=${refMap}", + "-AdefaultObfuscationEnv=searge" + ] + } +} +sourceSets { + main { + output.resourcesDir = output.classesDirs.asPath + ext.refMap = refMapForYourConfig + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..3a6accb --- /dev/null +++ b/gradle.properties @@ -0,0 +1,8 @@ +# Mod properties +version=1.0 +# http://maven.apache.org/guides/mini/guide-naming-conventions.html +group=com.zivilon.cindercore_modlist + +# Forge properties +minecraft_version=1.7.10 +forge_version=10.13.4.1614-1.7.10 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..aa991fc --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..4f906e0 --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# 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"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..ac1b06f --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "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. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +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. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/libs/SpongeMixins-dev.jar b/libs/SpongeMixins-dev.jar new file mode 100644 index 0000000..e0236dc Binary files /dev/null and b/libs/SpongeMixins-dev.jar differ diff --git a/libs/cindercore.jar b/libs/cindercore.jar new file mode 100644 index 0000000..af19c89 Binary files /dev/null and b/libs/cindercore.jar differ diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..e381796 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'cindercore_modlist' diff --git a/src/main/java/com/zivilon/cindercore_modlist/CinderCoreModlist.java b/src/main/java/com/zivilon/cindercore_modlist/CinderCoreModlist.java new file mode 100644 index 0000000..ab4b4e9 --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/CinderCoreModlist.java @@ -0,0 +1,292 @@ +package com.zivilon.cindercore_modlist; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLInitializationEvent; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent.ServerConnectionFromClientEvent; +import java.util.Collections; +import java.util.HashMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.UUID; + +import io.netty.channel.ChannelDuplexHandler; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelHandler; +import io.netty.channel.Channel; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.ChannelPromise; + +import net.minecraft.command.CommandHandler; +import net.minecraft.command.ICommand; +import net.minecraft.command.ICommandSender; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; +import net.minecraft.util.ChatComponentText; + +import io.netty.channel.Channel; + +@Mod(modid = CinderCoreModlist.MODID, version = CinderCoreModlist.VERSION, dependencies = "required-after:spongemixins@[1.1.0,)", acceptableRemoteVersions = "*", useMetadata = true) +public class CinderCoreModlist +{ + public static final String MODID = "cindercore_modlist"; + public static final String VERSION = "1.0"; +// public static final Map channel_map = new HashMap<>(); + public static final Map> player_mods = new HashMap<>(); + public static final Map item_fallback_map = new HashMap<>(); + public static final Map entity_fallback_map = new HashMap<>(); + public static final Map custom_fallback_map = new HashMap<>(); + public static final Map> player_item_fallback_map = new HashMap<>(); + public static final Map> player_entity_fallback_map = new HashMap<>(); + public static final Map>> player_custom_fallback_map = new HashMap<>(); + public static final boolean debug = false; + + @EventHandler + public void init(FMLInitializationEvent event) + { + System.out.println("Cinder Core Modlist initialized"); + } + + // Used to save mod list into player_mods. Invoked in handshake process. USE WITH EXTREME CAUTION. + public static void savePlayerModList(UUID player_id, Map modList) { + player_mods.put(player_id, modList); + } + +/* public static Channel get_FML_channel(UUID uuid) { + return channel_map.get(uuid); + }*/ + + // Get map of all mods player has installed. Includes versions. + public static Map getPlayerMods(String playerName) { + return player_mods.get(playerName); + } + + // Returns true if player has mod installed. False if not. + public static boolean hasPlayerMod(String playerName, String modId) { + Map mods = player_mods.get(playerName); + return mods != null && mods.containsKey(modId); + } + + // Get base fallback maps. Used for generating player's fallback maps. + public static Map getItemFallbackMap() { + return item_fallback_map; + } + public static Map getEntityFallbackMap() { + return entity_fallback_map; + } + public static Map getCustomFallbackMap() { + return custom_fallback_map; + } + + // Register fallbacks. Recommended to use the wrappers from CinderCore instead. + public static void register_item_fallback(Integer original_id, FallbackEntry fallback) { + item_fallback_map.put(original_id, fallback); + if (debug) { + if (item_fallback_map == null) { + System.out.println("[CinderCoreModList] Item fallback map is null"); + } else if (item_fallback_map.isEmpty()) { + System.out.println("[CinderCoreModList] Item fallback map is empty"); + } else { + System.out.println("[CinderCoreModList] Contents of item fallback map:"); + printMapContents(item_fallback_map); + } + } + } + public static void register_entity_fallback(Integer entity_id, FallbackEntry fallback) { + entity_fallback_map.put(entity_id, fallback); + if (debug) { + if (entity_fallback_map == null) { + System.out.println("[CinderCoreModList] Entity fallback map is null"); + } else if (entity_fallback_map.isEmpty()) { + System.out.println("[CinderCoreModList] Entity fallback map is empty"); + } else { + System.out.println("[CinderCoreModList] Contents of entity fallback map:"); + printMapContents(entity_fallback_map); + } + } + } + + public static void register_custom_fallback(String type, CustomFallbackEntry fallback) { + custom_fallback_map.put(type, fallback); + if (debug) { + if (custom_fallback_map == null) { + System.out.println("[CinderCoreModList] Custom fallback map is null"); + } else if (entity_fallback_map.isEmpty()) { + System.out.println("[CinderCoreModList] Custom fallback map is empty"); + } else { + System.out.println("[CinderCoreModList] Contents of custom fallback map:"); + printMapContentsCustom(custom_fallback_map); + } + } + } + + + // Get map of specific player's fallbacks + public static Map getPlayerItemFallbacks(UUID player_id) { + return player_item_fallback_map.get(player_id); + } + public static Map getPlayerEntityFallbacks(UUID player_id) { + return player_entity_fallback_map.get(player_id); + } + public static Map> getPlayerCustomFallbacks(UUID player_id) { + if (debug) { + System.out.println("[CinderCoreModlist] Getting custom fallbacks for user " + player_id); + System.out.println("[CinderCoreModlist] Full list of player fallbacks:"); + printAllPlayerMapContentsCustom(player_custom_fallback_map); + } + return player_custom_fallback_map.get(player_id); + } + + // Generate specific player's fallbacks. Invoked during handshake process. + public static void generatePlayerItemFallbackMap(UUID player_id) { + System.out.println("[CinderCoreModList] Generating fallback map for " + player_id); + Map player_modlist = player_mods.get(player_id); + Map fallbacks = new HashMap<>(); + + if (debug) { + if (item_fallback_map == null) { + System.out.println("[CinderCoreModList] Item fallback map is null"); + } else { + System.out.println("[CinderCoreModList] Contents of general fallback map during player map generation:"); + printMapContents(item_fallback_map); + } + } + + for (Map.Entry entry : item_fallback_map.entrySet()) { + FallbackEntry fallbackEntry = entry.getValue(); + String player_version = player_modlist.get(fallbackEntry.mod_name); + + if (player_version == null || compare_versions(player_version, fallbackEntry.version) < 0) { + if (debug) System.out.println("[CinderCoreModList] Player missing mod: " + fallbackEntry.mod_name + " version " + fallbackEntry.version); + fallbacks.put(entry.getKey(), fallbackEntry.fallback_id); + } + } + if (debug) { + System.out.println("[CinderCoreModList] Adding to fallback map:"); + printMapContentsInt(fallbacks); + } + player_item_fallback_map.put(player_id, fallbacks); + } + + public static void generatePlayerEntityFallbackMap(UUID player_id) { + Map player_modlist = player_mods.get(player_id); + Map fallbacks = new HashMap<>(); + + for (Map.Entry entry : entity_fallback_map.entrySet()) { + FallbackEntry fallbackEntry = entry.getValue(); + String player_version = player_modlist.get(fallbackEntry.mod_name); + + if (player_version == null || compare_versions(player_version, fallbackEntry.version) < 0) { + fallbacks.put(entry.getKey(), fallbackEntry.fallback_id); + } + } + + player_entity_fallback_map.put(player_id, fallbacks); + } + + public static void generatePlayerCustomFallbackMap(UUID player_id) { + Map player_modlist = player_mods.get(player_id); + Map> fallbacks = new HashMap<>(); // Nested structure + + for (Map.Entry entry : custom_fallback_map.entrySet()) { + CustomFallbackEntry fallbackEntry = entry.getValue(); + String player_version = player_modlist.get(fallbackEntry.mod_name); + + if (player_version == null || compare_versions(player_version, fallbackEntry.version) < 0) { + Map type_fallbacks = fallbacks.get(fallbackEntry.type); + if (type_fallbacks == null) { + type_fallbacks = new HashMap<>(); + fallbacks.put(fallbackEntry.type, type_fallbacks); + } + type_fallbacks.put(fallbackEntry.original_id, fallbackEntry.fallback_id); + } + } + player_custom_fallback_map.put(player_id, fallbacks); + } + + + // Used for comparing versions of mods. Version must be numbers separated by . and nothing else. + public static int compare_versions(String version1, String version2) { + String[] parts1 = version1.split("\\."); + String[] parts2 = version2.split("\\."); + + for (int i = 0; i < Math.max(parts1.length, parts2.length); i++) { + int part1 = i < parts1.length ? Integer.parseInt(parts1[i]) : 0; + int part2 = i < parts2.length ? Integer.parseInt(parts2[i]) : 0; + if (part1 != part2) { + return part1 < part2 ? -1 : 1; + } + } + return 0; + } + + // Debug method + public static void printMapContents(Map map) { + if (map.isEmpty()) { + System.out.println("[CinderCoreModList] Map is empty."); + } else { + for (Map.Entry entry : map.entrySet()) { + System.out.println("[CinderCoreModList] Key: " + entry.getKey() + ", Value: " + entry.getValue().fallback_id); + } + } + } + public static void printMapContentsCustom(Map map) { +/* if (map.isEmpty()) { + System.out.println("[CinderCoreModList] Map is empty."); + } else { + for (Map.Entry entry : map.entrySet()) { + System.out.println("[CinderCoreModList] Key: " + entry.getKey() + ", Value: " + entry.getValue().fallback_id); + } + }*/ + } + + // Debug method + public static void printMapContentsInt(Map map) { + if (map.isEmpty()) { + System.out.println("[CinderCoreModList] Map is empty."); + } else { + for (Map.Entry entry : map.entrySet()) { + System.out.println("[CinderCoreModList] Key: " + entry.getKey() + ", Value: " + entry.getValue()); + } + } + } + + // Debug method + public static void printAllPlayerMapContents(Map> map) { + if (map.isEmpty()) { + System.out.println("[CinderCoreModList] There are no player fallback maps."); + } else { + for (Map.Entry> entry : map.entrySet()) { + System.out.println("[CinderCoreModList] Reading player fallback map: " + entry.getKey()); + printMapContentsInt(entry.getValue()); + } + } + } + public static void printAllPlayerMapContentsCustom(Map>> map) { + if (map.isEmpty()) { + System.out.println("[CinderCoreModList] There are no player fallback maps."); + } else { + for (Map.Entry>> playerEntry : map.entrySet()) { + UUID playerUUID = playerEntry.getKey(); + Map> typeMap = playerEntry.getValue(); + + System.out.println("[CinderCoreModList] Reading player fallback map for UUID: " + playerUUID); + + for (Map.Entry> typeEntry : typeMap.entrySet()) { + String dataType = typeEntry.getKey(); + Map fallbackMap = typeEntry.getValue(); + + System.out.println("[CinderCoreModList] Fallbacks for type: " + dataType); + printMapContentsInt(fallbackMap); + } + } + } + } + +} diff --git a/src/main/java/com/zivilon/cindercore_modlist/CustomFallbackEntry.java b/src/main/java/com/zivilon/cindercore_modlist/CustomFallbackEntry.java new file mode 100644 index 0000000..395c53d --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/CustomFallbackEntry.java @@ -0,0 +1,17 @@ +package com.zivilon.cindercore_modlist; + +public class CustomFallbackEntry { + public final int original_id; + public final int fallback_id; + public final String mod_name; + public final String version; + public final String type; + + public CustomFallbackEntry(int default_id, int fall_id, String custom_type, String mod, String mod_version) { + original_id = default_id; + fallback_id = fall_id; + mod_name = mod; + version = mod_version; + type = custom_type; + } +} diff --git a/src/main/java/com/zivilon/cindercore_modlist/FallbackEntry.java b/src/main/java/com/zivilon/cindercore_modlist/FallbackEntry.java new file mode 100644 index 0000000..f27c194 --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/FallbackEntry.java @@ -0,0 +1,15 @@ +package com.zivilon.cindercore_modlist; + +public class FallbackEntry { + public final int original_id; + public final int fallback_id; + public final String mod_name; + public final String version; + + public FallbackEntry(int default_id, int fall_id, String mod, String mod_version) { + original_id = default_id; + fallback_id = fall_id; + mod_name = mod; + version = mod_version; + } +} diff --git a/src/main/java/com/zivilon/cindercore_modlist/coremod/ModListCore.java b/src/main/java/com/zivilon/cindercore_modlist/coremod/ModListCore.java new file mode 100644 index 0000000..10b3190 --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/coremod/ModListCore.java @@ -0,0 +1,43 @@ +package com.zivilon.cindercore_modlist.coremod; + +import cpw.mods.fml.relauncher.IFMLLoadingPlugin; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.MCVersion; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.SortingIndex; +import cpw.mods.fml.relauncher.IFMLLoadingPlugin.TransformerExclusions; +import org.spongepowered.asm.launch.MixinBootstrap; +import org.spongepowered.asm.mixin.Mixins; +import java.util.Map; + +@TransformerExclusions({"com.zivilon.cindercore_modlist.coremod"}) +@SortingIndex(1001) +@MCVersion("1.7.10") +public class ModListCore implements IFMLLoadingPlugin { + @Override + public String[] getASMTransformerClass() { + return new String[] {}; + } + + @Override + public String getModContainerClass() { + // Return the class name of your @Mod class + return null; + } + + @Override + public String getSetupClass() { + // Return the class name that sets up coremod environment, or null if none + return null; + } + + @Override + public void injectData(Map data) { + MixinBootstrap.init(); + Mixins.addConfiguration("mixins.cindercore_modlist.json"); + } + + @Override + public String getAccessTransformerClass() { + // Return the class name of your access transformer or null if none + return null; + } +} diff --git a/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateHELLO.java b/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateHELLO.java new file mode 100644 index 0000000..3da17c4 --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateHELLO.java @@ -0,0 +1,50 @@ +package com.zivilon.cindercore_modlist.mixins; + +import java.lang.reflect.Field; +import io.netty.channel.ChannelHandlerContext; +import cpw.mods.fml.common.network.handshake.FMLHandshakeMessage; +import cpw.mods.fml.common.network.handshake.FMLHandshakeServerState; +import cpw.mods.fml.common.network.handshake.NetworkDispatcher; +import cpw.mods.fml.common.network.handshake.FMLHandshakeMessage.ModList; +import net.minecraft.entity.player.EntityPlayerMP; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.relauncher.Side; +import java.util.Map; +import java.util.UUID; + +import com.zivilon.cindercore_modlist.CinderCoreModlist; + +@Mixin(targets = "cpw.mods.fml.common.network.handshake.FMLHandshakeServerState$2") +public abstract class MixinFMLHandshakeServerStateHELLO { + + @Inject(method = "accept", at = @At("RETURN"), cancellable = false) + private void onAccept(ChannelHandlerContext ctx, FMLHandshakeMessage msg, CallbackInfoReturnable cir) { + if (msg == null || !(msg instanceof FMLHandshakeMessage.ModList)) { + return; + } + System.out.println("[CinderCore] Initiating modified handshake HELLO"); + FMLHandshakeMessage.ModList modListMsg = (FMLHandshakeMessage.ModList) msg; + Map modList = modListMsg.modList(); + + NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).get(); + if (dispatcher == null) { + return; + } + + try { + Field playerField = NetworkDispatcher.class.getDeclaredField("player"); + playerField.setAccessible(true); + EntityPlayerMP player = (EntityPlayerMP) playerField.get(dispatcher); + System.out.println("[CinderCore] Player " + player.getCommandSenderName() + " is connecting with mods " + modList); + if (player != null) { + CinderCoreModlist.savePlayerModList(player.getUniqueID(), modList); + } + } catch (NoSuchFieldException | IllegalAccessException e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateWAITINGCACK.java b/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateWAITINGCACK.java new file mode 100644 index 0000000..8b6f5ec --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/mixins/MixinFMLHandshakeServerStateWAITINGCACK.java @@ -0,0 +1,77 @@ +package com.zivilon.cindercore_modlist.mixins; + +import java.lang.reflect.Field; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandlerContext; +import cpw.mods.fml.common.network.handshake.FMLHandshakeMessage; +import cpw.mods.fml.common.network.handshake.FMLHandshakeServerState; +import cpw.mods.fml.common.network.handshake.NetworkDispatcher; +import cpw.mods.fml.common.network.handshake.FMLHandshakeMessage.ModList; +import cpw.mods.fml.common.network.NetworkRegistry; +import net.minecraft.entity.player.EntityPlayerMP; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; +import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.relauncher.Side; +import java.util.Map; +import java.util.UUID; +import cpw.mods.fml.common.registry.GameData; +import cpw.mods.fml.common.registry.GameData.GameDataSnapshot; + +import com.zivilon.cindercore_modlist.CinderCoreModlist; +import com.zivilon.cindercore_modlist.util.HandshakeUtils; +import com.zivilon.cindercore.network.PacketInterceptor; + +@Mixin(targets = "cpw.mods.fml.common.network.handshake.FMLHandshakeServerState$3") +public abstract class MixinFMLHandshakeServerStateWAITINGCACK { + + @Overwrite + public FMLHandshakeServerState accept(ChannelHandlerContext ctx, FMLHandshakeMessage msg) + { + if (!ctx.channel().attr(NetworkDispatcher.IS_LOCAL).get()) + { + System.out.println("[CinderCore] Initiating modified handshake WAITINGCACK"); + // Get the player instance + EntityPlayerMP player = null; + try { + // Performance loss from reflection doesn't matter on login + NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).get(); + + Field playerField = NetworkDispatcher.class.getDeclaredField("player"); + playerField.setAccessible(true); + player = (EntityPlayerMP) playerField.get(dispatcher); + } catch (NoSuchFieldException | IllegalAccessException e) { + System.out.println("[CinderModlistCore] Reflection error in MixinFMLHandshakeServerStateWAITINGCACK"); + e.printStackTrace(); + } + + UUID uuid = player.getUniqueID(); + CinderCoreModlist.generatePlayerItemFallbackMap(uuid); + CinderCoreModlist.generatePlayerEntityFallbackMap(uuid); + CinderCoreModlist.generatePlayerCustomFallbackMap(uuid); + GameDataSnapshot itemlist = GameData.buildItemDataList(); + Map fallbacks = CinderCoreModlist.getPlayerItemFallbacks(uuid); + + // Modifying the Map + itemlist = HandshakeUtils.modifyGameDataSnapshot(itemlist, fallbacks); + + ctx.writeAndFlush(new FMLHandshakeMessage.ModIdData(itemlist)).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + } + FMLHandshakeServerState currentState = FMLHandshakeServerState.WAITINGCACK; + + FMLHandshakeMessage new_msg = new FMLHandshakeMessage.HandshakeAck(currentState.ordinal()); +/* if (new_msg instanceof FMLHandshakeMessage.ClientHello) System.out.println("[CinderModlistCore] Sending instance of ClientHello"); + if (new_msg instanceof FMLHandshakeMessage.ModIdData) System.out.println("[CinderModlistCore] Sending instance of ModIdData"); + if (new_msg instanceof FMLHandshakeMessage.HandshakeAck) System.out.println("[CinderModlistCore] Sending instance of HandshakeAck"); + System.out.println("Sent");*/ + + ctx.writeAndFlush(new_msg).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); + NetworkRegistry.INSTANCE.fireNetworkHandshake(ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).get(), Side.SERVER); + return FMLHandshakeServerState.COMPLETE; + } +} + diff --git a/src/main/java/com/zivilon/cindercore_modlist/util/HandshakeUtils.java b/src/main/java/com/zivilon/cindercore_modlist/util/HandshakeUtils.java new file mode 100644 index 0000000..9025f3a --- /dev/null +++ b/src/main/java/com/zivilon/cindercore_modlist/util/HandshakeUtils.java @@ -0,0 +1,40 @@ +package com.zivilon.cindercore_modlist.util; + +import java.util.Map; +import java.util.ArrayList; +import java.util.List; + +import cpw.mods.fml.common.registry.GameData.GameDataSnapshot; + +import com.zivilon.cindercore_modlist.CinderCoreModlist; +import com.zivilon.cindercore_modlist.FallbackEntry; + +public class HandshakeUtils { + + private static boolean shouldRemove(Map.Entry entry, Map fallbackMap) { + return fallbackMap.containsKey(entry.getValue()); + } + + public static GameDataSnapshot modifyGameDataSnapshot(GameDataSnapshot itemlist, Map fallbackMap) { + List removedKeys = new ArrayList<>(); + itemlist.idMap.entrySet().removeIf(entry -> { + boolean toRemove = shouldRemove(entry, fallbackMap); + if (toRemove) { + removedKeys.add(entry.getKey()); + } + return toRemove; + }); + + itemlist.blockSubstitutions.removeIf(removedKeys::contains); + itemlist.itemSubstitutions.removeIf(removedKeys::contains); + return itemlist; + } + + public static void printGameDataSnapshot(GameDataSnapshot itemlist) { + System.out.println("[CinderCoreModlist] Current GameDataSnapshot Items:"); + for (Map.Entry entry : itemlist.idMap.entrySet()) { + System.out.println("Name: " + entry.getKey() + ", ID: " + entry.getValue()); + } + } + +} \ No newline at end of file diff --git a/src/main/resources/cindercore_at.cfg b/src/main/resources/cindercore_at.cfg new file mode 100644 index 0000000..83b8c86 --- /dev/null +++ b/src/main/resources/cindercore_at.cfg @@ -0,0 +1,3 @@ +public cpw.mods.fml.common.network.handshake.FMLHandshakeServerState +public cpw.mods.fml.common.network.handshake.NetworkDispatcher player +public cpw.mods.fml.common.network.handshake.FMLHandshakeMessage$HandshakeAck (I)V \ No newline at end of file diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info new file mode 100644 index 0000000..2547b71 --- /dev/null +++ b/src/main/resources/mcmod.info @@ -0,0 +1,17 @@ +[ +{ + "modid": "cindercore_modlist", + "name": "Cinder Core Modlist", + "description": "Mod list provider for Cinder Core", + "version": "${version}", + "mcversion": "${mcversion}", + "url": "", + "updateUrl": "", + "authorList": ["Shinare"], + "credits": "", + "logoFile": "", + "screenshots": [], + "dependencies": [], + "accessTransformer": "cindercore_at.cfg" +} +] diff --git a/src/main/resources/mixins.cindercore_modlist.json b/src/main/resources/mixins.cindercore_modlist.json new file mode 100644 index 0000000..7bcb5af --- /dev/null +++ b/src/main/resources/mixins.cindercore_modlist.json @@ -0,0 +1,13 @@ +{ + "required": true, + "minVersion": "0.7.11", + "package": "com.zivilon.cindercore_modlist.mixins", + "refmap": "mixins.cindercore_modlist.refmap.json", + "target": "@env(DEFAULT)", + "compatibilityLevel": "JAVA_8", + "mixins": [ + "MixinFMLHandshakeServerStateHELLO", + "MixinFMLHandshakeServerStateWAITINGCACK" + ], + "client": [] +}