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 47b4c3984bbcd91625167dc1c50bee255ea6a31e
parent a93e1426bedfad634fb41259a2f4b3f07dadc782
Author: Amb0s <ambos@disroot.org>
Date:   Sun,  6 Aug 2023 11:07:10 +0200

Added ModMenu compatibility and changed loader again

Diffstat:
Mbuild.gradle | 44+++++++++++++++++++++++++++++++++++---------
Mgradle.properties | 6+++---
Mgradle/wrapper/gradle-wrapper.properties | 2+-
Msettings.gradle | 4----
Msrc/main/java/ambos/vanillafixes/mixin/GuiMainMenuMixin.java | 2+-
Asrc/main/resources/fabric.mod.json | 35+++++++++++++++++++++++++++++++++++
Dsrc/main/resources/quilt.mod.json | 18------------------
Msrc/main/resources/vanillafixes.mixins.json | 24++++++++++++------------
8 files changed, 87 insertions(+), 48 deletions(-)

diff --git a/build.gradle b/build.gradle @@ -1,5 +1,5 @@ plugins { - id "org.quiltmc.loom" version "1.+" + id 'babric-loom' version '1.1.+' id 'java' } @@ -8,10 +8,9 @@ archivesBaseName = project.mod_name version = project.mod_version loom { - clientOnlyMinecraftJar() - //serverOnlyMinecraftJar() + gluedMinecraftJar() noIntermediateMappings() - customMinecraftManifest.set("https://github.com/MartinSVK12/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json") + customMinecraftManifest.set("https://github.com/Turnip-Labs/bta-manifest-repo/releases/download/v${project.bta_version}/${project.bta_version}.json") } repositories { @@ -41,6 +40,14 @@ repositories { metadataSources { artifact() } } ivy { + url = "https://github.com/Turnip-Labs" + patternLayout { + artifact "[organisation]/releases/download/[revision]/[module]-bta-[revision].jar" + m2compatible = true + } + metadataSources { artifact() } + } + ivy { url = "https://piston-data.mojang.com" patternLayout { artifact "v1/[organisation]/[revision]/[module].jar" @@ -60,13 +67,24 @@ repositories { dependencies { minecraft "bta-download-repo:bta:${project.bta_version}" - mappings loom.layered {} + mappings loom.layered() {} modRuntimeOnly "objects:client:43db9b498cb67058d2e12d394e6507722e71bb45" // https://piston-data.mojang.com/v1/objects/43db9b498cb67058d2e12d394e6507722e71bb45/client.jar - modImplementation("quilt-loader:quilt-loader:${project.loader_version}") + modImplementation "fabric-loader: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" + modImplementation "ModMenu:ModMenu:2.0.0" + + implementation "org.slf4j:slf4j-api:1.8.0-beta4" + implementation "org.apache.logging.log4j:log4j-slf4j18-impl:2.16.0" + + implementation 'com.google.guava:guava:30.0-jre' + implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9' + + var log4jVersion = "2.20.0" + implementation("org.apache.logging.log4j:log4j-core:${log4jVersion}") + implementation("org.apache.logging.log4j:log4j-api:${log4jVersion}") + implementation("org.apache.logging.log4j:log4j-1.2-api:${log4jVersion}") + implementation("log4j:apache-log4j-extras:1.2.17") } java { @@ -75,7 +93,7 @@ java { withSourcesJar() } -tasks.withType(JavaCompile).configureEach { +tasks.withType(JavaCompile) { options.release.set 8 } @@ -84,3 +102,11 @@ jar { rename { "${it}_${archivesBaseName}" } } } + +processResources { + inputs.property "version", version + + filesMatching("fabric.mod.json") { + expand "version": version + } +} diff --git a/gradle.properties b/gradle.properties @@ -3,10 +3,10 @@ org.gradle.jvmargs=-Xmx2G # BTA bta_version=1.7.7.0 -# Loader (quilt) -loader_version=0.20.0-beta.3-bta +# Loader +loader_version=0.14.19-babric.1-bta # Mod -mod_version=3.0.0 +mod_version=4.0.0 mod_group=ambos mod_name=vanilla-fixes 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-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle @@ -13,9 +13,5 @@ pluginManagement { name = 'Babric' url = 'https://maven.glass-launcher.net/babric' } - maven { - name = 'Quilt' - url = 'https://maven.quiltmc.org/repository/release' - } } } \ No newline at end of file diff --git a/src/main/java/ambos/vanillafixes/mixin/GuiMainMenuMixin.java b/src/main/java/ambos/vanillafixes/mixin/GuiMainMenuMixin.java @@ -17,7 +17,7 @@ final class GuiMainMenuMixin extends GuiScreen { @Inject(method = "initGui", at = @At("RETURN"), require = 0) private void removeButtons(CallbackInfo ci) { - controlList.removeIf(button -> button.id == 3 || button.id == 8); + controlList.removeIf(button -> button.id == 3 || button.id == 8 || button.id == 100); } @ModifyArgs(method = "drawScreen", at = @At(value = "INVOKE", diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json @@ -0,0 +1,35 @@ +{ + "schemaVersion": 1, + "id": "vanillafixes", + "version": "${version}", + + "name": "Vanilla Fixes", + "description": "Fixes some issues present in the base game.", + "authors": [ + "Ambos" + ], + "contact": { + "homepage": "https://github.com/Amb0s/vanilla-fixes", + "sources": "https://github.com/Amb0s/vanilla-fixes", + "issues": "https://github.com/Amb0s/vanilla-fixes/issues" + }, + + "license": "MIT", + "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/quilt.mod.json b/src/main/resources/quilt.mod.json @@ -1,17 +0,0 @@ -{ - "schema_version": 1, - "quilt_loader": { - "entrypoints": { - "main": [ - "ambos.vanillafixes.VanillaFixes" - ] - }, - "group": "ambos", - "id":"vanillafixes", - "version": "3.0.0", - "intermediate_mappings": "net.fabricmc:intermediary" - }, - "mixin": [ - "vanillafixes.mixins.json" - ] -} -\ No newline at end of file diff --git a/src/main/resources/vanillafixes.mixins.json b/src/main/resources/vanillafixes.mixins.json @@ -1,15 +1,15 @@ { - "required": true, - "minVersion": "0.8", - "package": "ambos.vanillafixes.mixin", - "compatibilityLevel": "JAVA_8", - "mixins": [ - "DisplayListMixin", - "GuiMainMenuMixin" - ], - "client": [ - ], - "injectors": { - "defaultRequire": 1 + "required": true, + "minVersion": "0.8", + "package": "ambos.vanillafixes.mixin", + "compatibilityLevel": "JAVA_8", + "mixins": [ + ], + "client": [ + "GuiMainMenuMixin", + "RenderListMixin" + ], + "injectors": { + "defaultRequire": 1 } }