diff --git a/HOW_DOES_IT_WORK.md b/HOW_DOES_IT_WORK.md index ec9852e..c16b377 100644 --- a/HOW_DOES_IT_WORK.md +++ b/HOW_DOES_IT_WORK.md @@ -77,3 +77,6 @@ and avoid too many chunk rebuilding. This has still to be researched, if a method is found using shaders this mod is likely to switch to this method. + +Note: the shader-based method will break in the case of any other renderer registered. +For compatibility it's the less ideal. diff --git a/README.md b/README.md index 79a5bb7..ee130d9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -# LambdaDynamicLights +# LambDynamicLights ![Java 8](https://img.shields.io/badge/language-Java%208-9B599A.svg?style=flat-square) -[![GitHub license](https://img.shields.io/github/license/LambdAurora/LambdaDynamicLights?style=flat-square)](https://raw.githubusercontent.com/LambdAurora/LambdaDynamicLights/master/LICENSE) +[![GitHub license](https://img.shields.io/github/license/LambdAurora/LambDynamicLights?style=flat-square)](https://raw.githubusercontent.com/LambdAurora/LambDynamicLights/master/LICENSE) ![Environment: Client](https://img.shields.io/badge/environment-client-1976d2?style=flat-square) ![Mod loader: Fabric](https://img.shields.io/badge/modloader-Fabric-1976d2?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTEyLTE2VDE2OjU0OjE3LTA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHN0RXZ0OndoZW49IjIwMTgtMTItMTZUMTY6NTQ6MTctMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4/HiGMAAAAtUlEQVRYw+XXrQqAMBQF4D2P2eBL+QIG8RnEJFaNBjEum+0+zMQLtwwv+wV3ZzhhMDgfJ0wUSinxZUQWgKos1JP/AbD4OneIDyQPwCFniA+EJ4CaXm4TxAXCC0BNHgLhAdAnx9hC8PwGSRtAFVMQjF7cNTWED8B1cgwW20yfJgAvrssAsZ1cB3g/xckAxr6FmCDU5N6f488BrpCQ4rQBJkiMYh4ACmLzwOQF0CExinkCsvw7vgGikl+OotaKRwAAAABJRU5ErkJggg==) -![Version](https://img.shields.io/github/v/tag/LambdAurora/LambdaDynamicLights?label=version&style=flat-square) +![Version](https://img.shields.io/github/v/tag/LambdAurora/LambDynamicLights?label=version&style=flat-square) +[![CurseForge](http://cf.way2muchnoise.eu/title/393442.svg)](https://www.curseforge.com/minecraft/mc-mods/lambdynamiclights) A dynamic lights mod for Fabric. @@ -15,10 +16,13 @@ item which makes light as a block, or create by an entity on fire, etc. Dynamic lights are present as an option in OptiFine or as a Forge mod (Dynamic Lights mod). +Warning: this mod is not compatible with Sodium. +Phosphor is compatible and recommended. + ## Build Just do `./gradlew build` and everything should build just fine! ## How does it work internally? -Check [this documentation](https://github.com/LambdAurora/LambdaDynamicLights/blob/mc1.16/HOW_DOES_IT_WORK.md). +Check [this documentation](https://github.com/LambdAurora/LambDynamicLights/blob/mc1.16/HOW_DOES_IT_WORK.md). diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..ab2351b --- /dev/null +++ b/build.gradle @@ -0,0 +1,86 @@ +plugins { + id 'fabric-loom' version '0.4-SNAPSHOT' + id 'java-library' +} + +group = project.maven_group +version = "${project.mod_version}+${project.minecraft_version}" +archivesBaseName = project.archives_base_name + "-fabric" + +minecraft { +} + +repositories { + mavenLocal() + mavenCentral() + maven { + name = "AperLambda" + url = 'https://aperlambda.github.io/maven' + } + //maven { url = "https://jitpack.io" } + flatDir { + dirs "lib" + } +} + +configurations { + shadow + implementation.extendsFrom shadow +} + +dependencies { + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + + // Fabric API. This is technically optional, but you probably want it anyway. + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + + modImplementation "me.lambdaurora:spruceui:${project.spruceui_version}" + include "com.github.lambdaurora:spruceui:${project.spruceui_version}" + + modImplementation "io.github.prospector:modmenu:${project.modmenu_version}" + // modImplementation ":phosphor-fabric-mc${project.minecraft_version}-0.6.0+build.7-dev" + // One day, Sodium compatibility. + //modImplementation "com.github.jellysquid3:sodium:1.16.x~dev-SNAPSHOT" + //modImplementation ":sodium-fabric-mc1.16.1-0.1.0-SNAPSHOT-dev" + + shadow "com.electronwill.night-config:core:3.6.3" + shadow "com.electronwill.night-config:toml:3.6.3" + + shadow "org.aperlambda:lambdajcommon:1.8.0" +} + +tasks.withType(JavaCompile) { + options.encoding = "UTF-8" +} + +processResources { + inputs.property "version", project.version + + from(sourceSets.main.resources.srcDirs) { + include "fabric.mod.json" + expand "version": project.version + } + + from(sourceSets.main.resources.srcDirs) { + exclude "fabric.mod.json" + } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + withSourcesJar() +} + +jar { + from "../LICENSE" + + from { + configurations.shadow.collect { + it.isDirectory() ? it : zipTree(it) + } + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..c0e1b73 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,19 @@ +# Done to increase the memory available to gradle. +org.gradle.jvmargs=-Xmx1G + +# Fabric Properties +# check these on https://fabricmc.net/use +minecraft_version=1.16.1 +yarn_mappings=1.16.1+build.19:v2 +loader_version=0.8.9+build.203 + +# Mod Properties +mod_version = 1.0.0 +maven_group = me.lambdaurora +archives_base_name = lambdynamiclights + +# Dependencies +# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api +fabric_version=0.14.0+build.371-1.16 +spruceui_version=1.5.5 +modmenu_version=1.12.2+build.17 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..62d4c05 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..622ab64 --- /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-6.5-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..fbd7c51 --- /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..a9f778a --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,104 @@ +@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 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/icon.kra b/icon.kra new file mode 100644 index 0000000..80636be Binary files /dev/null and b/icon.kra differ diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..04c9271 Binary files /dev/null and b/icon.png differ diff --git a/icon_400.png b/icon_400.png new file mode 100644 index 0000000..ae3e522 Binary files /dev/null and b/icon_400.png differ diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..ffbe47d --- /dev/null +++ b/settings.gradle @@ -0,0 +1,12 @@ +pluginManagement { + repositories { + jcenter() + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + gradlePluginPortal() + } +} + +rootProject.name = 'lambdynamiclights' diff --git a/src/main/resources/assets/lambdynlights/icon.png b/src/main/resources/assets/lambdynlights/icon.png new file mode 100644 index 0000000..04c9271 Binary files /dev/null and b/src/main/resources/assets/lambdynlights/icon.png differ diff --git a/src/main/resources/assets/lambdynlights/lang/en_us.json b/src/main/resources/assets/lambdynlights/lang/en_us.json new file mode 100644 index 0000000..11c079a --- /dev/null +++ b/src/main/resources/assets/lambdynlights/lang/en_us.json @@ -0,0 +1,10 @@ +{ + "lambdynlights.menu.title": "LambDynamicLights Settings", + "lambdynlights.mode.fastest": "Fastest", + "lambdynlights.mode.fast": "Fast", + "lambdynlights.mode.fancy": "Fancy", + "lambdynlights.options.mode": "Dynamic Lights", + "lambdynlights.tooltip.mode.1": "Enables dynamic lights. If enabled a player holding a torch will light up the area for example.", + "lambdynlights.tooltip.mode.2": "%s and %s will lag a bit behind but minimizes light updates.", + "lambdynlights.tooltip.mode.3": "%s is smooth dynamic lighting." +} \ No newline at end of file diff --git a/src/main/resources/assets/lambdynlights/lang/fr_ca.json b/src/main/resources/assets/lambdynlights/lang/fr_ca.json new file mode 100644 index 0000000..7f7d341 --- /dev/null +++ b/src/main/resources/assets/lambdynlights/lang/fr_ca.json @@ -0,0 +1,10 @@ +{ + "lambdynlights.menu.title": "LambDynamicLights paramètres", + "lambdynlights.mode.fastest": "Très rapides", + "lambdynlights.mode.fast": "Rapides", + "lambdynlights.mode.fancy": "Détaillés", + "lambdynlights.options.mode": "Lumières dynamiques", + "lambdynlights.tooltip.mode.1": "Active les lumières dynamiques. Par exemple, si activé alors un joueur tenant une torche va éclairer l'espace autour.", + "lambdynlights.tooltip.mode.2": "%s et %s ont un mouvement saccadé mais mettent à jour la lumière le moins possible.", + "lambdynlights.tooltip.mode.3": "%s a un mouvement fluide." +} \ No newline at end of file diff --git a/src/main/resources/assets/lambdynlights/lang/fr_fr.json b/src/main/resources/assets/lambdynlights/lang/fr_fr.json new file mode 100644 index 0000000..7f7d341 --- /dev/null +++ b/src/main/resources/assets/lambdynlights/lang/fr_fr.json @@ -0,0 +1,10 @@ +{ + "lambdynlights.menu.title": "LambDynamicLights paramètres", + "lambdynlights.mode.fastest": "Très rapides", + "lambdynlights.mode.fast": "Rapides", + "lambdynlights.mode.fancy": "Détaillés", + "lambdynlights.options.mode": "Lumières dynamiques", + "lambdynlights.tooltip.mode.1": "Active les lumières dynamiques. Par exemple, si activé alors un joueur tenant une torche va éclairer l'espace autour.", + "lambdynlights.tooltip.mode.2": "%s et %s ont un mouvement saccadé mais mettent à jour la lumière le moins possible.", + "lambdynlights.tooltip.mode.3": "%s a un mouvement fluide." +} \ No newline at end of file diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..f3a5d41 --- /dev/null +++ b/src/main/resources/fabric.mod.json @@ -0,0 +1,53 @@ +{ + "schemaVersion": 1, + "id": "lambdynlights", + "name": "LambDynamicLights", + "version": "${version}", + "description": "Adds dynamic lights to the game.", + "authors": [ + "LambdAurora" + ], + "contact": { + "homepage": "https://www.curseforge.com/minecraft/mc-mods/lambdynamiclights", + "sources": "https://github.com/LambdAurora/LambDynamicLights.git", + "issues": "https://github.com/LambdAurora/LambDynamicLights/issues" + }, + "license": "MIT", + "icon": "assets/lambdynlights/icon.png", + "environment": "client", + "entrypoints": { + "client": [ + "me.lambdaurora.lambdynlights.LambDynLights" + ], + "modmenu": [ + "me.lambdaurora.lambdynlights.LambDynLightsModMenu" + ] + }, + "mixins": [ + "lambdynlights.mixins.json", + "lambdynlights.lightsource.mixins.json" + ], + "depends": { + "fabricloader": ">=0.8.0", + "fabric": "*", + "minecraft": ">=1.16" + }, + "recommends": { + "modmenu": ">=1.12.2" + }, + "suggests": { + "flamingo": "*", + "ltr": "*" + }, + "breaks": { + "modmenu": "<1.12.2", + "optifabric": "*" + }, + "custom": { + "modmenu:clientsideOnly": true, + "modupdater": { + "strategy": "curseforge", + "projectID": 393442 + } + } +} diff --git a/src/main/resources/lambdynlights.lightsource.mixins.json b/src/main/resources/lambdynlights.lightsource.mixins.json new file mode 100644 index 0000000..94fe815 --- /dev/null +++ b/src/main/resources/lambdynlights.lightsource.mixins.json @@ -0,0 +1,20 @@ +{ + "required": true, + "package": "me.lambdaurora.lambdynlights.mixin.lightsource", + "compatibilityLevel": "JAVA_8", + "client": [ + "BlazeEntityMixin", + "CreeperEntityMixin", + "EndermanEntityMixin", + "EntityMixin", + "ExplosiveProjectileEntityMixin", + "ItemEntityMixin", + "LivingEntityMixin", + "MagmaCubeEntityMixin", + "PlayerEntityMixin", + "SpectralArrowEntityMixin" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/src/main/resources/lambdynlights.mixins.json b/src/main/resources/lambdynlights.mixins.json new file mode 100644 index 0000000..b478ad8 --- /dev/null +++ b/src/main/resources/lambdynlights.mixins.json @@ -0,0 +1,16 @@ +{ + "required": true, + "package": "me.lambdaurora.lambdynlights.mixin", + "plugin": "me.lambdaurora.lambdynlights.LambDynLightsMixinPlugin", + "compatibilityLevel": "JAVA_8", + "client": [ + "BuiltChunkStorageAccessor", + "CommonWorldRendererMixin", + "EntityRenderDispatcherMixin", + "VideoOptionsScreenMixin", + "WorldRendererMixin" + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/src/main/resources/lambdynlights.toml b/src/main/resources/lambdynlights.toml new file mode 100644 index 0000000..135edc5 --- /dev/null +++ b/src/main/resources/lambdynlights.toml @@ -0,0 +1,3 @@ +# LambDynamicLights configuration. +# The dynamic lights mode +mode = "off"