diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2018-12-31 13:12:25 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2018-12-31 13:12:25 +0800 |
| commit | fee12aa0885da204ec874cd5ada371c42501c873 (patch) | |
| tree | 880596f5f463e08762a56b1cb1d7008aaed1899d | |
| parent | 1b14c5142bb49db9af078b5c753bc22ce35a40cc (diff) | |
| download | RoughlyEnoughItems-fee12aa0885da204ec874cd5ada371c42501c873.tar.gz RoughlyEnoughItems-fee12aa0885da204ec874cd5ada371c42501c873.tar.bz2 RoughlyEnoughItems-fee12aa0885da204ec874cd5ada371c42501c873.zip | |
packetadder wip
69 files changed, 948 insertions, 696 deletions
@@ -17,6 +17,10 @@ A project to make (AEI) [https://minecraft.curseforge.com/projects/almost-enough - Fixed Scrolling (by a bit) - One page now shows 2 recipe +### 1.14 Port +- Not Called Listeners + - PacketAdder + ### Features that I will work on in the future - Hide Gui with Control / Command + O diff --git a/build.gradle b/build.gradle index d2bb2d756..7b686ef8a 100644..100755 --- a/build.gradle +++ b/build.gradle @@ -1,50 +1,29 @@ -buildscript { - repositories { - jcenter() - maven { url 'https://www.jitpack.io' } - maven { url 'http://repo.spongepowered.org/maven' } - maven { url 'http://files.minecraftforge.net/maven' } - } - dependencies { - classpath 'com.github.Chocohead:ForgeGradle:moderniser-SNAPSHOT' - classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT' - } +plugins { + id 'fabric-loom' version '0.2.0-SNAPSHOT' } -apply plugin: 'net.minecraftforge.gradle.tweaker-client' -apply plugin: 'org.spongepowered.mixin' -apply plugin: 'java' - -group 'me.shedaniel' -version '1.0b-1' -archivesBaseName = 'RoughlyEnoughItems' - sourceCompatibility = 1.8 targetCompatibility = 1.8 -repositories { - mavenCentral() - maven { url 'https://www.dimdev.org/maven/' } - maven { url 'https://repo.spongepowered.org/maven/' } - maven { url 'https://www.jitpack.io' } - maven { url "http://repo.strezz.org/artifactory/list/Strezz-Central" } -} +archivesBaseName = "RoughlyEnoughItems" +version = "1.0-1" +minecraft { +} +dependencies { + minecraft "com.mojang:minecraft:18w50a" + mappings "net.fabricmc:yarn:18w50a.83" + modCompile "net.fabricmc:fabric-loader:0.3.1.82" -mixin { - defaultObfuscationEnv notch - add sourceSets.main, 'mixins.roughlyenoughitems.refmap.json' + // Fabric API. This is technically optional, but you probably want it anyway. + modCompile "net.fabricmc:fabric:0.1.2.63" } -minecraft { - version = '1.13.2' - mappings = 'snapshot_20181130' - runDir = 'run' - tweakClass = 'org.dimdev.riftloader.launch.RiftLoaderClientTweaker' +// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task +// if it is present. +// If you remove this task, sources will not be generated. +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource } - -dependencies { - implementation 'com.github.Chocohead:Rift:f76cf44d887d290782590c99770876393c924333:dev' - implementation 'com.google.code.gson:gson:2.8.5' -}
\ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar Binary files differindex 1948b9074..deedc7fa5 100644..100755 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index acb49a1b1..60f855974 100644..100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Dec 21 19:34:34 HKT 2018 +#Sun Dec 30 21:50:18 HKT 2018 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip @@ -1,4 +1,4 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash ############################################################################## ## @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn () { +warn ( ) { echo "$*" } -die () { +die ( ) { echo echo "$*" echo @@ -154,19 +154,16 @@ if $cygwin ; then esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") } -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" +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then +if [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then cd "$(dirname "$0")" fi -exec "$JAVACMD" "$@" +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a..f9553162f 100644..100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,84 +1,84 @@ -@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 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=
-
-@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 init
-
-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 init
-
-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
-
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
-: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 %CMD_LINE_ARGS%
-
-: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
+@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 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= + +@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 init + +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 init + +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 + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +: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 %CMD_LINE_ARGS% + +: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/settings.gradle b/settings.gradle index cc5cba83c..5b60df3d2 100644..100755 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,10 @@ -rootProject.name = 'RoughlyEnoughItems' - +pluginManagement { + repositories { + jcenter() + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + gradlePluginPortal() + } +} diff --git a/src/main/java/me/shedaniel/ClientListener.java b/src/main/java/me/shedaniel/ClientListener.java index d6c4017c7..7d7d2f65b 100755 --- a/src/main/java/me/shedaniel/ClientListener.java +++ b/src/main/java/me/shedaniel/ClientListener.java @@ -9,12 +9,12 @@ import me.shedaniel.listenerdefinitions.RecipeLoadListener; import net.minecraft.client.settings.KeyBinding; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.init.Items; import net.minecraft.item.Item; -import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; -import net.minecraft.util.registry.IRegistry; +import net.minecraft.item.Items; +import net.minecraft.recipe.RecipeManager; +import net.minecraft.util.DefaultedList; +import net.minecraft.util.registry.Registry; import java.awt.event.KeyEvent; import java.util.ArrayList; @@ -43,24 +43,24 @@ public class ClientListener implements DoneLoading, RecipeLoadListener { } private void buildItemList() { - if (!IRegistry.ITEM.isEmpty()) - IRegistry.ITEM.forEach(this::processItem); - if (!IRegistry.ENCHANTMENT.isEmpty()) - IRegistry.ENCHANTMENT.forEach(enchantment -> { - for(int i = enchantment.getMinLevel(); i < enchantment.getMaxLevel(); i++) { + if (!Registry.ITEM.isEmpty()) + Registry.ITEM.forEach(this::processItem); + if (R |
