diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index dfe0770..0000000 --- a/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto diff --git a/.gitignore b/.gitignore index c476faf..ccb0c56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,40 +1,19 @@ -# gradle - -.gradle/ build/ -out/ -classes/ - -# eclipse - -*.launch - -# idea - -.idea/ -*.iml *.ipr +run/ *.iws - -# vscode - -.settings/ -.vscode/ +out/ +*.iml +.gradle/ +output/ bin/ +libs/ + .classpath .project - -# macos - -*.DS_Store - -# fabric - -run/ - -# java - -hs_err_*.log -replay_*.log -*.hprof -*.jfr +.idea/ +classes/ +.metadata +.vscode +.settings +*.launch \ No newline at end of file diff --git a/build.gradle b/build.gradle index c57f328..369a5b0 100644 --- a/build.gradle +++ b/build.gradle @@ -1,57 +1,50 @@ plugins { - id 'fabric-loom' version '1.2-SNAPSHOT' - id 'maven-publish' -} - -archivesBaseName = "${project.archives_base_name}-${project.minecraft_version}" -version = project.mod_version -group = project.maven_group - -repositories { - maven { url 'https://api.modrinth.com/maven' } -} - -dependencies { - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - - compileOnly "maven.modrinth:splasher:${project.minecraft_version}-${project.splasher_version}" -} - -processResources { - inputs.property "version", project.version - - filesMatching("fabric.mod.json") { - expand "version": project.version - } -} - -tasks.withType(JavaCompile).configureEach { - it.options.release = Integer.parseInt(sourceCompatibility) -} - -java { - withSourcesJar() - - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - -jar { - from("LICENSE") { - rename { "${it}_${project.archivesBaseName}"} - } -} - -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - } - } - - repositories { - } + id "architectury-plugin" version "3.4-SNAPSHOT" + id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false +} + +architectury { + minecraft = rootProject.minecraft_version +} + +subprojects { + apply plugin: "dev.architectury.loom" + + dependencies { + minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + } +} + +allprojects { + apply plugin: "java" + apply plugin: "architectury-plugin" + apply plugin: "maven-publish" + + archivesBaseName = rootProject.archives_base_name + version = "${rootProject.minecraft_version}-${rootProject.mod_version}" + group = rootProject.maven_group + + repositories { + exclusiveContent { + forRepository { + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + } + } + filter { + includeGroup "maven.modrinth" + } + } + } + + tasks.withType(JavaCompile) { + options.encoding = "UTF-8" + options.release = 17 + } + + java { + withSourcesJar() + } } diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 0000000..19c9ec6 --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,24 @@ +architectury { + common(rootProject.enabled_platforms.split(",")) +} + +dependencies { + // We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies + // Do NOT use other classes from fabric loader + modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" + modApi "dev.architectury:architectury:${rootProject.architectury_version}" +} + +publishing { + publications { + mavenCommon(MavenPublication) { + artifactId = rootProject.archives_base_name + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + } +} diff --git a/src/main/java/net/krlite/bounced/Bounced.java b/common/src/main/java/net/krlite/bounced/Bounced.java similarity index 73% rename from src/main/java/net/krlite/bounced/Bounced.java rename to common/src/main/java/net/krlite/bounced/Bounced.java index aeccf0e..aebe392 100644 --- a/src/main/java/net/krlite/bounced/Bounced.java +++ b/common/src/main/java/net/krlite/bounced/Bounced.java @@ -1,18 +1,13 @@ package net.krlite.bounced; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents; -import net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents; -import net.fabricmc.loader.api.FabricLoader; -import net.krlite.splasher.Splasher; +import dev.architectury.platform.Platform; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.screen.TitleScreen; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.atomic.AtomicBoolean; -public class Bounced implements ModInitializer { +public class Bounced { public static final String NAME = "Bounced!", ID = "bounced"; public static final Logger LOGGER = LoggerFactory.getLogger(ID); private static double primaryPos, secondaryPos; @@ -23,29 +18,7 @@ public class Bounced implements ModInitializer { private static final AtomicBoolean shouldAnimate = new AtomicBoolean(true), shouldJump = new AtomicBoolean(false); - - @Override - public void onInitialize() { - boolean isSplasherLoaded = FabricLoader.getInstance().isModLoaded("splasher"); - - ScreenEvents.BEFORE_INIT.register((client, screen, scaledWidth, scaledHeight) -> { - if (screen instanceof TitleScreen) { - ScreenMouseEvents.beforeMouseClick(screen) - .register((currentScreen, mouseX, mouseY, button) -> { - double centerX = scaledWidth / 2.0, y = 30, width = 310, height = 44; - if (!isIntro() - && mouseX >= centerX - width / 2 && mouseX <= centerX + width / 2 - && mouseY >= y && mouseY <= y + height - ) { - if (!isSplasherLoaded || !Splasher.isMouseHovering(scaledWidth, mouseX, mouseY)) { - // Linkage with Splasher - push(); - } - } - }); - } - }); - } + public static final boolean isSplasherLoaded = Platform.isModLoaded("splasher"); public static void update() { if (isIntro()) { diff --git a/src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java b/common/src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java similarity index 95% rename from src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java rename to common/src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java index eba93ef..4f2ea1c 100644 --- a/src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java +++ b/common/src/main/java/net/krlite/bounced/mixin/SplashTextAnimator.java @@ -7,7 +7,6 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.*; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; /** * This class is responsible for triggering the title animation before the title screen is rendered. diff --git a/src/main/java/net/krlite/bounced/mixin/TitleScreenAnimator.java b/common/src/main/java/net/krlite/bounced/mixin/TitleScreenAnimator.java similarity index 100% rename from src/main/java/net/krlite/bounced/mixin/TitleScreenAnimator.java rename to common/src/main/java/net/krlite/bounced/mixin/TitleScreenAnimator.java diff --git a/src/main/resources/assets/bounced/lang/tt_ru.json b/common/src/main/resources/assets/bounced/lang/tt_ru.json similarity index 100% rename from src/main/resources/assets/bounced/lang/tt_ru.json rename to common/src/main/resources/assets/bounced/lang/tt_ru.json diff --git a/src/main/resources/bounced.mixins.json b/common/src/main/resources/bounced.common.mixins.json similarity index 100% rename from src/main/resources/bounced.mixins.json rename to common/src/main/resources/bounced.common.mixins.json diff --git a/src/main/resources/assets/bounced/icon.png b/common/src/main/resources/icon.png similarity index 100% rename from src/main/resources/assets/bounced/icon.png rename to common/src/main/resources/icon.png diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 0000000..9716807 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,80 @@ +plugins { + id "com.github.johnrengelman.shadow" version "7.1.2" +} + +architectury { + platformSetupLoomIde() + fabric() +} + +project.archivesBaseName = rootProject.archivesBaseName + "-fabric" + +configurations { + common + shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentFabric.extendsFrom common +} + +dependencies { + modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" + modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" + modApi "dev.architectury:architectury-fabric:${rootProject.architectury_version}" + + compileOnly "maven.modrinth:splasher:${project.minecraft_version}-${project.splasher_version}" + + common(project(path: ":common", configuration: "namedElements")) { transitive false } + shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } +} + +processResources { + inputs.property "version", project.version + + filesMatching("fabric.mod.json") { + expand "version": project.version + } +} + +shadowJar { + exclude "architectury.common.json" + + configurations = [project.configurations.shadowCommon] + archiveClassifier.set("dev-shadow") +} + +remapJar { + input.set shadowJar.archiveFile + dependsOn shadowJar + archiveClassifier.set(null) +} + +jar { + archiveClassifier.set("dev") +} + +sourcesJar { + def commonSources = project(":common").sourcesJar + dependsOn commonSources + from commonSources.archiveFile.map { zipTree(it) } +} + +components.java { + withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { + skip() + } +} + +publishing { + publications { + mavenFabric(MavenPublication) { + artifactId = rootProject.archives_base_name + "-" + project.name + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + } +} diff --git a/fabric/src/main/java/net/krlite/bounced/fabric/BouncedClientFabric.java b/fabric/src/main/java/net/krlite/bounced/fabric/BouncedClientFabric.java new file mode 100644 index 0000000..c652ec0 --- /dev/null +++ b/fabric/src/main/java/net/krlite/bounced/fabric/BouncedClientFabric.java @@ -0,0 +1,35 @@ +package net.krlite.bounced.fabric; + +import dev.architectury.event.EventResult; +import dev.architectury.event.events.client.ClientGuiEvent; +import dev.architectury.event.events.client.ClientScreenInputEvent; +import net.fabricmc.api.ClientModInitializer; +import net.krlite.bounced.Bounced; +import net.krlite.splasher.Splasher; +import net.minecraft.client.gui.screen.TitleScreen; + +public class BouncedClientFabric implements ClientModInitializer { + @Override + public void onInitializeClient() { + ClientGuiEvent.INIT_POST.register((screen, screenAccess) -> { + if (screen instanceof TitleScreen) { + ClientScreenInputEvent.MOUSE_CLICKED_POST.register((client, currentScreen, mouseX, mouseY, button) -> { + double scaledWidth = screenAccess.getScreen().width; + double centerX = scaledWidth / 2.0, y = 30, width = 310, height = 44; + if (!Bounced.isIntro() + && mouseX >= centerX - width / 2 && mouseX <= centerX + width / 2 + && mouseY >= y && mouseY <= y + height + ) { + + if (!Bounced.isSplasherLoaded || !Splasher.isMouseHovering(scaledWidth, mouseX, mouseY)) { + // Linkage with Splasher + Bounced.push(); + } + + } + return EventResult.pass(); + }); + } + }); + } +} diff --git a/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json similarity index 61% rename from src/main/resources/fabric.mod.json rename to fabric/src/main/resources/fabric.mod.json index d331585..976f294 100644 --- a/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -2,35 +2,29 @@ "schemaVersion": 1, "id": "bounced", "version": "${version}", - "name": "Bounced", "description": "Such A Vibrant Title!", "authors": [ - "KrLite" + "KrLite", "TexTrue" ], "contact": { "homepage": "https://github.com/KrLite", "sources": "https://github.com/KrLite/Bounced" }, - "license": "GPL-3.0", - "icon": "assets/bounced/icon.png", - + "icon": "icon.png", "environment": "client", "entrypoints": { - "main": [ - "net.krlite.bounced.Bounced" + "client": [ + "net.krlite.bounced.fabric.BouncedClientFabric" ] }, - "mixins": [ - "bounced.mixins.json" - ], - "depends": { - "fabricloader": ">=0.14.19", - "fabric-api": "*", - "minecraft": "~1.19.3" + "fabric": "*", + "minecraft": "1.19.3", + "architectury": "*" }, - "suggests": { - } -} + "mixins": [ + "bounced.common.mixins.json" + ] +} \ No newline at end of file diff --git a/forge/build.gradle b/forge/build.gradle new file mode 100644 index 0000000..28d3c67 --- /dev/null +++ b/forge/build.gradle @@ -0,0 +1,84 @@ +plugins { + id "com.github.johnrengelman.shadow" version "7.1.2" +} + +architectury { + platformSetupLoomIde() + forge() +} + +loom { + forge { + mixinConfig "bounced.common.mixins.json" + } +} + +project.archivesBaseName = rootProject.archivesBaseName + "-forge" + +configurations { + common + shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentForge.extendsFrom common +} + +dependencies { + forge "net.minecraftforge:forge:${rootProject.forge_version}" + modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}" + + common(project(path: ":common", configuration: "namedElements")) { transitive false } + shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false } +} + +processResources { + inputs.property "version", project.version + + filesMatching("META-INF/mods.toml") { + expand "version": project.version + } +} + +shadowJar { + exclude "fabric.mod.json" + exclude "architectury.common.json" + + configurations = [project.configurations.shadowCommon] + archiveClassifier.set("dev-shadow") +} + +remapJar { + input.set shadowJar.archiveFile + dependsOn shadowJar + archiveClassifier.set(null) +} + +jar { + archiveClassifier.set("dev") +} + +sourcesJar { + def commonSources = project(":common").sourcesJar + dependsOn commonSources + from commonSources.archiveFile.map { zipTree(it) } +} + +components.java { + withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { + skip() + } +} + +publishing { + publications { + mavenForge(MavenPublication) { + artifactId = rootProject.archives_base_name + "-" + project.name + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + } +} diff --git a/forge/gradle.properties b/forge/gradle.properties new file mode 100644 index 0000000..32f842a --- /dev/null +++ b/forge/gradle.properties @@ -0,0 +1 @@ +loom.platform=forge \ No newline at end of file diff --git a/forge/src/main/java/net/krlite/bounced/forge/BouncedClientForge.java b/forge/src/main/java/net/krlite/bounced/forge/BouncedClientForge.java new file mode 100644 index 0000000..b0b2c0e --- /dev/null +++ b/forge/src/main/java/net/krlite/bounced/forge/BouncedClientForge.java @@ -0,0 +1,46 @@ +package net.krlite.bounced.forge; + +import dev.architectury.platform.forge.EventBuses; +import net.krlite.bounced.Bounced; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.IExtensionPoint; +import net.minecraftforge.fml.ModLoadingContext; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.network.NetworkConstants; + +@Mod(Bounced.ID) +public class BouncedClientForge { + public BouncedClientForge() { + ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); + EventBuses.registerModEventBus(Bounced.ID, FMLJavaModLoadingContext.get().getModEventBus()); + IEventBus modEventBus = EventBuses.getModEventBus(Bounced.ID).get(); + + modEventBus.addListener(this::onInitializeClient); + } + + public void onInitializeClient(FMLClientSetupEvent event) { + /* TODO: Waiting for Splasher 4.0.6 released! + ClientGuiEvent.INIT_POST.register((screen, screenAccess) -> { + if (screen instanceof TitleScreen) { + ClientScreenInputEvent.MOUSE_CLICKED_POST.register((client, currentScreen, mouseX, mouseY, button) -> { + double scaledWidth = screenAccess.getScreen().width; + double centerX = scaledWidth / 2.0, y = 30, width = 310, height = 44; + if (!Bounced.isIntro() + && mouseX >= centerX - width / 2 && mouseX <= centerX + width / 2 + && mouseY >= y && mouseY <= y + height + ) { + + if (!Bounced.isSplasherLoaded || !Splasher.isMouseHovering(scaledWidth, mouseX, mouseY)) { + // Linkage with Splasher + Bounced.push(); + } + } + return EventResult.pass(); + }); + } + }); + */ + } +} \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml new file mode 100644 index 0000000..7480fd3 --- /dev/null +++ b/forge/src/main/resources/META-INF/mods.toml @@ -0,0 +1,35 @@ +modLoader = "javafml" +loaderVersion = "[43,)" +license = "GPL-3.0" + +[[mods]] +modId = "bounced" +version = "${version}" +displayName = "Bounced" +displayURL = "https://github.com/KrLite/Bounced" +authors = "KrLite, TexTrue" +description = ''' +Such A Vibrant Title! +''' +logoFile = "icon.png" + +[[dependencies.bounced]] +modId = "forge" +mandatory = true +versionRange = "[43,)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.bounced]] +modId = "minecraft" +mandatory = true +versionRange = "[1.19.3,]" +ordering = "NONE" +side = "BOTH" + +[[dependencies.bounced]] +modId = "architectury" +mandatory = true +versionRange = "[7,)" +ordering = "AFTER" +side = "BOTH" \ No newline at end of file diff --git a/forge/src/main/resources/pack.mcmeta b/forge/src/main/resources/pack.mcmeta new file mode 100644 index 0000000..78f1a9a --- /dev/null +++ b/forge/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "Bounced", + "pack_format": 9 + } +} diff --git a/gradle.properties b/gradle.properties index 7a19ffb..8f85622 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,15 +1,18 @@ -org.gradle.jvmargs = -Xmx1G -org.gradle.parallel = true +org.gradle.jvmargs=-Xmx2048M -# https://fabricmc.net/develop -minecraft_version = 1.19.3 +minecraft_version=1.19.3 +enabled_platforms=fabric,forge yarn_mappings = 1.19.3+build.5 -loader_version = 0.14.19 -mod_version = 2.1.2 -maven_group = net.krlite -archives_base_name = bounced +archives_base_name=bounced +mod_version=2.1.3 +maven_group=net.krlite -# Dependencies -fabric_version = 0.76.1+1.19.3 -splasher_version = v4.0.4-beta +architectury_version=7.1.86 + +fabric_loader_version=0.14.9 +fabric_api_version=0.76.1+1.19.3 + +forge_version=1.19.3-44.1.23 + +splasher_version = v4.0.5 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 943f0cb..e708b1c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37aef8d..59bc51a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip -networkTimeout=10000 +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 65dcd68..1b6c787 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,11 +80,11 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,16 +143,12 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -209,12 +205,6 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 93e3f59..107acd3 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%"=="" @echo off +@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,8 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused +if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -41,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd +if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle b/settings.gradle index b02216b..213e312 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,10 +1,14 @@ pluginManagement { repositories { - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' - } - mavenCentral() + maven { url "https://maven.fabricmc.net/" } + maven { url "https://maven.architectury.dev/" } + maven { url "https://maven.minecraftforge.net/" } gradlePluginPortal() } } + +include("common") +include("fabric") +include("forge") + +rootProject.name = "Bounced"