├── (MEME) vs starlight.png ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── request-enhancement.md │ └── text-issue.md ├── PULL_REQUEST_TEMPLATE │ └── pull_request_template.md └── workflows │ └── gradle.yml ├── .gitignore ├── .run └── Methane-mod [runClient].run.xml ├── CONTRIBUTING.md ├── Compatability.md ├── LICENSE ├── Methane 2.3 performance.png ├── Methane-logo-Large.png ├── Propaganda 2.png ├── README.md ├── SECURITY.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── modrinth-desc-copy.md ├── next-blockers.md ├── propaganda.png ├── settings.gradle └── src └── main ├── java └── com │ └── modrinth │ └── methane │ ├── Methane.java │ ├── MethaneSettings.java │ ├── ModMenuIntegration.java │ ├── client │ ├── BrightnessUtil.java │ ├── MethaneClient.java │ ├── MethaneJoinPopUp.java │ └── readme.md │ ├── mixin │ ├── BackgroundRendererMixin.java │ ├── ChunkLightProviderMixin.java │ ├── DestructiveWeatherOptimisation.java │ ├── GameMenuScreenMixin.java │ ├── GameRendererMixin.java │ ├── HandledScreenMixin.java │ ├── LightingProviderMixin.java │ ├── LightmapTextureManagerMixin.java │ ├── MinecraftServerMixin.java │ ├── ParticleMixin.java │ ├── TitleScreenMixin.java │ ├── ToastManagerMixin.java │ ├── WorldRendererMixin.java │ ├── accessor │ │ └── WorldRendererBuiltChunkStorageAccessor.java │ ├── getLightLevelHack │ │ ├── ChunkRenderReigonMixin.java │ │ ├── ClientWorldMixin.java │ │ └── MushroomPlantMixin.java │ ├── plugin │ │ └── MethaneMixinPlugin.java │ └── readme.md │ ├── readme.md │ ├── server │ ├── MethaneServerError.java │ └── README.MD │ └── util │ ├── MethaneConstants.java │ └── readme.md └── resources ├── assets └── methane │ ├── Methane-logo-Large.png │ └── lang │ ├── de_de.json │ ├── en_au.json │ ├── en_us.json │ ├── fr_fr.json │ ├── it_it.json │ ├── ko_kr.json │ ├── lol_us.json │ ├── pt_br.json │ ├── pt_pt.json │ ├── ru_ru.json │ └── zh_tw.json ├── fabric.mod.json └── methane.mixins.json /(MEME) vs starlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/(MEME) vs starlight.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: general issues 4 | title: "[Issue] something broke!" 5 | labels: bug 6 | assignees: 'AnOpenSauceDev' 7 | 8 | --- 9 | 10 | # 🔥 Something broke! 11 | 12 | ## Description of what happened 13 | 14 | ## Mods used 15 | 16 | _it is recommended to use [GitHub Gists](https://gist.github.com/) when uploading large logfiles._ 17 | 18 | ## Methane Version 19 | _e.g. Methane - 1.5: 1.19.2_ 20 | ## possible ways to replicate this bug 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/request-enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Request/Enhancement 3 | about: Suggest an idea for this project 4 | title: "[Enhancement/Suggestion] Example Issue" 5 | labels: enhancement 6 | assignees: 'AnOpenSauceDev' 7 | 8 | --- 9 | 10 | ## 💡 The Idea. 11 | 12 | ## 🤔 How should it be accomplished? 13 | _how you think it would work best_ 14 | 15 | ## 📝 Anything else. 16 | _related issues, etc._ 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/text-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Text Issue 3 | about: Issues involving bad translations, spelling/grammar mistakes, un-translated 4 | fields and more. 5 | title: '' 6 | labels: enhancement, good first issue 7 | assignees: 'AnOpenSauceDev' 8 | 9 | --- 10 | 11 | # Text issue 12 | _these can be pretty broad, so there isn't much of a structure here_ 13 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | This Pull request is in the following categories: 3 | - [ ] Translation/Text changes 4 | - [ ] Bug fixes 5 | - [ ] Feature addition(s) 6 | - [ ] Optimizations 7 | - [ ] Other 8 | 9 | Fixes Issues (if any): 10 | 11 | 12 | Other notes: 13 | -------------------------------------------------------------------------------- /.github/workflows/gradle.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time 6 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle 7 | 8 | name: Java CI with Gradle 9 | 10 | on: 11 | push: 12 | branches: [ "master" ] 13 | pull_request: 14 | branches: [ "master" ] 15 | 16 | permissions: 17 | contents: read 18 | 19 | jobs: 20 | build: 21 | 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | - name: Set up JDK ☕ 27 | uses: actions/setup-java@v3 28 | with: 29 | java-version: '21' 30 | distribution: 'temurin' 31 | - name: chmod the script so actions wont die 🙃 32 | run: chmod +x gradlew 33 | - name: Build with Gradle 🔧 34 | uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 35 | with: 36 | arguments: build #pretty crazy, but you CAN run a server via github actions! 37 | - name: Publish artifact JARs 38 | uses: actions/upload-artifact@v3 39 | with: 40 | name: build artifacts 41 | path: build/libs/* 42 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User-specific stuff 2 | .idea/ 3 | 4 | *.iml 5 | *.ipr 6 | *.iws 7 | 8 | # IntelliJ 9 | out/ 10 | # mpeltonen/sbt-idea plugin 11 | .idea_modules/ 12 | 13 | run/ 14 | build/ 15 | 16 | # JIRA plugin 17 | atlassian-ide-plugin.xml 18 | 19 | AHUISDHUWADHUIQWUIFHUIQWE.iml 20 | 21 | # Compiled class file 22 | *.class 23 | 24 | # Log file 25 | *.log 26 | 27 | # BlueJ files 28 | *.ctxt 29 | 30 | # Package Files # 31 | *.jar 32 | *.war 33 | *.nar 34 | *.ear 35 | *.zip 36 | *.tar.gz 37 | *.rar 38 | 39 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 40 | hs_err_pid* 41 | 42 | *~ 43 | 44 | # temporary files which can be created if a process still has a handle open of a deleted file 45 | .fuse_hidden* 46 | 47 | # KDE directory preferences 48 | .directory 49 | 50 | # Linux trash folder which might appear on any partition or disk 51 | .Trash-* 52 | 53 | # .nfs files are created when an open file is removed but is still being accessed 54 | .nfs* 55 | 56 | # General 57 | .DS_Store 58 | .AppleDouble 59 | .LSOverride 60 | 61 | # Icon must end with two \r 62 | Icon 63 | 64 | # Thumbnails 65 | ._* 66 | 67 | # Files that might appear in the root of a volume 68 | .DocumentRevisions-V100 69 | .fseventsd 70 | .Spotlight-V100 71 | .TemporaryItems 72 | .Trashes 73 | .VolumeIcon.icns 74 | .com.apple.timemachine.donotpresent 75 | 76 | # Directories potentially created on remote AFP share 77 | .AppleDB 78 | .AppleDesktop 79 | Network Trash Folder 80 | Temporary Items 81 | .apdisk 82 | 83 | # Windows thumbnail cache files 84 | Thumbs.db 85 | Thumbs.db:encryptable 86 | ehthumbs.db 87 | ehthumbs_vista.db 88 | 89 | # Dump file 90 | *.stackdump 91 | 92 | # Folder config file 93 | [Dd]esktop.ini 94 | 95 | # Recycle Bin used on file shares 96 | $RECYCLE.BIN/ 97 | 98 | # Windows Installer files 99 | *.cab 100 | *.msi 101 | *.msix 102 | *.msm 103 | *.msp 104 | 105 | # Windows shortcuts 106 | *.lnk 107 | 108 | .gradle 109 | build/ 110 | 111 | # Ignore Gradle GUI config 112 | gradle-app.setting 113 | 114 | # Cache of project 115 | .gradletasknamecache 116 | 117 | **/build/ 118 | 119 | # Common working directory 120 | run/ 121 | 122 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) 123 | !gradle-wrapper.jar 124 | -------------------------------------------------------------------------------- /.run/Methane-mod [runClient].run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 16 | 18 | true 19 | true 20 | false 21 | false 22 | 23 | 24 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Methane Contribution Guide 2 | The guidelines are pretty simple, there are just a few things you should follow: 3 | 4 | ## Programmers 5 | 6 | - make sure to comment on your code so it's readable. 7 | - try not to rely _too_ heavily on the Fabric API. 8 | - try to seperate your own code into different classes and/or packages for further clarity. 9 | - Instead of flooding the users logs with debug messages via `System.out.println` or `MethaneLogger.info`, please use the methods in the `Debug` class in `util` instead. 10 | - Speaking of which, the `Debug` utilities are quite powerful for adding your own developer-only features to the game, without having to introduce bugs to non-developer users. 11 | 12 | ## If you don't know how to code, or want to help out in another way... 13 | 14 | If you don't know how to code, you can still help out by reporting bugs or helping translate the mod to other languages! 15 | 16 | Contributors are listed in GitHub and `fabric.mod.json` (feel free to add yourself to it in your PR). 17 | -------------------------------------------------------------------------------- /Compatability.md: -------------------------------------------------------------------------------- 1 | # Methane Compatability Sheet 2 | 3 | Key: ✔ = works, ❌ = broken, ⚠ = incompatabilities/server only, 🔧 = workaround(s) implemented in code, 🚧 = currently 4 | being tested 5 | 6 | this is a complete list of tested mods, mainly those i come across while using Methane. Most mods tested on older versions should work fine on 2.1. 7 | 8 | Mod missing? Suggest it to be tested in a pull request. 9 | 10 | | Name | Compat | Tested Version | 11 | |------|:------:|--------:| 12 | |ModernFix|✔|2.1| 13 | |Faster Random|✔|2.1| 14 | |FastAnim|✔|2.1| 15 | |Starlight|**|None| 16 | |Sodium|✔|1.7| 17 | |Vivecraft (VR+NONVR)|✔|1.5| 18 | |Iris Shaders|⚠***|1.7| 19 | |Exordium|✔|1.5| 20 | |DashLoader|✔|1.4.6| 21 | |Lithium|✔|2.1| 22 | |Smooth Boot|✔|1.5| 23 | |FerriteCore|✔|2.1| 24 | |LazyDFU|✔|2.1| 25 | |C2ME|✔|1.5| 26 | |Carpet|✔|1.5| 27 | |Indium|✔|1.5| 28 | |MemoryLeakFix|✔|1.4.6| 29 | |Krypton|✔|1.5| 30 | |Architectury|✔|1.5| 31 | |Camera Utils|✔|1.5| 32 | |Mod Menu|✔|2.2| 33 | |Rolling Health|✔|Early dev build| 34 | |ReplayMod|✔|1.5| 35 | |Cloth Config|✔|1.6.3| 36 | |Distant Horizions*|⚠|1.6.3 37 | |VulkanMod*|✔|1.7 38 | 39 | > * * ~~Distant horizons currently is broken with methane ON.~~ UPDATE: A temporary workaround [can be found here.](https://github.com/AnOpenSauceDev/Methane-mod/issues/25#issuecomment-1500877766)
40 | 41 | > * ** Starlight wont _crash_ with methane, but i haven't actually done any deeper research yet.
42 | 43 | > * *** Iris shaders works fine with some shaders. See more info [here.](https://github.com/AnOpenSauceDev/Methane-mod/issues/30)
44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2024 AnOpenSauceDev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Methane 2.3 performance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/Methane 2.3 performance.png -------------------------------------------------------------------------------- /Methane-logo-Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/Methane-logo-Large.png -------------------------------------------------------------------------------- /Propaganda 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/Propaganda 2.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Methane is no longer in development, and the rewrite diverges too much from the original intent to be published as Methane. Please remove this mod from your instances/modpacks, as bugfixes/support will no longer be given. 2 | 3 | [modrinth](https://modrinth.com/mod/methane)     4 | 5 | 6 | 7 | # Methane 8 | 9 | ### for server admins 10 | There is a tool to manage fullbright settings for Methane clients, [available here.](https://github.com/AnOpenSauceDev/Methane-Server-Utils) 11 | 12 | ### for contributors 13 | Contributions are welcome! If you want to help out, [**please read this guide**](https://github.com/AnOpenSauceDev/Methane-mod/blob/master/CONTRIBUTING.md).
14 | 15 | 16 | Enjoy Methane? **Leave a ⭐!** 17 | 18 | # other important things 19 | > [!NOTE] 20 | > Methane depends on the following mods: 21 | > - Fabric API 22 | > - Cloth Config 23 | > - Mod Menu 24 | 25 | I'm working on other projects most of the time, so don't expect me to finish things straight away.
26 | Any questions you have should be handled in [Discussions.](https://github.com/AnOpenSauceDev/Methane-mod/discussions)
27 | 28 | 29 | > I don't have a legal say over distribution of this mod, but it would be nice if you asked for permission before redistributing Methane on other platforms.
30 | 31 | > Methane is on curseforge to prevent impersonation, no support will be given. 32 | 33 | 34 | Why the name? It takes Minecraft (a carbon atom), and puts lots of optimizations that will probably break other mods (hydrogen), and releases it out into the air (where things will explode). This is why this mod has been rewritten almost 3 times already! 35 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'fabric-loom' version '1.6-SNAPSHOT' 3 | id 'maven-publish' 4 | } 5 | 6 | version = project.mod_version 7 | group = project.maven_group 8 | 9 | repositories { 10 | // Add repositories to retrieve artifacts from in here. 11 | // You should only use this when depending on other mods because 12 | // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. 13 | // See https://docs.gradle.org/current/userguide/declaring_repositories.html 14 | // for more information about repositories. 15 | maven { url "https://maven.shedaniel.me/" } 16 | maven { url "https://maven.terraformersmc.com/releases/" } 17 | 18 | exclusiveContent { 19 | forRepository { 20 | maven { 21 | name = "Modrinth" 22 | url = "https://api.modrinth.com/maven" 23 | } 24 | } 25 | filter { 26 | includeGroup "maven.modrinth" 27 | } 28 | } 29 | } 30 | 31 | dependencies { 32 | 33 | modApi "com.terraformersmc:modmenu:11.0.1" 34 | modApi( "me.shedaniel.cloth:cloth-config-fabric:15.0.127") 35 | // To change the versions see the gradle.properties file 36 | minecraft "com.mojang:minecraft:${project.minecraft_version}" 37 | mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" 38 | modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" 39 | 40 | 41 | modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" 42 | 43 | modImplementation "maven.modrinth:libmcdev:${project.libmcdev_version}" // libMCdev 44 | include "maven.modrinth:libmcdev:${libmcdev_version}" // bakes libMCDev into the mod 45 | } 46 | 47 | processResources { 48 | inputs.property "version", project.version 49 | filteringCharset "UTF-8" 50 | 51 | filesMatching("fabric.mod.json") { 52 | expand "version": project.version 53 | } 54 | } 55 | 56 | def targetJavaVersion = 17 57 | tasks.withType(JavaCompile).configureEach { 58 | // ensure that the encoding is set to UTF-8, no matter what the system default is 59 | // this fixes some edge cases with special characters not displaying correctly 60 | // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html 61 | // If Javadoc is generated, this must be specified in that task too. 62 | it.options.encoding = "UTF-8" 63 | if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { 64 | it.options.release = targetJavaVersion 65 | } 66 | } 67 | 68 | java { 69 | def javaVersion = JavaVersion.toVersion(targetJavaVersion) 70 | if (JavaVersion.current() < javaVersion) { 71 | toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) 72 | } 73 | archivesBaseName = project.archives_base_name 74 | // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task 75 | // if it is present. 76 | // If you remove this line, sources will not be generated. 77 | withSourcesJar() 78 | } 79 | 80 | jar { 81 | from("LICENSE") { 82 | rename { "${it}_${project.archivesBaseName}" } 83 | } 84 | } 85 | 86 | // configure the maven publication 87 | publishing { 88 | publications { 89 | mavenJava(MavenPublication) { 90 | from components.java 91 | } 92 | } 93 | 94 | // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. 95 | repositories { 96 | // Add repositories to publish to here. 97 | // Notice: This block does NOT have the same function as the block in the top level. 98 | // The repositories here will be used for publishing your artifact, not for 99 | // retrieving dependencies. 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Done to increase the memory available to gradle. 2 | org.gradle.jvmargs=-Xmx1G 3 | # Fabric Properties 4 | # check these on https://modmuss50.me/fabric.html 5 | minecraft_version=1.21 6 | yarn_mappings=1.21+build.7 7 | loader_version=0.15.11 8 | 9 | # Fabric API 10 | fabric_version=0.100.4+1.21 11 | 12 | #LibMCdev 13 | libmcdev_version=1.4.2 14 | 15 | # Mod Properties 16 | mod_version=3.8.2 17 | maven_group=com.modrinth 18 | archives_base_name=methane 19 | 20 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /modrinth-desc-copy.md: -------------------------------------------------------------------------------- 1 | ## What is this? 2 | **Methane** is a _small_ mod, that aims to reduce lag by **completely removing _fog (without sodium)_ and lighting.** By doing this, the CPU and GPU no longer has to do lighting and fog calculations for everything, speeding up rendering performance. The client also no longer cares about getting lighting from the server, partially improving latency and further benefiting CPU usage. 3 | 4 | ## Benefits 5 | - better framerates: ![some stats](https://github.com/AnOpenSauceDev/Methane-mod/blob/master/Propaganda%202.png?raw=true) 6 | _*recorded with Methane 1.4.5, everything low, 5 sim and render distance_ 7 | - the same effect as fullbright, but with actual performance gains. 8 | - infinitely faster lighting: ![img](https://github.com/AnOpenSauceDev/Methane-mod/blob/master/(MEME)%20vs%20starlight.png?raw=true) 9 | _infinitely more performance in lighting due to never actually calculating it._ 10 | 11 | ## Compared to fullbright 12 | while fullbright makes the world look lit, it still performs all those lighting calculations. Methane instead skips those, resulting in the same end product but with much better performance. 13 | 14 | ## Can i use this with starlight? 15 | Yes! As long as Starlight is only on the server. The main reason is that starlight will try to calculate lighting anyway, defeating the main purpose of Methane. 16 | 17 | ## Tested compatible _performance_ mods (as of 1.4.6) 18 | - Vivecraft 19 | - Sodium 20 | - Starlight (on server-side) 21 | - Iris Shaders (some lighting issues on non-raytraced shaders) 22 | - Exordium 23 | - DashLoader 24 | - Lithium 25 | - Smooth Boot 26 | - FerriteCore 27 | - LazyDFU 28 | - Concurrent Chunk Management Engine 29 | - Carpet 30 | - Indium 31 | - MemoryLeakFix 32 | - Krypton 33 | - A more complete list can be found [here](https://github.com/AnOpenSauceDev/Methane-mod/blob/master/Compatability.md) 34 | 35 | ## known bugs 🐞 36 | ~~Sodium can cause the world to become incredibly dark.~~ **Fixed in 1.3**
37 | ~~The sky below the horizon is black, this is due to the fog not being able to cover it.~~ **Fixed in 1.3**
38 | Shaders can experience lighting issues when dealing with methane.
39 | Feel free to add any bugs you find to the [issue tracker](https://github.com/AnOpenSauceDev/Methane-mod/issues). 40 | -------------------------------------------------------------------------------- /next-blockers.md: -------------------------------------------------------------------------------- 1 | # Blockers to methane-next 2 | 3 | - [x] get toggling to work
4 | - [ ] Somehow discard chunks without causing headaches or kicking the player out
5 | - [x] fix sodium compatability
6 | - [x] translations for other languages 7 | - [ ] LOLCAT 8 | - [x] test everything again.
9 | -------------------------------------------------------------------------------- /propaganda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/propaganda.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { 4 | name = 'Fabric' 5 | url = 'https://maven.fabricmc.net/' 6 | } 7 | gradlePluginPortal() 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/Methane.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane; 2 | 3 | import com.github.anopensaucedev.libmcdevfabric.Debug; 4 | 5 | import me.shedaniel.autoconfig.AutoConfig; 6 | import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; 7 | import net.fabricmc.api.ModInitializer; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | import static com.modrinth.methane.util.MethaneConstants.MOD_NAME; 11 | 12 | public class Methane implements ModInitializer { 13 | 14 | public static boolean ModActive = true; // for toggles 15 | public static Logger MethaneLogger = LoggerFactory.getLogger(MOD_NAME); 16 | public static MethaneSettings settings; 17 | public static Debug MethaneDebugger = new Debug("Methane Developer Debugger"); 18 | 19 | public static boolean isClient = false; 20 | 21 | public static boolean playerBlockingPacket; // whether the player was blocked due to a race condition 22 | 23 | public static boolean ServerForbidsChanging = false; 24 | 25 | @Override 26 | public void onInitialize() { 27 | 28 | MethaneLogger.info("Methane has loaded!"); 29 | MethaneDebugger.Log("Methane is in developer mode. If you are reading this in a non-dev environment, please create an issue."); 30 | 31 | AutoConfig.register(MethaneSettings.class, GsonConfigSerializer::new); 32 | settings = AutoConfig.getConfigHolder(MethaneSettings.class).getConfig(); 33 | 34 | 35 | 36 | if(Methane.settings.destructiveSettings.DestroyWeather || Methane.settings.destructiveSettings.destructiveweatheroptimizations || Methane.settings.destructiveSettings.RenderLayerSkips){ 37 | Methane.MethaneLogger.warn("One or more destructive Methane renderer features are being used. You might experience unusual bugs with other mods."); 38 | } 39 | } 40 | 41 | 42 | 43 | public static boolean intToBoolConversion(int i){ 44 | return i != 0; // if "i" is not zero, return true 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/MethaneSettings.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane; 2 | 3 | import me.shedaniel.autoconfig.ConfigData; 4 | import me.shedaniel.autoconfig.annotation.Config; 5 | import me.shedaniel.autoconfig.annotation.ConfigEntry; 6 | import me.shedaniel.cloth.clothconfig.shadowed.blue.endless.jankson.Comment; 7 | 8 | @Config(name = "methane") 9 | public class MethaneSettings implements ConfigData { 10 | //TODO: we should transition to translatable comments (@Comment(Text.translatable("YOUR.THING.HERE"))) 11 | 12 | 13 | @Comment("auto-magically darkens the world at night!") 14 | public boolean dynamicShading = true; 15 | 16 | @Comment("Time between shading rebuilds with Dynamic Shading, has a *tiny* performance impact. 0 = realtime, which has a large chunk loading performance impact. Requires a restart to take effect.") 17 | public int rebuildSeconds = 20; 18 | 19 | @Comment("Methane's initial state. (You should set this to 'Yes' to stop some bugs from happening)") 20 | public boolean modstate = true; 21 | 22 | @Comment("Render the status messages on the HUD instead of chat?") 23 | public boolean hudrender = false; 24 | 25 | @Comment("Use the old Methane lighting 'engine', has a smaller performance boost, but can fix compatibility with some mods and a few bugs.") 26 | public boolean useOldLightingEngine = false; 27 | 28 | public boolean disableToasts = true; 29 | 30 | @Comment("Enable or disable fog effects.") 31 | @ConfigEntry.Gui.CollapsibleObject 32 | public FogSettings fogSettings = new FogSettings(); 33 | 34 | public static class FogSettings{ 35 | @Comment("Toggle whether to keep fog settings even with Methane disabled.") 36 | public boolean persistFogSettings = false; 37 | public boolean disableAirFog = false; // the fog pass that obscures terrain 38 | public boolean disableWaterFog = false; // the fog layer that tints everything blue 39 | public boolean disableLavaFog = false; // the thing that tints everything orange 40 | public boolean disablePowderedSnowFog = false; // pretty self-explanatory 41 | 42 | public boolean disableThickFog = false; // Nether Fog pass 43 | @Comment("The fog that covers terrain in") 44 | public boolean disableSkyFog = false; // I think this is another fog pass 45 | } 46 | 47 | @Comment("Can be used to greatly improve performance, at the cost of some visual features.") 48 | @ConfigEntry.Gui.CollapsibleObject 49 | public DestructiveSettings destructiveSettings = new DestructiveSettings(); 50 | 51 | //@Comment("The default world brightness value (15 default and effective max)") 52 | //public double brightness = 1000; // unused for now because of a ton of issues 53 | 54 | public static class DestructiveSettings{ 55 | 56 | @Comment("Whether or not we calculate rainfall in biomes (breaks a lot of rain effects, but has performance benefits)") 57 | public boolean destructiveweatheroptimizations = false; 58 | 59 | @Comment("Forcefully deletes weather.") 60 | public boolean DestroyWeather; 61 | 62 | @Comment("Does nothing if sodium is installed") 63 | public boolean RenderLayerSkips; 64 | 65 | @Comment("Removes ALL screen backgrounds for a performance boost.") 66 | public boolean DestroyScreens; 67 | 68 | } 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/ModMenuIntegration.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane; 2 | 3 | import com.terraformersmc.modmenu.api.ConfigScreenFactory; 4 | import com.terraformersmc.modmenu.api.ModMenuApi; 5 | import me.shedaniel.autoconfig.AutoConfig; 6 | 7 | public class ModMenuIntegration implements ModMenuApi { 8 | @Override 9 | public ConfigScreenFactory getModConfigScreenFactory() { 10 | return parent -> AutoConfig.getConfigScreen(MethaneSettings.class, parent).get(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/client/BrightnessUtil.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.client; 2 | 3 | import com.github.anopensaucedev.libmcdevfabric.Debug; 4 | import com.modrinth.methane.Methane; 5 | import com.modrinth.methane.mixin.accessor.WorldRendererBuiltChunkStorageAccessor; 6 | import net.minecraft.client.MinecraftClient; 7 | import net.minecraft.client.render.BuiltChunkStorage; 8 | 9 | import java.util.Arrays; 10 | 11 | public class BrightnessUtil { 12 | 13 | // our default brightness value * the user's gamma 14 | public static float DEFAULT_LIGHT_VALUE = grabBaseGamma(); // 1.0F = fully lit, 0.0F = complete darkness 15 | 16 | public static float grabBaseGamma(){ 17 | float f = MinecraftClient.getInstance().options.getGamma().getValue().floatValue() + 0.1f; 18 | f += 1.0f; 19 | return f / 2; 20 | } 21 | 22 | public static float calculateBrightnessScale(){ 23 | MinecraftClient client = MinecraftClient.getInstance(); 24 | 25 | float scale = 1.0F; // 1 = normal, 0 = pitch black. 26 | 27 | long time = client.world.getTimeOfDay(); 28 | if(time >= 0 && time <= 12000){ // 0 <-> 12000 ticks is when the sky is fully bright 29 | 30 | } else if (time >= 12001 && time <= 12999) { // 12001 <-> 13000 is when the sky gets a bit darker 31 | scale = 0.9F; 32 | } else if (time >= 13000 && time <= 17000) { // darker... (mobs start spawning!) 33 | scale = 0.5F; 34 | } else if (time >= 17001 && time <= 20000) { // darker... 35 | scale = 0.25F; 36 | } else if (time >= 20001 && time <= 23000) { // lighter! 37 | scale = 0.5F; 38 | } else if (time >= 23001 && time <= 24000) { // day! 39 | scale = 1.0F; 40 | } 41 | 42 | 43 | 44 | return scale; 45 | } 46 | 47 | public static void rebuildChunks(MinecraftClient client){ 48 | BuiltChunkStorage storage = ((WorldRendererBuiltChunkStorageAccessor) client.worldRenderer).getChunks(); 49 | Arrays.stream(storage.chunks).parallel().forEach(builtChunk -> { 50 | builtChunk.scheduleRebuild(true); 51 | }); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/client/MethaneClient.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.client; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.fabricmc.api.ClientModInitializer; 5 | import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; 6 | import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; 7 | import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; 8 | import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; 9 | import net.minecraft.client.MinecraftClient; 10 | import net.minecraft.client.option.KeyBinding; 11 | import net.minecraft.client.util.InputUtil; 12 | import net.minecraft.text.Text; 13 | import net.minecraft.util.Identifier; 14 | import org.lwjgl.glfw.GLFW; 15 | 16 | 17 | import static net.minecraft.client.realms.task.LongRunningTask.setScreen; 18 | 19 | public class MethaneClient implements ClientModInitializer { 20 | 21 | public KeyBinding MethaneToggle; 22 | 23 | //public static final Identifier METHANE_RESP_PACKET = new Identifier("methane_server","pong"); 24 | 25 | public int REBUILD_TICKS_THRESHOLD = Methane.settings.rebuildSeconds*20; // rebuild every x seconds 26 | static int ticks = 0; 27 | 28 | public static boolean intToBoolConversion(int i){ 29 | return i != 0; // if "i" is not zero, return true 30 | } 31 | 32 | @Override 33 | public void onInitializeClient() { 34 | 35 | 36 | 37 | //HudRenderCallback.EVENT.register(new HudRenderListener()); 38 | 39 | Methane.isClient = true; 40 | /* 41 | 42 | 43 | ClientPlayNetworking.registerGlobalReceiver(METHANE_STATE_PACKET, ((client, handler, buf, responseSender) -> { 44 | 45 | 46 | int[] data = buf.readIntArray(); // 0 = enforceModState, 1 = globalModState, 2 = forceMethane (won't ever be used) 47 | if (intToBoolConversion(data[0])) { 48 | MethaneClient.ToggleMethaneSetBool(client, intToBoolConversion(data[1])); 49 | Methane.MethaneDebugger.Log("forcing methane server config"); 50 | 51 | Methane.ServerForbidsChanging = true; 52 | Methane.playerBlockingPacket = true; 53 | } else { 54 | // if the server allows changes 55 | Methane.MethaneDebugger.Log("Methane settings prompt open"); 56 | setScreen(new MethaneJoinPopUp(Text.of("Methane Server Settings"), intToBoolConversion(data[1]))); 57 | } 58 | 59 | })); 60 | 61 | */ 62 | 63 | 64 | 65 | Methane.ModActive = Methane.settings.modstate; 66 | 67 | // this causes us to need the Fabric API. 68 | MethaneToggle = KeyBindingHelper.registerKeyBinding(new KeyBinding( 69 | "key.methane.toggle", 70 | InputUtil.Type.KEYSYM, 71 | GLFW.GLFW_KEY_UNKNOWN, 72 | "category.methane.keys" 73 | ) 74 | ); 75 | 76 | 77 | 78 | ClientTickEvents.END_CLIENT_TICK.register(client -> { 79 | 80 | ticks++; 81 | 82 | 83 | if(Methane.ModActive && Methane.settings.dynamicShading && client.player != null){ 84 | if(ticks > REBUILD_TICKS_THRESHOLD){ 85 | BrightnessUtil.rebuildChunks(client); // has a *very* tiny performance impact, that only happens once every 20 seconds. It's also multithreaded! 86 | ticks = 0; 87 | } 88 | } 89 | 90 | 91 | if(client.player == null){ // I'm assuming that ClientPlayerEntity is only ever null if you quit the server. 92 | Methane.ServerForbidsChanging = false; 93 | 94 | }else if(Methane.playerBlockingPacket){ // I wanted to avoid this at all costs, but it looks like I have to do this hack. 95 | 96 | Methane.playerBlockingPacket = false; 97 | //ClientPlayNetworking.send(METHANE_RESP_PACKET, PacketByteBufs.empty()); 98 | 99 | } 100 | 101 | 102 | while (MethaneToggle.wasPressed()){ 103 | 104 | ToggleMethane(client,false); 105 | 106 | } 107 | }); 108 | 109 | 110 | 111 | } 112 | 113 | public static void ToggleMethane(MinecraftClient client,boolean force) { 114 | if(!Methane.ServerForbidsChanging || force){ 115 | 116 | 117 | 118 | Methane.ModActive = !Methane.ModActive; 119 | 120 | Methane.MethaneDebugger.Log("Methane state toggled to: " + Methane.ModActive); 121 | 122 | if(Methane.settings.hudrender){ 123 | 124 | if(Methane.ModActive) 125 | { 126 | 127 | client.player.sendMessage(Text.translatable("methane.active"),true); 128 | 129 | }else 130 | { 131 | 132 | client.player.sendMessage(Text.translatable("methane.offline"),true); 133 | } 134 | 135 | 136 | }else { 137 | if(Methane.ModActive) 138 | { 139 | 140 | client.player.sendMessage(Text.translatable("methane.active")); 141 | 142 | }else 143 | { 144 | 145 | client.player.sendMessage(Text.translatable("methane.offline")); 146 | } 147 | } 148 | } 149 | } 150 | 151 | public static void ToggleMethaneSetBool(MinecraftClient client,boolean state) { 152 | 153 | 154 | 155 | Methane.ModActive = state; 156 | if(Methane.settings.hudrender) { 157 | if (Methane.ModActive) { 158 | 159 | client.player.sendMessage(Text.translatable("methane.active"), true); 160 | 161 | } else { 162 | 163 | client.player.sendMessage(Text.translatable("methane.offline"), true); 164 | } 165 | 166 | 167 | } 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/client/MethaneJoinPopUp.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.client; 2 | 3 | import net.fabricmc.api.EnvType; 4 | import net.fabricmc.api.Environment; 5 | import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; 6 | import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; 7 | import net.minecraft.client.font.MultilineText; 8 | import net.minecraft.client.gui.DrawContext; 9 | import net.minecraft.client.gui.screen.Screen; 10 | import net.minecraft.client.gui.tooltip.Tooltip; 11 | import net.minecraft.client.gui.widget.ButtonWidget; 12 | import net.minecraft.client.util.math.MatrixStack; 13 | import net.minecraft.text.Text; 14 | 15 | //import static com.modrinth.methane.client.MethaneClient.METHANE_RESP_PACKET; 16 | 17 | @Environment(EnvType.CLIENT) 18 | public class MethaneJoinPopUp extends Screen { 19 | 20 | private Screen parent; 21 | private final boolean statedata; 22 | 23 | public MethaneJoinPopUp(Text title,boolean data) { 24 | super(Text.translatable("methane.serverpopup.settings")); 25 | statedata = data; 26 | this.parent = parent; 27 | } 28 | 29 | @Override 30 | public void close() { 31 | client.setScreen(parent); 32 | } 33 | 34 | public ButtonWidget yes; 35 | public ButtonWidget no; 36 | 37 | @Override 38 | public void render(DrawContext context, int mouseX, int mouseY, float delta) { 39 | super.render(context, mouseX, mouseY, delta); 40 | MultilineText txt = MultilineText.create(textRenderer,256,Text.translatable("methane.serverpopup.info")); 41 | txt.drawCenterWithShadow(context,width / 2, (height - 30) / 2); 42 | } 43 | 44 | @Override 45 | protected void init() { 46 | yes = ButtonWidget.builder(Text.translatable("methane.yes"), button -> { 47 | MethaneClient.ToggleMethaneSetBool(client,statedata); 48 | //ClientPlayNetworking.send(METHANE_RESP_PACKET, PacketByteBufs.empty()); 49 | close(); 50 | }) 51 | .dimensions(width / 2 - 205, 20, 200, 20) 52 | .tooltip(Tooltip.of(Text.translatable("methane.accept"))) 53 | .build(); 54 | no = ButtonWidget.builder(Text.translatable("methane.no"), button -> { 55 | //ClientPlayNetworking.send(METHANE_RESP_PACKET,PacketByteBufs.empty()); 56 | close(); 57 | }) 58 | .dimensions(width / 2 + 5, 20, 200, 20) 59 | .tooltip(Tooltip.of(Text.translatable("methane.reject"))) 60 | .build(); 61 | 62 | addDrawableChild(yes); 63 | addDrawableChild(no); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/client/readme.md: -------------------------------------------------------------------------------- 1 | # Client package 2 | 3 | Handles all the initialization stuff that would've instantly crashed the server on startup were it not for isolating the code here. 4 | 5 | Handles: 6 | 7 | - Methane Server Utils screen pop-ups. 8 | - Keybinds, and Methane state toggling. -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/BackgroundRendererMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.mojang.blaze3d.systems.RenderSystem; 5 | import net.minecraft.block.enums.CameraSubmersionType; 6 | import net.minecraft.client.network.ClientPlayerEntity; 7 | import net.minecraft.client.render.*; 8 | import net.minecraft.entity.Entity; 9 | import net.minecraft.entity.effect.StatusEffects; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Unique; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 15 | 16 | @Mixin(value = BackgroundRenderer.class) 17 | public class BackgroundRendererMixin { 18 | /** 19 | * @author AnOpenSauceDev 20 | * @reason what fog??!?!? never heard of it. 21 | */ 22 | @Inject(method = "applyFog", at = @At("HEAD"), cancellable = true) 23 | private static void applyFog(Camera camera, BackgroundRenderer.FogType fogType, float viewDistance, boolean thickFog, float tickDelta, CallbackInfo ci) { 24 | if (!Methane.ModActive && !Methane.settings.fogSettings.persistFogSettings) return; 25 | 26 | if (hasBlindOrDark(camera.getFocusedEntity())) return; 27 | 28 | if (shouldDisableFog(camera.getSubmersionType(), thickFog, fogType)) { 29 | RenderSystem.setShaderFogStart(-8.0F); 30 | RenderSystem.setShaderFogEnd(1_000_000.0F); 31 | ci.cancel(); 32 | } 33 | } 34 | 35 | @Unique 36 | private static boolean shouldDisableFog(CameraSubmersionType submersionType, boolean thickFog, BackgroundRenderer.FogType fogType) { 37 | if (submersionType == CameraSubmersionType.NONE && Methane.settings.fogSettings.disableAirFog) return true; 38 | if (submersionType == CameraSubmersionType.WATER && Methane.settings.fogSettings.disableWaterFog) return true; 39 | if (submersionType == CameraSubmersionType.LAVA && Methane.settings.fogSettings.disableLavaFog) return true; 40 | if (submersionType == CameraSubmersionType.POWDER_SNOW && Methane.settings.fogSettings.disablePowderedSnowFog) return true; 41 | if (thickFog && Methane.settings.fogSettings.disableThickFog) return true; 42 | if (fogType == BackgroundRenderer.FogType.FOG_SKY && Methane.settings.fogSettings.disableSkyFog) return true; 43 | return false; 44 | } 45 | 46 | @Unique 47 | private static boolean hasBlindOrDark(Entity entity) { 48 | if (!(entity instanceof ClientPlayerEntity)) return false; 49 | return ((ClientPlayerEntity) entity).hasStatusEffect(StatusEffects.BLINDNESS) 50 | || ((ClientPlayerEntity) entity).hasStatusEffect(StatusEffects.DARKNESS); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/ChunkLightProviderMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.minecraft.world.chunk.light.ChunkLightProvider; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 9 | 10 | @Mixin(ChunkLightProvider.class) 11 | public class ChunkLightProviderMixin { 12 | 13 | @Inject(method = "doLightUpdates", at = @At("HEAD"),cancellable = true) 14 | public void hack(CallbackInfoReturnable cir){ 15 | 16 | if(!Methane.settings.useOldLightingEngine && Methane.ModActive){ 17 | cir.cancel(); 18 | } 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/DestructiveWeatherOptimisation.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | 4 | import com.modrinth.methane.Methane; 5 | import com.modrinth.methane.MethaneSettings; 6 | import net.fabricmc.fabric.api.client.rendering.v1.DimensionRenderingRegistry; 7 | import net.minecraft.client.render.LightmapTextureManager; 8 | import net.minecraft.client.render.WorldRenderer; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(WorldRenderer.class) 15 | public class DestructiveWeatherOptimisation { // Dragons Beware! 16 | 17 | @Inject(method = "renderWeather", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;getBiome(Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/registry/entry/RegistryEntry;"),cancellable = true) 18 | public void biomeHacks(LightmapTextureManager manager, float tickDelta, double cameraX, double cameraY, double cameraZ, CallbackInfo ci){ 19 | if(Methane.ModActive && Methane.settings.destructiveSettings.destructiveweatheroptimizations) ci.cancel(); 20 | } 21 | 22 | @Inject(method = "renderWeather", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/biome/Biome;hasPrecipitation()Z"),cancellable = true) 23 | public void biomeHacksPt2(LightmapTextureManager manager, float tickDelta, double cameraX, double cameraY, double cameraZ, CallbackInfo ci){ 24 | if(Methane.ModActive && Methane.settings.destructiveSettings.destructiveweatheroptimizations) rtrue(); // Before anyone asks me this, the rain splashing is ticked separately, thus causing the weird biome-dependent splashing effects. (which i don't really want to remove, but who knows) 25 | } 26 | 27 | public boolean rtrue(){ 28 | return true; 29 | } // this actually does nothing 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/GameMenuScreenMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.modrinth.methane.client.MethaneClient; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.gui.screen.GameMenuScreen; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(value = GameMenuScreen.class, priority = 2000) 13 | public class GameMenuScreenMixin { 14 | 15 | 16 | @Inject(method = "disconnect",at=@At("HEAD")) 17 | public void gracefullyHandleDisconnections(CallbackInfo ci){ 18 | if(MinecraftClient.getInstance().isInSingleplayer()) MethaneClient.ToggleMethaneSetBool(MinecraftClient.getInstance(),false); 19 | } 20 | 21 | @Inject(method = "disconnect",at=@At("TAIL")) 22 | public void gracefullyHandleDisconnections2(CallbackInfo ci){ 23 | if(Methane.settings.modstate) MethaneClient.ToggleMethaneSetBool(MinecraftClient.getInstance(),true); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/GameRendererMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | 5 | import com.modrinth.methane.MethaneSettings; 6 | import net.minecraft.client.render.GameRenderer; 7 | import net.minecraft.client.render.LightmapTextureManager; 8 | import net.minecraft.client.render.MapRenderer; 9 | import org.spongepowered.asm.mixin.Final; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Shadow; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.Redirect; 15 | 16 | @Mixin(value = GameRenderer.class, priority = 400) //our priority must be lower than exordium's own priority, otherwise exordium will get very angry and crash MC. 17 | public abstract class GameRendererMixin { 18 | 19 | @Shadow @Final private LightmapTextureManager lightmapTextureManager; 20 | 21 | @Redirect(method = "renderWorld", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/LightmapTextureManager;update(F)V")) 22 | private void update(LightmapTextureManager instance, float delta) { 23 | if (Methane.ModActive) return; 24 | instance.update(delta); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/HandledScreenMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.minecraft.client.gui.DrawContext; 5 | import net.minecraft.client.gui.screen.ingame.HandledScreen; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(HandledScreen.class) 12 | public class HandledScreenMixin { 13 | 14 | // awesome one-liner that gives a neat performance boost by... destroying menu backgrounds. 15 | @Inject(method = "renderBackground", at =@At("HEAD"), cancellable = true) public void backgroundRemoval(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { if(Methane.settings.destructiveSettings.DestroyScreens) ci.cancel(); } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/LightingProviderMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.minecraft.client.MinecraftClient; 5 | import net.minecraft.scoreboard.Scoreboard; 6 | import net.minecraft.scoreboard.ScoreboardDisplaySlot; 7 | import net.minecraft.scoreboard.ScoreboardEntry; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.util.math.ChunkSectionPos; 10 | import net.minecraft.world.HeightLimitView; 11 | import net.minecraft.world.chunk.light.ChunkLightProvider; 12 | import net.minecraft.world.chunk.light.LightingProvider; 13 | import org.jetbrains.annotations.Nullable; 14 | import org.spongepowered.asm.mixin.*; 15 | import org.spongepowered.asm.mixin.injection.At; 16 | import org.spongepowered.asm.mixin.injection.Inject; 17 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 18 | 19 | @Mixin(LightingProvider.class) 20 | public abstract class LightingProviderMixin { 21 | 22 | 23 | @Shadow public abstract int doLightUpdates(); 24 | 25 | @Shadow @Final protected HeightLimitView world; 26 | 27 | @Mutable 28 | @Shadow @Final private @Nullable ChunkLightProvider blockLightProvider; 29 | 30 | @Shadow @Final private @Nullable ChunkLightProvider skyLightProvider; 31 | 32 | void FixBrokenLights(){ 33 | this.doLightUpdates(); 34 | } 35 | 36 | boolean isNotInSinglePlayer(){ // we lose out on a lot of performance, but saving is broken without it 37 | return !MinecraftClient.getInstance().isInSingleplayer(); 38 | } 39 | 40 | 41 | /** 42 | * @author AnOpenSauceDev 43 | * @reason mess with lighting updates, allowing us to "pause" lighting and save CPU time. 44 | */ 45 | @Inject(method = "doLightUpdates",at =@At("HEAD"),cancellable = true) 46 | public void doLightUpdates(CallbackInfoReturnable cir) { 47 | if(Methane.ModActive && !Methane.settings.useOldLightingEngine) 48 | cir.setReturnValue(0); 49 | } 50 | 51 | @Inject(method = "getLight", at = @At("HEAD"),cancellable = true) 52 | public void forceLight(BlockPos pos, int ambientDarkness, CallbackInfoReturnable cir){ 53 | if(Methane.ModActive) { 54 | cir.setReturnValue(15); 55 | cir.cancel(); 56 | } 57 | } 58 | 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/LightmapTextureManagerMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.modrinth.methane.util.MethaneConstants; 5 | import net.minecraft.client.render.LightmapTextureManager; 6 | import net.minecraft.network.listener.PacketListener; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Overwrite; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(LightmapTextureManager.class) 15 | public abstract class LightmapTextureManagerMixin implements PacketListener { 16 | 17 | @Shadow 18 | private float flickerIntensity; 19 | @Shadow 20 | private boolean dirty; 21 | 22 | @Shadow public abstract void disable(); 23 | 24 | @Shadow public abstract void close(); 25 | 26 | @Shadow public abstract void enable(); 27 | 28 | /** 29 | * @author AnOpenSauceDev 30 | * @reason force light to not tick. 31 | */ 32 | @Overwrite 33 | public void tick(){ 34 | if(Methane.ModActive){ 35 | //disable(); 36 | //TODO: light flicker impl 37 | this.dirty = false; 38 | return; 39 | } 40 | else 41 | { 42 | this.flickerIntensity += (float)((MethaneConstants.SharedRandom.nextFloat() - MethaneConstants.SharedRandom.nextFloat()) * MethaneConstants.SharedRandom.nextFloat() * MethaneConstants.SharedRandom.nextFloat() * 0.1); 43 | this.flickerIntensity *= 0.9f; 44 | this.dirty = true; 45 | } 46 | 47 | } 48 | 49 | @Inject(method = "update", at = @At("HEAD"),cancellable = true) 50 | public void cancel(float delta, CallbackInfo ci){ 51 | if(Methane.ModActive) ci.cancel(); 52 | 53 | } 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/MinecraftServerMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.modrinth.methane.client.MethaneClient; 5 | import net.minecraft.server.MinecraftServer; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(value = MinecraftServer.class, priority = 3000) 12 | public class MinecraftServerMixin { 13 | 14 | //fixes saving when someone ALT-F4's 15 | @Inject(method = "shutdown", at = @At("HEAD")) 16 | public void shutdownHook(CallbackInfo ci){ 17 | MethaneClient.ToggleMethaneSetBool(null,false); // forcefully shutdown Methane properly, just in case it's active. 18 | Methane.ModActive = false; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/ParticleMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | 4 | import com.modrinth.methane.Methane; 5 | import net.minecraft.client.particle.Particle; 6 | import net.minecraft.client.world.ClientWorld; 7 | import net.minecraft.util.math.Box; 8 | import org.spongepowered.asm.mixin.Final; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Overwrite; 11 | import org.spongepowered.asm.mixin.Shadow; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 15 | 16 | @Mixin(value = Particle.class,priority = 1200) 17 | public abstract class ParticleMixin { 18 | 19 | @Shadow public abstract Box getBoundingBox(); 20 | 21 | @Shadow @Final protected ClientWorld world; 22 | 23 | @Shadow private boolean stopped; 24 | 25 | @Shadow protected boolean collidesWithWorld; 26 | 27 | @Shadow @Final private static double MAX_SQUARED_COLLISION_CHECK_DISTANCE; 28 | 29 | @Shadow public abstract void setBoundingBox(Box boundingBox); 30 | 31 | @Shadow protected abstract void repositionFromBoundingBox(); 32 | 33 | @Shadow protected boolean onGround; 34 | 35 | @Shadow protected double velocityX; 36 | 37 | @Shadow protected double velocityZ; 38 | 39 | @Inject(method = "getBrightness",at = @At("HEAD"), cancellable = true) 40 | public void skipBrightnessCalc(float tint, CallbackInfoReturnable cir){ 41 | 42 | if(Methane.ModActive) cir.cancel(); // saves a lot of CPU time, probably because getting the light of hundreds of particles without *any* grouping is slow 43 | 44 | } 45 | 46 | 47 | // crashes with a handful of mods, but has a HUGE performance gain per-particle. 48 | /** 49 | * @author AnOpenSauceDev 50 | * @reason I couldn't get this to behave right, so I ruined everything 51 | */ 52 | @Overwrite 53 | public void move(double dx, double dy, double dz) { 54 | if (stopped) { 55 | return; 56 | } 57 | double d = dx; 58 | double e = dy; 59 | double f = dz; 60 | 61 | /* for some reason this saves tonnes of CPU time when it rains... 62 | if (collidesWithWorld && (dx != 0.0 || dy != 0.0 || dz != 0.0) && dx * dx + dy * dy + dz * dz < MAX_SQUARED_COLLISION_CHECK_DISTANCE && !Methane.settings.destructiveweatheroptimizations) { 63 | Vec3d vec3d = Entity.adjustMovementForCollisions(null, new Vec3d(dx, dy, dz), this.getBoundingBox(), this.world, List.of()); 64 | dx = vec3d.x; 65 | dy = vec3d.y; 66 | dz = vec3d.z; 67 | } 68 | 69 | */ 70 | if (dx != 0.0 || dy != 0.0 || dz != 0.0) { 71 | this.setBoundingBox(this.getBoundingBox().offset(dx, dy, dz)); 72 | this.repositionFromBoundingBox(); 73 | } 74 | if (Math.abs(e) >= (double)1.0E-5f && Math.abs(dy) < (double)1.0E-5f) { 75 | this.stopped = true; 76 | } 77 | boolean bl = this.onGround = e != dy && e < 0.0; 78 | if (d != dx) { 79 | this.velocityX = 0.0; 80 | } 81 | if (f != dz) { 82 | this.velocityZ = 0.0; 83 | } 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/TitleScreenMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.fabricmc.loader.api.FabricLoader; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.gui.screen.TitleScreen; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | import java.util.Locale; 13 | 14 | @Mixin(TitleScreen.class) 15 | public class TitleScreenMixin { 16 | 17 | @Inject(method = "init",at = @At("HEAD")) 18 | public void warnUserAtTitle(CallbackInfo ci){ 19 | Methane.MethaneDebugger.Log("Starting minecraft under locale: " + MinecraftClient.getInstance().getLanguageManager().getLanguage()); 20 | 21 | if(MinecraftClient.getInstance().getLanguageManager().getLanguage().toString().equals("ko_kr")){ 22 | Methane.MethaneDebugger.Log("Korean player detected!"); 23 | Methane.MethaneLogger.warn("WARNING: You are playing with the Korean localization of Minecraft! Toast removal has been disabled for Methane."); 24 | } 25 | if (FabricLoader.getInstance().isModLoaded("starlight")){ 26 | Methane.MethaneLogger.error("ERROR: Starlight is being used with Methane! Either:"); 27 | Methane.MethaneLogger.error("1) remove Starlight, or \n 2) Use Methane's Old Lighting Engine in the config."); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/ToastManagerMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.gui.DrawContext; 7 | import net.minecraft.client.toast.Toast; 8 | import net.minecraft.client.toast.ToastManager; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | @Mixin(value = ToastManager.class,priority = 4500) // take priority over other mixins (and The Open Sauce Toast Killer) 16 | public class ToastManagerMixin { // basically the entire source code of The Open Sauce Toast Killer is here. 17 | 18 | public boolean evaluateToastStatus(){ 19 | if(Methane.settings.disableToasts && !MinecraftClient.getInstance().getLanguageManager().getLanguage().toString().equals("ko_kr")){ 20 | return true; 21 | }else { 22 | return false; 23 | } 24 | } 25 | 26 | @Inject(method = "draw",at = @At("HEAD"),cancellable = true) 27 | public void killToasts(DrawContext context, CallbackInfo ci){ 28 | if(evaluateToastStatus()) ci.cancel(); 29 | } 30 | 31 | /** 32 | * @author AnOpenSauceDev 33 | * @reason try to forcefully overwrite toast behaviour 34 | */ 35 | @Inject(method = "add",at=@At("HEAD"),cancellable = true) 36 | public void add(Toast toast, CallbackInfo ci){ 37 | if(evaluateToastStatus()){ Methane.MethaneDebugger.Log("prevented a toast from loading"); ci.cancel();} 38 | } 39 | 40 | 41 | @Mixin(targets = "net.minecraft.client.toast.ToastManager$Entry") 42 | static class Entry { // inner class of ToastManager 43 | 44 | public boolean evaluateToastStatus(){ 45 | if(Methane.settings.disableToasts && !MinecraftClient.getInstance().getLanguageManager().getLanguage().toString().equals("ko_kr")){ 46 | return true; 47 | }else { 48 | return false; 49 | } 50 | } 51 | 52 | 53 | /** 54 | * @author AnOpenSauceDev 55 | * @reason remove toast rendering logic 56 | */ 57 | @Inject(method = "draw", at=@At("HEAD"),cancellable = true) 58 | public void draw(int x, DrawContext context, CallbackInfoReturnable cir) { // lie about drawing 59 | if(evaluateToastStatus()) cir.setReturnValue(true); 60 | } 61 | } 62 | 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/WorldRendererMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.minecraft.client.render.*; 5 | import org.joml.Matrix4f; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(value = WorldRenderer.class,priority = 1000) 12 | public class WorldRendererMixin { 13 | 14 | @Inject(method = "renderWeather", at = @At("HEAD"),cancellable = true) 15 | public void delWeather(LightmapTextureManager manager, float tickDelta, double cameraX, double cameraY, double cameraZ, CallbackInfo ci){ 16 | if(Methane.settings.destructiveSettings.DestroyWeather) 17 | ci.cancel(); 18 | } 19 | 20 | @Inject(method = "renderLayer", at = @At("HEAD"),cancellable = true) 21 | public void debugDeleteLayers(RenderLayer renderLayer, double x, double y, double z, Matrix4f matrix4f, Matrix4f positionMatrix, CallbackInfo ci){ 22 | 23 | if(Methane.settings.destructiveSettings.RenderLayerSkips && renderLayer.toString().contains("tripwire") /*|| renderLayer.toString().contains("cutout")*/) { 24 | Methane.MethaneDebugger.Log(renderLayer.toString()); 25 | Methane.MethaneDebugger.LogWarning("skipped renderlayer + " + renderLayer); 26 | ci.cancel(); 27 | } 28 | 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/accessor/WorldRendererBuiltChunkStorageAccessor.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin.accessor; 2 | 3 | import net.minecraft.client.render.BuiltChunkStorage; 4 | import net.minecraft.client.render.WorldRenderer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | @Mixin(WorldRenderer.class) 9 | public interface WorldRendererBuiltChunkStorageAccessor { 10 | 11 | @Accessor 12 | BuiltChunkStorage getChunks(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/getLightLevelHack/ChunkRenderReigonMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin.getLightLevelHack; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.modrinth.methane.client.BrightnessUtil; 5 | import net.minecraft.client.render.chunk.ChunkRendererRegion; 6 | import net.minecraft.util.math.Direction; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | import static com.modrinth.methane.client.BrightnessUtil.calculateBrightnessScale; 13 | 14 | @Mixin(ChunkRendererRegion.class) 15 | public class ChunkRenderReigonMixin { 16 | 17 | 18 | //impl. of: BlockRenderView$getBrightness 19 | @Inject(method = "getBrightness", at = @At("HEAD"), cancellable = true) 20 | public void MethaneSetCustomLightLevel(Direction direction, boolean shaded, CallbackInfoReturnable cir){ 21 | if(Methane.ModActive && Methane.settings.dynamicShading) { 22 | cir.setReturnValue(Math.min(BrightnessUtil.grabBaseGamma() * calculateBrightnessScale(),1)); // only gets darker, never brighter. 1.0F = fully lit. 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/getLightLevelHack/ClientWorldMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin.getLightLevelHack; 2 | 3 | import com.modrinth.methane.Methane; 4 | import com.modrinth.methane.client.BrightnessUtil; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.world.ClientWorld; 7 | import net.minecraft.util.math.Direction; 8 | import org.spongepowered.asm.mixin.Final; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | import static com.modrinth.methane.client.BrightnessUtil.calculateBrightnessScale; 16 | 17 | @Mixin(ClientWorld.class) 18 | public class ClientWorldMixin { 19 | 20 | //TODO: lerp brightness to be less jarring 21 | 22 | 23 | 24 | @Inject(method = "getBrightness", at = @At("HEAD"), cancellable = true) 25 | public void MethaneSetCustomLightLevel(Direction direction, boolean shaded, CallbackInfoReturnable cir){ 26 | if(Methane.ModActive && Methane.settings.dynamicShading) { 27 | cir.setReturnValue(Math.min(BrightnessUtil.grabBaseGamma() * calculateBrightnessScale(),1)); // only gets darker, never brighter. 1.0F = fully lit. 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/getLightLevelHack/MushroomPlantMixin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin.getLightLevelHack; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.minecraft.block.BlockState; 5 | import net.minecraft.block.MushroomPlantBlock; 6 | import net.minecraft.registry.tag.BlockTags; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.WorldView; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Redirect; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | @Mixin(MushroomPlantBlock.class) 15 | public class MushroomPlantMixin { 16 | 17 | @Redirect(method = "canPlaceAt", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/WorldView;getBaseLightLevel(Lnet/minecraft/util/math/BlockPos;I)I")) 18 | public int canPlaceAt(WorldView instance, BlockPos blockPos, int i) { 19 | if(Methane.ModActive){ 20 | return 0; 21 | }else { 22 | return instance.getBaseLightLevel(blockPos,i); 23 | } 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/plugin/MethaneMixinPlugin.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.mixin.plugin; 2 | 3 | import com.github.anopensaucedev.libmcdevfabric.Debug; 4 | import com.github.anopensaucedev.libmcdevfabric.Libmcdev; 5 | import com.modrinth.methane.Methane; 6 | import net.fabricmc.loader.api.FabricLoader; 7 | import org.objectweb.asm.tree.ClassNode; 8 | import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; 9 | import org.spongepowered.asm.mixin.extensibility.IMixinInfo; 10 | 11 | import java.util.List; 12 | import java.util.Objects; 13 | import java.util.Set; 14 | 15 | public class MethaneMixinPlugin implements IMixinConfigPlugin { 16 | @Override 17 | public void onLoad(String mixinPackage) { 18 | 19 | } 20 | 21 | @Override 22 | public String getRefMapperConfig() { 23 | return null; 24 | } 25 | 26 | @Override 27 | public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { 28 | if(Objects.equals(mixinClassName, "com.modrinth.methane.mixin.ParticleMixin") && FabricLoader.getInstance().isModLoaded("ironsspellbooks")){ 29 | Methane.MethaneLogger.error("Disabling Methane's Particle Optimization Mixin due to Iron's Spellbooks being installed!"); 30 | return false; 31 | } 32 | if(Objects.equals(mixinClassName, "com.modrinth.methane.mixin.ParticleMixin") && FabricLoader.getInstance().isModLoaded("ichor")){ 33 | Methane.MethaneLogger.error("Disabling Methane's Particle Optimization Mixin due to Ichor (Lunar Client)'s game-breaking particle mixin"); 34 | return false; 35 | } 36 | if(Objects.equals(mixinClassName, "com.modrinth.methane.mixin.ToastManagerMixin") && FabricLoader.getInstance().isModLoaded("toastkiller")){ 37 | Methane.MethaneLogger.warn("Overriding Methane's toast handler to use The Open Sauce Toast Killer."); 38 | return false; 39 | } 40 | return true; 41 | } 42 | 43 | @Override 44 | public void acceptTargets(Set myTargets, Set otherTargets) { 45 | 46 | } 47 | 48 | @Override 49 | public List getMixins() { 50 | return null; 51 | } 52 | 53 | @Override 54 | public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { 55 | 56 | } 57 | 58 | @Override 59 | public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { 60 | 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/mixin/readme.md: -------------------------------------------------------------------------------- 1 | # Mixin package 2 | 3 | half the stuff here is lazily thrown together mixin `@overwrite`s and `@inject`s. 4 | 5 | It's a genuine miracle any of this stuff works without breaking every mod that touches this stuff. -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/readme.md: -------------------------------------------------------------------------------- 1 | # Methane package 2 | 3 | Hey there! Here is some basic documentation of how everything is laid out in Methane. 4 | 5 | everything in this package is either: 6 | - Core registration logic for Methane 7 | - Integrations with other mod libraries (Mod Menu, Cloth Config, etc.) -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/server/MethaneServerError.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.server; 2 | 3 | import com.modrinth.methane.Methane; 4 | import net.fabricmc.api.DedicatedServerModInitializer; 5 | import net.fabricmc.loader.api.FabricLoader; 6 | 7 | public class MethaneServerError implements DedicatedServerModInitializer { 8 | @Override 9 | public void onInitializeServer() { // Methane Server Utils might load after Methane due to how the Fabric Loader works (meaning that the wrong message will pop up), but this still gets the message across. 10 | 11 | Methane.MethaneLogger.error("----------------------------------### WARNING! Please read! ###----------------------------------------"); 12 | 13 | if(!FabricLoader.getInstance().isModLoaded("methane_server")) { // if Methane Server Utils is not installed. 14 | Methane.MethaneLogger.error("Methane is only meant to run on the client, did you mean to use Methane Server Utils?"); 15 | Methane.MethaneLogger.error("Get Methane Server Utils at: https://modrinth.com/mod/methane-server-utilities"); 16 | }else { // If Methane Server Utils is installed 17 | 18 | Methane.MethaneLogger.error("Methane Server Utils is installed on the server, but so is Methane!"); 19 | Methane.MethaneLogger.error("Methane is not designed to run on the server, Methane Server Utils is meant to."); 20 | Methane.MethaneLogger.error("Please remove Methane from your server's mods list if you can."); 21 | } 22 | Methane.MethaneLogger.error("Methane (not Methane Server Utils) may or may not cause instability on the server, as it's designed for use on the **client** only."); 23 | Methane.MethaneLogger.error("----------------------------------### End of scary warning. ###----------------------------------------"); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/server/README.MD: -------------------------------------------------------------------------------- 1 | # Methane Server package 2 | 3 | Houses all the logic for letting server owners know that Methane is not meant for servers, 4 | and to use Methane Server Utils. -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/util/MethaneConstants.java: -------------------------------------------------------------------------------- 1 | package com.modrinth.methane.util; 2 | 3 | import net.minecraft.util.Identifier; 4 | 5 | import java.util.Random; 6 | import java.util.concurrent.ThreadLocalRandom; 7 | 8 | public class MethaneConstants { 9 | 10 | public static final String MOD_NAME = "Methane"; 11 | 12 | //public static final Identifier METHANE_STATE_PACKET = new Identifier("methane_server","statepacket"); 13 | 14 | // public static final Identifier METHANE_RESP_PACKET = new Identifier("methane_server","pong"); 15 | 16 | public static ThreadLocalRandom SharedRandom = ThreadLocalRandom.current(); 17 | 18 | } 19 | 20 | -------------------------------------------------------------------------------- /src/main/java/com/modrinth/methane/util/readme.md: -------------------------------------------------------------------------------- 1 | # Utils package 2 | 3 | Mainly stuff from libMCdev that I'm too lazy to use properly integrate right now. 4 | The debug features are pretty cool though! -------------------------------------------------------------------------------- /src/main/resources/assets/methane/Methane-logo-Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AnOpenSauceDev/Methane-mod/7e9d7e9b7673294be1fe301c7c893cb5a867a66d/src/main/resources/assets/methane/Methane-logo-Large.png -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/de_de.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane aktiviert. Starte Minecraft neu um die Änderungen zu sehen.", 3 | "methane.offline": "Methane offline. Tritt dem Server erneut bei, um die Änderungen zu sehen.", 4 | "key.methane.toggle": "Methane An/Aus", 5 | "category.methane.keys": "Methane", 6 | "text.autoconfig.methane.option.disableAirFog": "Deaktiviere Nebel in der Luft", 7 | "text.autoconfig.methane.option.disableWaterFog": "Deaktiviere Nebel in Wasser", 8 | "text.autoconfig.methane.option.disableLavaFog": "Deaktiviere Nebel in Lava", 9 | "text.autoconfig.methane.option.disablePowderedSnowFog": "Deaktiviere Nebel in Pulverschnee", 10 | "text.autoconfig.methane.option.disableThickFog": "Deaktiviere Nebel im Nether", 11 | "text.autoconfig.methane.option.disableSkyFog": "Deaktiviere Nebel im Himmel", 12 | "text.autoconfig.methane.option.persistFogSettings": "Behalte Nebeländerungen beim deaktivieren von Methane?" 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/en_au.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane activated!", 3 | "methane.offline": "Methane disabled!", 4 | "key.methane.toggle": "Toggle Methane", 5 | "text.autoconfig.methane.option.useOldLightingEngine": "Use Legacy lighting engine?", 6 | "category.methane.keys": "Methane Keybinds", 7 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "Disable Air Fog", 8 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "Disable Underwater Fog", 9 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "Disable Lava Fog", 10 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "Disable Powdered Snow Fog", 11 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "Disable Nether Fog", 12 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "Disable Sky Fog", 13 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "Persist Fog?", 14 | "text.autoconfig.methane.option.dynamicShading": "Enable Dynamic Shading?", 15 | "text.autoconfig.methane.option.fogSettings": "Fog Overrides", 16 | "text.autoconfig.methane.option.modstate": "Start with Methane on? ", 17 | "text.autoconfig.methane.option.brightness": "(experimental) Default terrain brightness: ", 18 | "text.autoconfig.methane.option.hudrender": "Render Status on HUD? ", 19 | "text.autoconfig.methane.option.disableToasts": "Disable Toasts", 20 | "text.autoconfig.methane.option.rebuildSeconds": "Shading Rebuild Time", 21 | "methane.serverpopup.settings": "Methane Server Settings", 22 | "methane.serverpopup.info": "This server recommends certain methane settings. You can choose whether to follow these settings or not.", 23 | "methane.reject": "Reject server config.", 24 | "methane.accept": "Accept server config.", 25 | "methane.yes": "Yes", 26 | "methane.no": "No", 27 | "text.autoconfig.methane.title": "Methane Settings", 28 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Destructive Weather Optimisations", 29 | "text.autoconfig.methane.option.destructiveSettings": "Destructive Methane Settings", 30 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Destroy Sky", 31 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Destroy Weather", 32 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Disable String Renderer", 33 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Remove HUD background Renderer" 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane activated!", 3 | "methane.offline": "Methane disabled!", 4 | "key.methane.toggle": "Toggle Methane", 5 | "category.methane.keys": "Methane Keybinds", 6 | "text.autoconfig.methane.option.useOldLightingEngine": "Use Legacy lighting engine?", 7 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "Disable Air Fog", 8 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "Disable Underwater Fog", 9 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "Disable Lava Fog", 10 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "Disable Powdered Snow Fog", 11 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "Disable Nether Fog", 12 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "Disable Sky Fog", 13 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "Persist Fog?", 14 | "text.autoconfig.methane.option.dynamicShading": "Enable Dynamic Shading?", 15 | "text.autoconfig.methane.option.fogSettings": "Fog Overrides", 16 | "text.autoconfig.methane.option.modstate": "Start with Methane on? ", 17 | "text.autoconfig.methane.option.brightness": "(experimental) Default terrain brightness: ", 18 | "text.autoconfig.methane.option.hudrender": "Render Status on HUD? ", 19 | "text.autoconfig.methane.option.disableToasts": "Disable Toasts", 20 | "text.autoconfig.methane.option.rebuildSeconds": "Shading Rebuild Time", 21 | "methane.serverpopup.settings": "Methane Server Settings", 22 | "methane.serverpopup.info": "This server recommends certain methane settings. You can choose whether to follow these settings or not.", 23 | "methane.reject": "Reject server config.", 24 | "methane.accept": "Accept server config.", 25 | "methane.yes": "Yes", 26 | "methane.no": "No", 27 | "text.autoconfig.methane.title": "Methane Settings", 28 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Destructive Weather Optimizations", 29 | "text.autoconfig.methane.option.destructiveSettings": "Destructive Methane Settings", 30 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Destroy Sky", 31 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Destroy Weather", 32 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Disable String Renderer", 33 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Remove HUD background Renderer" 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/fr_fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane activé, veuillez rejoindre votre monde pour qu'il puisse prendre effet", 3 | "methane.offline": "Methane désactivé, veuillez rejoindre votre monde pour qu'il puisse prendre effet complètement", 4 | "key.methane.toggle": "Activer/désactiver Methane", 5 | "category.methane.keys": "Contrôles de Methane", 6 | "text.autoconfig.methane.option.disableAirFog": "Désactiver le brouillard", 7 | "text.autoconfig.methane.option.disableWaterFog": "Désactiver le brouillard sous l'eau", 8 | "text.autoconfig.methane.option.disableLavaFog": "Désactiver le brouillard sous la lave", 9 | "text.autoconfig.methane.option.disablePowderedSnowFog": "Désactiver le brouillard dans la neige poudreuse", 10 | "text.autoconfig.methane.option.disableThickFog": "Désactiver le brouillard dans le Nether", 11 | "text.autoconfig.methane.option.disableSkyFog": "Désactiver le brouillard aérien", 12 | "text.autoconfig.methane.option.persistFogSettings": "Brouillard persistant ?", 13 | "text.autoconfig.methane.option.modstate": "Démarrer avec Methane activé ? ", 14 | "text.autoconfig.methane.option.brightness": "(expérimental) Luminosité par défaut du terrain: ", 15 | "text.autoconfig.methane.option.hudrender": "Status du rendu sur l'HUD? " 16 | } -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/it_it.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane attivato!", 3 | "methane.offline": "Methane disattivato!", 4 | "key.methane.toggle": "Attiva/Disattiva Methane", 5 | "category.methane.keys": "Sbbinamento tasti Methane", 6 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "Disabilita Fog dell'Aria", 7 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "Disabilita Fog Sott'acqua", 8 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "Disabilita Fog nella Lava", 9 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "Disabilita Fog nella Neve Nevosa", 10 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "Disabilita Fog nel Nether", 11 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "Disabilita Fog nel Cielo", 12 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "Fog Persistente?", 13 | "text.autoconfig.methane.option.fogSettings": "Sovrascrivi Fog ", 14 | "text.autoconfig.methane.option.modstate": "Avvia Minecraft con Methane Attivo? ", 15 | "text.autoconfig.methane.option.brightness": "(Sperimentale) Luminosità predefinita del Terreno: ", 16 | "text.autoconfig.methane.option.hudrender": "Mostra lo stato sulla HUD? ", 17 | "methane.reject": "Rifiuta configurazione server.", 18 | "methane.accept": "Accetta configurazione server.", 19 | "methane.yes": "Si", 20 | "methane.no": "No", 21 | "text.autoconfig.methane.title": "Impostazioni Methane", 22 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Ottimizzazioni meteo distruttive", 23 | "text.autoconfig.methane.option.destructiveSettings": "Ottimizzazioni di Methane distruttive", 24 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Distruggi Cielo", 25 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Distruggi Meteo", 26 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Disabilita render stringhe", 27 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Rimuovi renderer dello sfondo dell'HUD" 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/ko_kr.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane이 활성화되었습니다. 이를 적용하려면 세계를 다시 들어오세요.", 3 | "methane.offline": "Methane이 비활성화되었습니다. 이를 완전히 적용하려면 세계를 다시 들어오세요.", 4 | "key.methane.toggle": "Methane 전환", 5 | "category.methane.keys": "Methane 키 설정", 6 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "공기 안개 비활성화", 7 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "수중 안개 비활성화", 8 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "용암 안개 비활성화", 9 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "분말 눈 안개 비활성화", 10 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "지옥 안개 비활성화", 11 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "하늘 안개 비활성화", 12 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "안개 설정 유지?", 13 | "text.autoconfig.methane.option.fogSettings": "안개 재정의", 14 | "text.autoconfig.methane.option.modstate": "Methane 켜고 시작하기? ", 15 | "text.autoconfig.methane.option.brightness": "(실험적) 기본 지형 밝기: ", 16 | "text.autoconfig.methane.option.hudrender": "HUD에 상태 렌더링? ", 17 | "methane.reject": "서버 설정 거부.", 18 | "methane.accept": "서버 설정 수락.", 19 | "methane.yes": "예", 20 | "methane.no": "아니요", 21 | "text.autoconfig.methane.title": "Methane 설정", 22 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "파괴적 날씨 최적화", 23 | "text.autoconfig.methane.option.destructiveSettings": "파괴적 Methane 설정", 24 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "하늘 파괴", 25 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "날씨 파괴", 26 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "스트링 렌더러 비활성화" 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/lol_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "category.methane.keys": "methane buttonz", 3 | "key.methane.toggle": "toggle Methane 0_0", 4 | "methane.accept": "Yes plz", 5 | "methane.active": "methane haz activated!", 6 | "methane.no": "No", 7 | "methane.offline": "methane haz disabled! O_O", 8 | "methane.reject": "NO WAYZ!!!", 9 | "methane.serverpopup.info": "This server recommends certain methane settings. You can choose whether to follow these settings or not.", 10 | "methane.serverpopup.settings": "Methane Server Settings", 11 | "methane.yes": "Yes", 12 | "text.autoconfig.methane.option.brightness": "wait is this setting even used ingame?!?", 13 | "text.autoconfig.methane.option.destructiveSettings": "explosive settingz O_O", 14 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "remove backgroundz", 15 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "DESTROY THE MOON!!121!!", 16 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "DESTROY Weather EVEN MORE!!!@##41?2!@! WOW!", 17 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "remove yarn from teh game ;(", 18 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "DESTROY Weather!!!", 19 | "text.autoconfig.methane.option.disableToasts": "remowve ugly Toastz!", 20 | "text.autoconfig.methane.option.dynamicShading": "Magically lighwt worldz?", 21 | "text.autoconfig.methane.option.rebuildSeconds": "timez to change shadez", 22 | "text.autoconfig.methane.option.fogSettings": "fog stuffz", 23 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "disabel Air fogz", 24 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "disabel Lava fogz", 25 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "Disabel Powdered Snow fogz", 26 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "Disabel sky fogz", 27 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "disabel yucky fogz", 28 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "disabel water fogz", 29 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "keepz da fogz?", 30 | "text.autoconfig.methane.option.hudrender": "Flashbang user.", 31 | "text.autoconfig.methane.option.modstate": "startz wit methane on? ", 32 | "text.autoconfig.methane.option.useOldLightingEngine": "can haz old Methane?", 33 | "text.autoconfig.methane.title": "methane boring stuffz" 34 | } -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/pt_br.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane ativado!", 3 | "methane.offline": "Methane desabilitado!", 4 | "key.methane.toggle": "Alternar Methane", 5 | "category.methane.keys": "Methane teclas de atalho", 6 | "text.autoconfig.methane.option.useOldLightingEngine": "Usar o mecanismo de iluminação antigo?", 7 | "text.autoconfig.methane.option.disableAirFog": "Desativar névoa no Horizonte", 8 | "text.autoconfig.methane.option.disableWaterFog": "Desativar névoa Subaquática", 9 | "text.autoconfig.methane.option.disableLavaFog": "Desativar névoa da Lava ", 10 | "text.autoconfig.methane.option.disablePowderedSnowFog": "Desativar névoa de Neve Fofa", 11 | "text.autoconfig.methane.option.disableThickFog": "Desativar névoa do nether", 12 | "text.autoconfig.methane.option.disableSkyFog": "Desativar névoa do Céu", 13 | "text.autoconfig.methane.option.persistFogSettings": "Névoa persistente?", 14 | "text.autoconfig.methane.option.modstate": "Comece com Methane Ligado?", 15 | "text.autoconfig.methane.option.brightness": "(experimental) Brilho Padrão do Terreno:", 16 | "text.autoconfig.methane.option.hudrender": "Status de Eenderização no HUD?", 17 | "methane.reject": "Reject server config.", 18 | "methane.accept": "Accept server config.", 19 | "methane.yes": "Sim", 20 | "methane.no": "Não", 21 | "text.autoconfig.methane.title": "Configurações de Methane", 22 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Otimizações destrutivas do clima", 23 | "text.autoconfig.methane.option.destructiveSettings": "Otimizações destrutivas de Methane", 24 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Destruir Sky", 25 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Destruir Weather", 26 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Desativar renderizador de string", 27 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Remover o renderizador de fundo do HUD" 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/pt_pt.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane ativado!", 3 | "methane.offline": "Methane desativado!", 4 | "key.methane.toggle": "Alternar Methane", 5 | "category.methane.keys": "Teclas de atalho de Methane", 6 | "text.autoconfig.methane.option.useOldLightingEngine": "Usar o método de iluminação antigo?", 7 | "text.autoconfig.methane.option.disableAirFog": "Desativar névoa de ar", 8 | "text.autoconfig.methane.option.disableWaterFog": "Desativar névoa subaquática", 9 | "text.autoconfig.methane.option.disableLavaFog": "Desativar névoa da lava", 10 | "text.autoconfig.methane.option.disablePowderedSnowFog": "Desativar névoa de neve", 11 | "text.autoconfig.methane.option.disableThickFog": "Desativar névoa do nether", 12 | "text.autoconfig.methane.option.disableSkyFog": "Desativar névoa do Céu", 13 | "text.autoconfig.methane.option.persistFogSettings": "Névoa persistente?", 14 | "text.autoconfig.methane.option.fogSettings": "Substituições de névoa", 15 | "text.autoconfig.methane.option.modstate": "Começar com Methane ligado?", 16 | "text.autoconfig.methane.option.brightness": "Brilho padrão do Terreno (experimental):", 17 | "text.autoconfig.methane.option.hudrender": "Renderizar estado no ecrã?", 18 | "methane.reject": "Rejeitar configuração do servidor.", 19 | "methane.accept": "Aceitar configuração do servidor.", 20 | "methane.yes": "Sim", 21 | "methane.no": "Não", 22 | "text.autoconfig.methane.title": "Definições de Methane", 23 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Otimizações destrutivas do clima", 24 | "text.autoconfig.methane.option.destructiveSettings": "Otimizações destrutivas de Methane", 25 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Destruir sky", 26 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Destruir clima", 27 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Desativar renderizador de fio", 28 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Remover renderizador de fundo do HUD" 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/ru_ru.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Метан активирован", 3 | "methane.offline": "Метан отключен!", 4 | "key.methane.toggle": "Переключить Метан", 5 | "category.methane.keys": "Комбинации клавиш Метана", 6 | "text.autoconfig.methane.option.useOldLightingEngine": "Использовать устаревший движок освещения?", 7 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "Отключить воздушный туман", 8 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "Отключить подводный туман", 9 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "Отключить лавовый туман", 10 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "Отключить туман рыхлого снега", 11 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "Отключить незерский туман", 12 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "Отключить небесный туман", 13 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "Постоянство тумана?", 14 | "text.autoconfig.methane.option.dynamicShading": "Включить динамическое затенение?", 15 | "text.autoconfig.methane.option.fogSettings": "Переопределения тумана", 16 | "text.autoconfig.methane.option.modstate": "Начинать с включения Метана? ", 17 | "text.autoconfig.methane.option.brightness": "(экспериментальная) Яркость местности по умолчанию: ", 18 | "text.autoconfig.methane.option.hudrender": "Отображать статус в интерфейсе? ", 19 | "text.autoconfig.methane.option.disableToasts": "Отключить всплывающие подсказки", 20 | "text.autoconfig.methane.option.rebuildSeconds": "Время восстановления затенения", 21 | "methane.serverpopup.settings": "Серверные настройки Метана", 22 | "methane.serverpopup.info": "Этот сервер рекомендует определенные настройки Метана. Вы можете выбрать, следовать этим настройкам или нет.", 23 | "methane.reject": "Отклонить настройку сервера.", 24 | "methane.accept": "Принять настройку сервера.", 25 | "methane.yes": "Да", 26 | "methane.no": "Нет", 27 | "text.autoconfig.methane.title": "Настройки Метана", 28 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "Оптимизация разрушительных погодных условий", 29 | "text.autoconfig.methane.option.destructiveSettings": "Разрушительные настройки Метана", 30 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "Уничтожить небо", 31 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "Уничтожить погоду", 32 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "Отключить средство отображения строк", 33 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "Удалить отображение фона интерфейса" 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/assets/methane/lang/zh_tw.json: -------------------------------------------------------------------------------- 1 | { 2 | "methane.active": "Methane 已啟用!", 3 | "methane.offline": "Methane 已停用!", 4 | "key.methane.toggle": "切換Methane ", 5 | "category.methane.keys": "Methane 按鍵綁定", 6 | "text.autoconfig.methane.option.useOldLightingEngine": "使用舊版光照引擎?", 7 | "text.autoconfig.methane.option.fogSettings.disableAirFog": "停用空氣霧", 8 | "text.autoconfig.methane.option.fogSettings.disableWaterFog": "停用水下霧", 9 | "text.autoconfig.methane.option.fogSettings.disableLavaFog": "停用岩漿霧", 10 | "text.autoconfig.methane.option.fogSettings.disablePowderedSnowFog": "停用粉雪霧", 11 | "text.autoconfig.methane.option.fogSettings.disableThickFog": "停用地獄霧", 12 | "text.autoconfig.methane.option.fogSettings.disableSkyFog": "停用天空霧", 13 | "text.autoconfig.methane.option.fogSettings.persistFogSettings": "保留霧設定?", 14 | "text.autoconfig.methane.option.dynamicShading": "啟用動態陰影?", 15 | "text.autoconfig.methane.option.fogSettings": "霧覆蓋", 16 | "text.autoconfig.methane.option.modstate": "啟動時啟用 Methane?", 17 | "text.autoconfig.methane.option.brightness": "(實驗性) 預設地形亮度:", 18 | "text.autoconfig.methane.option.hudrender": "在 HUD 上渲染狀態?", 19 | "text.autoconfig.methane.option.disableToasts": "停用提示資訊", 20 | "text.autoconfig.methane.option.rebuildSeconds": "陰影重建時間", 21 | "methane.serverpopup.settings": "Methane 伺服器設定", 22 | "methane.serverpopup.info": "此伺服器推薦特定的 Methane 設定。您可以選擇是否遵循這些設定。", 23 | "methane.reject": "拒絕伺服器配置。", 24 | "methane.accept": "接受伺服器配置。", 25 | "methane.yes": "是", 26 | "methane.no": "否", 27 | "text.autoconfig.methane.title": "Methane 設定", 28 | "text.autoconfig.methane.option.destructiveSettings.destructiveweatheroptimizations": "破壞性天氣最佳化", 29 | "text.autoconfig.methane.option.destructiveSettings": "破壞性 Methane 設定", 30 | "text.autoconfig.methane.option.destructiveSettings.DestroySky": "摧毀天空", 31 | "text.autoconfig.methane.option.destructiveSettings.DestroyWeather": "摧毀天氣", 32 | "text.autoconfig.methane.option.destructiveSettings.RenderLayerSkips": "停用字串渲染器", 33 | "text.autoconfig.methane.option.destructiveSettings.DestroyScreens": "移除 HUD 背景渲染器" 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/fabric.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schemaVersion": 1, 3 | "id": "methane", 4 | "version": "${version}", 5 | "name": "Methane", 6 | "description": "Explosive optimisations for your favourite block game.", 7 | "authors": ["AnOpenSauceDev"], 8 | "contact": { 9 | "issues": "https://github.com/AnOpenSauceDev/Methane-mod/issues" 10 | }, 11 | "license": "MIT", 12 | "icon": "assets/methane/Methane-logo-Large.png", 13 | "environment": "client", 14 | "entrypoints": { 15 | "main": [ 16 | "com.modrinth.methane.Methane" 17 | ], 18 | "client": [ 19 | "com.modrinth.methane.client.MethaneClient" 20 | ], 21 | "server": [ 22 | "com.modrinth.methane.server.MethaneServerError" 23 | ], 24 | "modmenu": [ 25 | "com.modrinth.methane.ModMenuIntegration" 26 | ] 27 | }, 28 | "mixins": [ 29 | "methane.mixins.json" 30 | ], 31 | "depends": { 32 | "cloth-config": "*", 33 | "fabricloader": ">=0.14.0", 34 | "minecraft": ">=1.20.2" 35 | }, 36 | "suggests": { 37 | "methane_server": "*" 38 | }, 39 | "recommends": { 40 | "modmenu": "*" 41 | }, 42 | "conflicts": { 43 | "starlight": "*" 44 | }, 45 | "contributors": [ 46 | "JustAlittleWolf","FITFC","craftish37","rebub","TheBossMagnus","ItsRedlyXD" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /src/main/resources/methane.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "com.modrinth.methane.mixin", 5 | "compatibilityLevel": "JAVA_17", 6 | "mixins": [ 7 | "BackgroundRendererMixin", 8 | "ChunkLightProviderMixin", 9 | "GameRendererMixin", 10 | "LightingProviderMixin", 11 | "LightmapTextureManagerMixin", 12 | "MinecraftServerMixin", 13 | "getLightLevelHack.MushroomPlantMixin" 14 | ], 15 | "plugin": "com.modrinth.methane.mixin.plugin.MethaneMixinPlugin", 16 | "client": [ 17 | "BackgroundRendererMixin", 18 | "DestructiveWeatherOptimisation", 19 | "GameMenuScreenMixin", 20 | "GameRendererMixin", 21 | "HandledScreenMixin", 22 | "LightmapTextureManagerMixin", 23 | "ParticleMixin", 24 | "TitleScreenMixin", 25 | "ToastManagerMixin", 26 | "WorldRendererMixin", 27 | "accessor.WorldRendererBuiltChunkStorageAccessor", 28 | "getLightLevelHack.ChunkRenderReigonMixin", 29 | "getLightLevelHack.ClientWorldMixin" 30 | ], 31 | "injectors": { 32 | "defaultRequire": 1 33 | } 34 | } 35 | --------------------------------------------------------------------------------