vanilla-fixes

Minecraft: Better than Adventure! mod that fixes some issues
git clone git://memoryshards.xyz/vanilla-fixes.git
Log | Files | Refs | README | LICENSE

commit b39b034dd37521b345d78bce445bc7e4f054538d
parent dd38d444f29d8e20f66dfde43e3466ecc587d763
Author: Amb0s <ambos@disroot.org>
Date:   Thu,  3 Nov 2022 01:06:35 +0100

Changed Gradle configuration

Diffstat:
MREADME.md | 28++++++++++++++--------------
Mbuild.gradle | 86+++++++++++++++++++++++++++++++++++++++----------------------------------------
Mgradle.properties | 3+++
Mgradle/wrapper/gradle-wrapper.properties | 2+-
Mgradlew | 0
Alibs/IMPORTANT.md | 8++++++++
Dlibs/important.txt | 1-
Asrc/main/java/ambos/vanillafixes/VanillaFixes.java | 19+++++++++++++++++++
Msrc/main/resources/fabric.mod.json | 14+++++++++++++-
Rsrc/main/resources/assets/vanillafixes/icon.png -> src/main/resources/icon.png | 0
Msrc/main/resources/vanillafixes.mixins.json | 30+++++++++++++++---------------
11 files changed, 115 insertions(+), 76 deletions(-)

diff --git a/README.md b/README.md @@ -1,6 +1,7 @@ # Vanilla Fixes ## Fixes + * Sounds * Jittering * Score display @@ -9,35 +10,34 @@ ## Installation 1. Install [MultiMC](https://multimc.org/) or [PolyMC](https://polymc.org/) -2. Install Babric [PolyMC/MultiMC instance](https://github.com/babric/polymc-instance) -3. Download the "Better than Adventure!" mod -4. Install it as a jar mod and make sure BTA is above Babric but below Minecraft -5. Select Fabric Loader and click "Edit" -6. Remove the whole "requires" block from the JSON, so intermediaries can be deleted -7. Save the JSON file and close it, then remove the intermediaries from the instance. -8. Download the "Vanilla Fixes" jar file -9. Copy it in your mods directory. +2. Download the BTA! Babric [instance](https://drive.google.com/file/d/1V6nHw_uErtckjTWjfbmX2_qebeTXLbQV/view) +3. Import the instance into your launcher +4. Download the "Vanilla Fixes" jar file +5. Copy it into your mods directory. ## Development ### Setup -1. Grab a "Better than Adventure!" jar from the PolyMC/MultiMC instance and rename it to "bta.jar". -2. Place the jar in the "libs" folder in your project. -3. Build the mod with `./gradlew build` +1. Download or clone this repository +2. Follow the instructions for the [BTA Minimal Example Mod](https://github.com/azurelmao/bta-babric-minimal-example-mod) -### Tips +### Tip(s) * Since BTA is distributed without obfuscation, all Mixin classes must set the "remap" option to false. -* To decompile the whole "bta.jar" file, use [RetroMCP-Java](https://github.com/MCPHackers/RetroMCP-Java). +* ... ### Documentation + * [Fabric Wiki](https://fabricmc.net/wiki/doku.php) * [Mixin javadoc](https://jenkins.liteloader.com/view/Other/job/Mixin/javadoc/index.html) * [Mixin cheatsheet](https://github.com/2xsaiko/mixin-cheatsheet/blob/master/README.md) * [Cursed Legacy Wiki](https://minecraft-cursed-legacy.github.io/wiki/index.html) ### Example mods -* [BTA Example Mod for Babric](https://github.com/pkstDev/BTAExampleMod-babric) + +* [BTA Minimal Example Mod for Babric](https://github.com/azurelmao/bta-babric-minimal-example-mod) +* [BTA Example Mod for Babric](https://github.com/azurelmao/bta-babric-example-mod) +* [Old BTA Example Mod for Babric](https://github.com/pkstDev/BTAExampleMod-babric) * [Fabric Example Mod with StationAPI and BIN Mappings](https://github.com/calmilamsy/stationapi-example-mod/tree/dev/12) * [Minecraft Cursed Legacy Example Mod](https://github.com/minecraft-cursed-legacy/Example-Mod) \ No newline at end of file diff --git a/build.gradle b/build.gradle @@ -1,52 +1,58 @@ plugins { - id 'com.github.johnrengelman.shadow' version '7.1.2' - id 'java' + id 'babric-loom' version '0.12-SNAPSHOT' + id 'java' } -// No babric loom here group = project.mod_group archivesBaseName = project.mod_name version = project.mod_version +loom { + gluedMinecraftJar() + noIntermediateMappings() + customMinecraftManifest.set("https://github.com/azurelmao/bta-manifest-repo/releases/download/v1.7.6.2_02/1.7.6.2_02.json") +} + repositories { - mavenCentral() - maven { - name = 'Babric' - url = 'https://maven.glass-launcher.net/babric' - } - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' - } + mavenCentral() + maven { + name = 'Babric' + url = 'https://maven.glass-launcher.net/babric' + } + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + ivy { + url = "https://github.com/Better-than-Adventure" + patternLayout { + artifact("[organisation]/releases/download/v[revision]/[module].jar") + m2compatible = true + } + metadataSources { artifact() } + } } -// We use shadow here to avoid the following dependencies being shadowed. -// If you want to add your own dependency, you should also use 'shadow' most of the time. -// Yet, if you want to include your dependency, use normal 'implementation' instead. dependencies { - shadow "org.ow2.asm:asm:${project.asm_version}" - shadow "org.ow2.asm:asm-analysis:${project.asm_version}" - shadow "org.ow2.asm:asm-commons:${project.asm_version}" - shadow "org.ow2.asm:asm-tree:${project.asm_version}" - shadow "org.ow2.asm:asm-util:${project.asm_version}" + minecraft "bta-download-repo:bta:${project.bta_version}" + mappings loom.layered() {} - shadow("net.fabricmc:sponge-mixin:${project.mixin_version}") { - exclude module: 'launchwrapper' - exclude module: 'guava' - } + modRuntimeOnly files("libs/minecraft-client-base.jar") // only used to fix the Client run configuration + modImplementation "babric:fabric-loader:${project.loader_version}" - shadow "babric:fabric-loader:${project.loader_version}" + modImplementation "org.slf4j:slf4j-api:1.8.0-beta4" + modImplementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0" - shadow files('libs/bta.jar') + modImplementation("org.apache.commons:commons-lang3:3.12.0") + include("org.apache.commons:commons-lang3:3.12.0") - shadow "org.slf4j:slf4j-api:1.8.0-beta4" - shadow 'org.apache.logging.log4j:log4j-slf4j18-impl:2.17.2' + modImplementation files("libs/halplibe-1.0.0.jar") } java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 - withSourcesJar() + withSourcesJar() } tasks.withType(JavaCompile) { @@ -54,23 +60,15 @@ tasks.withType(JavaCompile) { } jar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}" } - } + from("LICENSE") { + rename { "${it}_${archivesBaseName}" } + } } -shadowJar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}" } - } -} - -jar.finalizedBy tasks.shadowJar - processResources { - inputs.property "version", project.version + inputs.property "version", version - filesMatching("fabric.mod.json") { - expand "version": project.version - } + filesMatching("fabric.mod.json") { + expand "version": version + } } diff --git a/gradle.properties b/gradle.properties @@ -1,5 +1,8 @@ org.gradle.jvmargs=-Xmx2G +# BTA +bta_version=1.7.6.2_02 + # Loader Dependencies asm_version=9.3 mixin_version=0.11.4+mixin.0.8.5 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew diff --git a/libs/IMPORTANT.md b/libs/IMPORTANT.md @@ -0,0 +1,7 @@ +# JAR import + +1. Import the BTA! Babric instance into your launcher +2. Start the game +3. Go to Minecraft instance directory +4. Copy the JAR file inside the `bin` directory to `libs` +5. Rename it to `minecraft-client-base.jar` +\ No newline at end of file diff --git a/libs/important.txt b/libs/important.txt @@ -1 +0,0 @@ -Put a "Better than Adventure!" jar named "bta.jar" here. diff --git a/src/main/java/ambos/vanillafixes/VanillaFixes.java b/src/main/java/ambos/vanillafixes/VanillaFixes.java @@ -0,0 +1,19 @@ +package ambos.vanillafixes; + +import net.fabricmc.api.ModInitializer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class VanillaFixes implements ModInitializer { + public static final String MOD_ID = "vanillafixes"; + public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + + public static String name(String name) { + return VanillaFixes.MOD_ID + "." + name; + } + + @Override + public void onInitialize() { + LOGGER.info("VanillaFixes initialized"); + } +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json @@ -2,6 +2,7 @@ "schemaVersion": 1, "id": "vanillafixes", "version": "${version}", + "name": "Vanilla Fixes", "description": "Fixes some issues present in the base game.", "authors": [ @@ -12,13 +13,24 @@ "sources": "https://github.com/Amb0s/vanilla-fixes", "issues": "https://github.com/Amb0s/vanilla-fixes/issues" }, + "license": "MIT", - "icon": "assets/vanillafixes/icon.png", + + "icon": "icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "ambos.vanillafixes.VanillaFixes" + ] + }, "mixins": [ "vanillafixes.mixins.json" ], + "depends": { "fabricloader": ">=0.13.3" + }, + "suggests": { } } diff --git a/src/main/resources/assets/vanillafixes/icon.png b/src/main/resources/icon.png Binary files differ. diff --git a/src/main/resources/vanillafixes.mixins.json b/src/main/resources/vanillafixes.mixins.json @@ -1,18 +1,18 @@ { - "required": true, - "minVersion": "0.8", - "package": "ambos.vanillafixes.mixin", - "compatibilityLevel": "JAVA_8", - "mixins": [ - ], - "client": [ - "GuiGameOverMixin", - "GuiMainMenuMixin", - "RenderListMixin", - "ThreadCheckHasPaidMixin", - "ThreadDownloadResourcesMixin" - ], - "injectors": { - "defaultRequire": 1 + "required": true, + "minVersion": "0.8", + "package": "ambos.vanillafixes.mixin", + "compatibilityLevel": "JAVA_8", + "mixins": [ + ], + "client": [ + "GuiGameOverMixin", + "GuiMainMenuMixin", + "RenderListMixin", + "ThreadCheckHasPaidMixin", + "ThreadDownloadResourcesMixin" + ], + "injectors": { + "defaultRequire": 1 } }