Migrate to Cloche

Changed files
+282 -588
gradle
src
common
datapack
main
resources
assets
ibo
data
ibo
data
minecraft
worldgen
structure_set
resourcepacks
ibo
data
minecraft
worldgen
structure_set
fabric
1.19
main
java
xyz
naomieow
1.21
main
java
xyz
naomieow
forge
1.19
main
java
xyz
naomieow
main
java
xyz
naomieow
resources
neoforge
1.21
main
java
xyz
naomieow
versions
1.19-fabric
1.19-forge
1.19.3-forge
1.21-fabric
1.21-neoforge
+68 -92
build.gradle.kts
··· 1 1 plugins { 2 - id("dev.architectury.loom") version "1.7-SNAPSHOT" apply true 3 - id("maven-publish") 4 - } 5 - 6 - 7 - class ModData { 8 - val id = property("mod.id").toString() 9 - val name = property("mod.name").toString() 10 - val version = property("mod.version").toString() 11 - val group = property("mod.group").toString() 12 - val loader = property("loom.platform").toString() 13 - } 14 - 15 - class ModDeps { 16 - operator fun get(name: String) = property("deps.$name").toString() 17 - } 18 - 19 - 20 - val mod = ModData() 21 - val deps = ModDeps() 22 - val mcVersion = stonecutter.current.version 23 - 24 - val isFabric = mod.loader == "fabric" 25 - val isForge = mod.loader == "forge" 26 - val isNeoforge = mod.loader == "neoforge" 27 - val isForgelike = isForge || isNeoforge 28 - 29 - version = "${mod.version}+$mcVersion" 30 - group = mod.group 31 - 32 - base { archivesName.set(mod.id) } 33 - 34 - loom { 35 - runConfigs.all { 36 - ideConfigGenerated(false) 37 - runDir("../../run") 38 - } 2 + `maven-publish` 3 + id("earth.terrarium.cloche") version "0.9.6" 39 4 } 40 5 41 6 repositories { 7 + cloche { 8 + mavenForge() 9 + mavenFabric() 10 + mavenNeoforged() 11 + librariesMinecraft() 12 + main() 13 + } 14 + mavenLocal() 42 15 mavenCentral() 43 - maven("https://maven.parchmentmc.org") 44 - maven("https://maven.neoforged.net/releases/") 45 16 } 46 17 47 - dependencies { 48 - mappings(loom.layered { 49 - // breaks for some reason 50 - // parchment("org.parchmentmc.data:parchment-${deps["parchment"]}@zip") 51 - officialMojangMappings() 52 - }) 18 + group = "xyz.naomieow" 19 + version = "3.0.0" 53 20 54 - if (isFabric) { 55 - modImplementation("net.fabricmc:fabric-loader:${deps["fabric_loader"]}") 56 - fun fapi(vararg modules: String) { 57 - modules.forEach { fabricApi.module(it, deps["fapi"]) } 21 + cloche { 22 + metadata { 23 + modId = "ibo" 24 + name = "Incendium Biomes Only" 25 + description = "Disables everything but biomes in Incendium" 26 + license = "LGPL-v3" 27 + 28 + author { 29 + name = "Naomi Roberts" 30 + contact = "mia@naomieow.xyz" 58 31 } 59 - modImplementation("net.fabricmc.fabric-api:fabric-api:${deps["fabric_api"]}") 60 32 } 61 - if (isForge) { 62 - "forge"("net.minecraftforge:forge:${deps["forge"]}") 33 + 34 + val datapack = common("common:datapack") 35 + val common119 = common("common:common119") { 36 + metadata { 37 + dependency { 38 + modId = "incendium" 39 + required = true 40 + version("5.1.4") 41 + } 42 + } 63 43 } 64 - if (isNeoforge) { 65 - "neoForge"("net.neoforged:neoforge:${deps["neoforge"]}") 44 + val common121 = common("common:common121") { 45 + metadata { 46 + dependency { 47 + modId = "incendium" 48 + required = true 49 + version("5.4.3") 50 + } 51 + } 66 52 } 67 - minecraft("com.mojang:minecraft:${deps["minecraft_run"]}") 68 53 69 - } 54 + forge("forge:1.19") { 55 + minecraftVersion = "1.19" 56 + loaderVersion = "41.1.0" 70 57 71 - java { 72 - withSourcesJar() 73 - val java = if (stonecutter.compare(mcVersion, "1.20.6") >= 0) JavaVersion.VERSION_21 else JavaVersion.VERSION_17 74 - targetCompatibility = java 75 - sourceCompatibility = java 76 - } 58 + dependsOn(datapack) 59 + dependsOn(common119) 60 + } 77 61 78 - tasks.processResources { 79 - val props = buildMap { 80 - put("id", mod.id) 81 - put("name", mod.name) 82 - put("version", mod.version) 83 - put("minecraft", deps["minecraft"]) 84 - put("incendium", deps["incendium"]) 85 - if (isForgelike) { 86 - put("forgeId", deps["forge_id"]) 87 - put("forgeConstraint", deps["forge_constraint"]) 62 + fabric("fabric:1.19") { 63 + minecraftVersion = "1.19" 64 + loaderVersion = "0.16.0" 65 + 66 + dependencies { 67 + fabricApi("0.58.0") 88 68 } 69 + 70 + dependsOn(datapack) 71 + dependsOn(common119) 89 72 } 90 73 91 - props.forEach(inputs::property) 74 + fabric("fabric:1.21") { 75 + minecraftVersion = "1.21" 76 + loaderVersion = "0.16.0" 92 77 93 - if (isFabric) { 94 - filesMatching("fabric.mod.json") { expand(props) } 95 - exclude(listOf("META-INF/mods.toml", "META-INF/neoforge.mods.toml")) 96 - } 78 + dependencies { 79 + fabricApi("0.102.0") 80 + } 97 81 98 - if (isForgelike) { 99 - filesMatching(listOf("META-INF/mods.toml", "META-INF/neoforge.mods.toml")) { expand(props) } 100 - exclude("fabric.mod.json") 82 + dependsOn(datapack) 83 + dependsOn(common121) 101 84 } 102 - } 103 85 104 - tasks.register<Copy>("buildAndCollect") { 105 - group = "build" 106 - from(tasks.remapJar.get().archiveFile) 107 - into(rootProject.layout.buildDirectory.file("libs/${mod.version}")) 108 - rename { "ibo-${mod.version}+${mod.loader}+$mcVersion.jar" } 109 - dependsOn("build") 110 - } 86 + neoforge("neoforge:1.21") { 87 + minecraftVersion = "1.21" 88 + loaderVersion = "21.0.167" 111 89 112 - if (stonecutter.current.isActive) { 113 - rootProject.tasks.register("buildActive") { 114 - group = "project" 115 - dependsOn(tasks.named("build")) 90 + dependsOn(datapack) 91 + dependsOn(common121) 116 92 } 117 93 }
-13
gradle.properties
··· 2 2 org.gradle.jvmargs=-Xmx1G 3 3 org.gradle.parallel=true 4 4 5 - # Mod Details 6 - mod.id=ibo 7 - mod.name=Incendium Biomes Only 8 - mod.version=2.1.2 9 - mod.group=xyz.naomieow 10 - 11 - # Versioned deps 12 - deps.fabric_loader=[VERSIONED] 13 - deps.minecraft=[VERSIONED] 14 - deps.minecraft_run=[VERSIONED] 15 - deps.fabric_api=[VERSIONED] 16 - deps.parchment=[VERSIONED] 17 - deps.forge_id=[VERSIONED]
gradle/wrapper/gradle-wrapper.jar

This is a binary file and will not be displayed.

+2 -1
gradle/wrapper/gradle-wrapper.properties
··· 1 1 distributionBase=GRADLE_USER_HOME 2 2 distributionPath=wrapper/dists 3 - distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 3 + distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 4 4 networkTimeout=10000 5 + validateDistributionUrl=true 5 6 zipStoreBase=GRADLE_USER_HOME 6 7 zipStorePath=wrapper/dists
+17 -10
gradlew
··· 15 15 # See the License for the specific language governing permissions and 16 16 # limitations under the License. 17 17 # 18 + # SPDX-License-Identifier: Apache-2.0 19 + # 18 20 19 21 ############################################################################## 20 22 # ··· 55 57 # Darwin, MinGW, and NonStop. 56 58 # 57 59 # (3) This script is generated from the Groovy template 58 - # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 60 + # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 61 # within the Gradle project. 60 62 # 61 63 # You can find Gradle at https://github.com/gradle/gradle/. ··· 83 85 # This is normally unused 84 86 # shellcheck disable=SC2034 85 87 APP_BASE_NAME=${0##*/} 86 - APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 88 + # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 + APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s 90 + ' "$PWD" ) || exit 87 91 88 92 # Use the maximum available, or set MAX_FD != -1 to use that value. 89 93 MAX_FD=maximum ··· 130 134 fi 131 135 else 132 136 JAVACMD=java 133 - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 + if ! command -v java >/dev/null 2>&1 138 + then 139 + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 134 140 135 141 Please set the JAVA_HOME variable in your environment to match the 136 142 location of your Java installation." 143 + fi 137 144 fi 138 145 139 146 # Increase the maximum file descriptors if we can. ··· 141 148 case $MAX_FD in #( 142 149 max*) 143 150 # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 144 - # shellcheck disable=SC3045 151 + # shellcheck disable=SC2039,SC3045 145 152 MAX_FD=$( ulimit -H -n ) || 146 153 warn "Could not query maximum file descriptor limit" 147 154 esac ··· 149 156 '' | soft) :;; #( 150 157 *) 151 158 # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 152 - # shellcheck disable=SC3045 159 + # shellcheck disable=SC2039,SC3045 153 160 ulimit -n "$MAX_FD" || 154 161 warn "Could not set maximum file descriptor limit to $MAX_FD" 155 162 esac ··· 198 205 # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 199 206 DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 200 207 201 - # Collect all arguments for the java command; 202 - # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 203 - # shell script including quotes and variable substitutions, so put them in 204 - # double quotes to make sure that they get re-expanded; and 205 - # * put everything else in single quotes, so that it's not re-expanded. 208 + # Collect all arguments for the java command: 209 + # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 210 + # and any embedded shellness will be escaped. 211 + # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 212 + # treated as '${Hostname}' itself on the command line. 206 213 207 214 set -- \ 208 215 "-Dorg.gradle.appname=$APP_BASE_NAME" \
+94 -92
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 - @rem This is normally unused 30 - set APP_BASE_NAME=%~n0 31 - set APP_HOME=%DIRNAME% 32 - 33 - @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 - for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 - 36 - @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 - set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 - 39 - @rem Find java.exe 40 - if defined JAVA_HOME goto findJavaFromJavaHome 41 - 42 - set JAVA_EXE=java.exe 43 - %JAVA_EXE% -version >NUL 2>&1 44 - if %ERRORLEVEL% equ 0 goto execute 45 - 46 - echo. 47 - echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 - echo. 49 - echo Please set the JAVA_HOME variable in your environment to match the 50 - echo location of your Java installation. 51 - 52 - goto fail 53 - 54 - :findJavaFromJavaHome 55 - set JAVA_HOME=%JAVA_HOME:"=% 56 - set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 - 58 - if exist "%JAVA_EXE%" goto execute 59 - 60 - echo. 61 - echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 - echo. 63 - echo Please set the JAVA_HOME variable in your environment to match the 64 - echo location of your Java installation. 65 - 66 - goto fail 67 - 68 - :execute 69 - @rem Setup the command line 70 - 71 - set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 - 73 - 74 - @rem Execute Gradle 75 - "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 - 77 - :end 78 - @rem End local scope for the variables with windows NT shell 79 - if %ERRORLEVEL% equ 0 goto mainEnd 80 - 81 - :fail 82 - rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 - rem the _cmd.exe /c_ return code! 84 - set EXIT_CODE=%ERRORLEVEL% 85 - if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 - if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 - exit /b %EXIT_CODE% 88 - 89 - :mainEnd 90 - if "%OS%"=="Windows_NT" endlocal 91 - 92 - :omega 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 + @rem SPDX-License-Identifier: Apache-2.0 17 + @rem 18 + 19 + @if "%DEBUG%"=="" @echo off 20 + @rem ########################################################################## 21 + @rem 22 + @rem Gradle startup script for Windows 23 + @rem 24 + @rem ########################################################################## 25 + 26 + @rem Set local scope for the variables with windows NT shell 27 + if "%OS%"=="Windows_NT" setlocal 28 + 29 + set DIRNAME=%~dp0 30 + if "%DIRNAME%"=="" set DIRNAME=. 31 + @rem This is normally unused 32 + set APP_BASE_NAME=%~n0 33 + set APP_HOME=%DIRNAME% 34 + 35 + @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 + for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 + 38 + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 + set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 + 41 + @rem Find java.exe 42 + if defined JAVA_HOME goto findJavaFromJavaHome 43 + 44 + set JAVA_EXE=java.exe 45 + %JAVA_EXE% -version >NUL 2>&1 46 + if %ERRORLEVEL% equ 0 goto execute 47 + 48 + echo. 1>&2 49 + echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 + echo. 1>&2 51 + echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 + echo location of your Java installation. 1>&2 53 + 54 + goto fail 55 + 56 + :findJavaFromJavaHome 57 + set JAVA_HOME=%JAVA_HOME:"=% 58 + set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 + 60 + if exist "%JAVA_EXE%" goto execute 61 + 62 + echo. 1>&2 63 + echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 + echo. 1>&2 65 + echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 + echo location of your Java installation. 1>&2 67 + 68 + goto fail 69 + 70 + :execute 71 + @rem Setup the command line 72 + 73 + set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 + 75 + 76 + @rem Execute Gradle 77 + "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 + 79 + :end 80 + @rem End local scope for the variables with windows NT shell 81 + if %ERRORLEVEL% equ 0 goto mainEnd 82 + 83 + :fail 84 + rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 + rem the _cmd.exe /c_ return code! 86 + set EXIT_CODE=%ERRORLEVEL% 87 + if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 + if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 + exit /b %EXIT_CODE% 90 + 91 + :mainEnd 92 + if "%OS%"=="Windows_NT" endlocal 93 + 94 + :omega
+1 -32
settings.gradle.kts
··· 1 - import dev.kikugie.stonecutter.StonecutterSettings 2 - 3 1 pluginManagement { 4 2 repositories { 5 3 mavenCentral() 6 4 gradlePluginPortal() 7 - maven("https://maven.kikugie.dev/releases") 8 - maven("https://maven.fabricmc.net/") 9 - maven("https://maven.architectury.dev") 10 - maven("https://maven.neoforged.net/releases/") 11 - maven("https://maven.minecraftforge.net/") 5 + maven("https://maven.msrandom.net/repository/cloche/") 12 6 } 13 7 } 14 - 15 - plugins { 16 - id("dev.kikugie.stonecutter") version "0.4.3" apply true 17 - } 18 - 19 - 20 - extensions.configure<StonecutterSettings> { 21 - kotlinController = true 22 - centralScript = "build.gradle.kts" 23 - 24 - shared { 25 - fun mc(version: String, name: String = version, loaders: Iterable<String>) { 26 - for (loader in loaders) { 27 - vers("$name-$loader", version) 28 - } 29 - } 30 - mc("1.19", loaders = listOf("fabric", "forge")) 31 - mc("1.19.3", loaders = listOf("forge")) 32 - mc("1.21", loaders = listOf("fabric", "neoforge")) 33 - } 34 - 35 - create(rootProject) 36 - } 37 - 38 - rootProject.name = "ibo"
+18
src/common/datapack/main/resources/data/ibo/data/minecraft/worldgen/structure_set/nether_complexes.json
··· 1 + { 2 + "placement": { 3 + "type": "minecraft:random_spread", 4 + "salt": 30084232, 5 + "separation": 4, 6 + "spacing": 27 7 + }, 8 + "structures": [ 9 + { 10 + "structure": "minecraft:fortress", 11 + "weight": 2 12 + }, 13 + { 14 + "structure": "minecraft:bastion_remnant", 15 + "weight": 3 16 + } 17 + ] 18 + }
+22
src/common/datapack/main/resources/data/ibo/pack.mcmeta
··· 1 + { 2 + "pack": { 3 + "pack_format": 10, 4 + "description": "Disables everything but biomes in Incendium" 5 + }, 6 + "filter": { 7 + "block": [ 8 + { 9 + "namespace": "^incendium$", 10 + "path": "^(function|structure|advancement|loot_table|item_modifier|predicate|recipe)/.*$" 11 + }, 12 + { 13 + "namespace": "^incendium$", 14 + "path": "^(functions|structures|advancements|loot_tables|item_modifiers|predicates|recipes)/.*$" 15 + }, 16 + { 17 + "namespace": "^incendium$", 18 + "path": "^worldgen/(structure|structure_set|template_pool)/.*$" 19 + } 20 + ] 21 + } 22 + }
+21
src/fabric/1.19/main/java/xyz/naomieow/ibo/IboMod.java
··· 1 + package xyz.naomieow.ibo; 2 + 3 + import net.fabricmc.api.ModInitializer; 4 + import net.fabricmc.fabric.api.resource.ResourceManagerHelper; 5 + import net.fabricmc.fabric.api.resource.ResourcePackActivationType; 6 + import net.fabricmc.loader.api.FabricLoader; 7 + import net.minecraft.resources.ResourceLocation; 8 + 9 + public class IboMod implements ModInitializer { 10 + @Override 11 + public void onInitialize() { 12 + FabricLoader.getInstance().getModContainer("ibo").ifPresent((modContainer -> 13 + ResourceManagerHelper.registerBuiltinResourcePack( 14 + new ResourceLocation("ibo", "ibo"), 15 + modContainer, 16 + "Incendium Biomes Only", 17 + ResourcePackActivationType.ALWAYS_ENABLED 18 + ) 19 + )); 20 + } 21 + }
+21
src/fabric/1.21/main/java/xyz/naomieow/ibo/IboMod.java
··· 1 + package xyz.naomieow.ibo; 2 + 3 + import net.fabricmc.api.ModInitializer; 4 + import net.fabricmc.fabric.api.resource.ResourceManagerHelper; 5 + import net.fabricmc.fabric.api.resource.ResourcePackActivationType; 6 + import net.fabricmc.loader.api.FabricLoader; 7 + import net.minecraft.resources.ResourceLocation; 8 + 9 + public class IboMod implements ModInitializer { 10 + @Override 11 + public void onInitialize() { 12 + FabricLoader.getInstance().getModContainer("xyz/naomieow/ibo").ifPresent((modContainer -> 13 + ResourceManagerHelper.registerBuiltinResourcePack( 14 + ResourceLocation.tryBuild("xyz/naomieow/ibo", "xyz/naomieow/ibo"), 15 + modContainer, 16 + "Incendium Biomes Only", 17 + ResourcePackActivationType.ALWAYS_ENABLED 18 + ) 19 + )); 20 + } 21 + }
+9
src/forge/1.19/main/java/xyz/naomieow/ibo/IboMod.java
··· 1 + package xyz.naomieow.ibo; 2 + 3 + import net.minecraftforge.eventbus.api.IEventBus; 4 + import net.minecraftforge.fml.common.Mod; 5 + 6 + @Mod("ibo") 7 + public class IboMod { 8 + public IboMod(IEventBus _eventBus) {} 9 + }
-176
src/main/java/xyz/naomieow/ibo/IboMod.java
··· 1 - package xyz.naomieow.ibo; 2 - 3 - import net.minecraft.network.chat.Component; 4 - import net.minecraft.resources.ResourceLocation; 5 - 6 - //? if fabric { 7 - import net.fabricmc.api.ModInitializer; 8 - import net.fabricmc.fabric.api.resource.ResourceManagerHelper; 9 - import net.fabricmc.fabric.api.resource.ResourcePackActivationType; 10 - import net.fabricmc.loader.api.FabricLoader; 11 - //?} elif neoforge { 12 - /*import net.minecraft.server.packs.PackLocationInfo; 13 - import net.minecraft.server.packs.PackSelectionConfig; 14 - import net.minecraft.server.packs.PackType; 15 - import net.minecraft.server.packs.PathPackResources; 16 - import net.minecraft.server.packs.repository.Pack; 17 - import net.minecraft.server.packs.repository.PackSource; 18 - import net.minecraft.network.chat.Component; 19 - import net.neoforged.bus.api.IEventBus; 20 - import net.neoforged.fml.ModList; 21 - import net.neoforged.fml.common.Mod; 22 - import net.neoforged.neoforge.event.AddPackFindersEvent; 23 - 24 - import java.nio.file.Path; 25 - import java.util.Optional; 26 - *///?} elif forge { 27 - /*import net.minecraft.server.packs.PackType; 28 - import net.minecraft.server.packs.repository.Pack; 29 - import net.minecraft.server.packs.repository.PackSource; 30 - import net.minecraftforge.event.AddPackFindersEvent; 31 - import net.minecraftforge.eventbus.api.IEventBus; 32 - import net.minecraftforge.fml.ModList; 33 - import net.minecraftforge.fml.common.Mod; 34 - import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; 35 - 36 - import java.nio.file.Path; 37 - *///?} 38 - 39 - //? if <1.19.3 && forge { 40 - /*import net.minecraftforge.resource.PathPackResources; 41 - import net.minecraft.server.packs.metadata.pack.PackMetadataSection; 42 - 43 - import java.io.IOException; 44 - *///?} 45 - 46 - //? if >=1.19.3 && forge { 47 - /*import net.minecraft.server.packs.PathPackResources; 48 - import net.minecraft.server.packs.PackResources; 49 - *///?} 50 - 51 - //? if forge-like 52 - /*@Mod("ibo")*/ 53 - public class IboMod 54 - //? if fabric 55 - implements ModInitializer 56 - { 57 - 58 - public static ResourceLocation rl(String namespace, String path) { 59 - //? if >=1.21 { 60 - /*return ResourceLocation.tryBuild(namespace, path); 61 - *///?} else 62 - return new ResourceLocation(namespace, path); 63 - } 64 - 65 - 66 - //? if forge { 67 - 68 - /*public IboMod() { 69 - IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); 70 - modEventBus.addListener(this::registerIBOPack); 71 - } 72 - *///?} 73 - 74 - //? if <1.19.3 && forge { 75 - /*private void registerIBOPack(final AddPackFindersEvent event) { 76 - if (event.getPackType() == PackType.SERVER_DATA) { 77 - try { 78 - Path path = ModList.get() 79 - .getModFileById("ibo") 80 - .getFile() 81 - .findResource("resourcepacks/ibo"); 82 - PathPackResources datapack = new PathPackResources( 83 - ModList.get() 84 - .getModFileById("ibo") 85 - .getFile() 86 - .getFileName() + ":ibo", 87 - path 88 - ); 89 - PackMetadataSection mcmeta = datapack.getMetadataSection(PackMetadataSection.SERIALIZER); 90 - if (mcmeta != null) { 91 - event.addRepositorySource((consumer, constructor) -> consumer.accept(constructor.create( 92 - "ibo/ibo", 93 - Component.literal("Incendium Biomes Only"), 94 - true, 95 - () -> datapack, 96 - mcmeta, 97 - Pack.Position.TOP, 98 - PackSource.BUILT_IN 99 - ))); 100 - } 101 - 102 - } catch (IOException e) { 103 - throw new RuntimeException(e); 104 - } 105 - } 106 - } 107 - *///?} 108 - 109 - //? if >=1.19.3 && forge { 110 - /*private void registerIBOPack(final AddPackFindersEvent event) { 111 - if (event.getPackType() == PackType.SERVER_DATA) { 112 - Path path = ModList.get().getModFileById("ibo").getFile().findResource("resourcepacks/ibo"); 113 - Pack ibo = Pack.readMetaAndCreate( 114 - "", 115 - Component.literal("Incendium Biomes Only"), 116 - false, 117 - new Pack.ResourcesSupplier() {@Override 118 - public PackResources open(String string) { 119 - return new PathPackResources( 120 - path.getFileName().toString(), 121 - path, 122 - false 123 - ); 124 - } 125 - }, 126 - PackType.SERVER_DATA, 127 - Pack.Position.TOP, 128 - PackSource.BUILT_IN 129 - ); 130 - 131 - event.addRepositorySource((consumer) -> consumer.accept(ibo)); 132 - } 133 - } 134 - *///?} 135 - 136 - //? if neoforge { 137 - /*public IboMod(IEventBus modEventBus) { 138 - modEventBus.addListener(this::registerIBOPack); 139 - } 140 - 141 - private void registerIBOPack(final AddPackFindersEvent event) { 142 - if (event.getPackType() == PackType.SERVER_DATA) { 143 - Path path = ModList.get().getModFileById("ibo").getFile().findResource("resourcepacks/ibo"); 144 - Pack ibo = Pack.readMetaAndCreate( 145 - new PackLocationInfo( 146 - path.getFileName().toString(), 147 - Component.literal("Incendium Biomes Only"), 148 - PackSource.BUILT_IN, 149 - Optional.empty() 150 - ), 151 - new PathPackResources.PathResourcesSupplier(path), 152 - PackType.SERVER_DATA, 153 - new PackSelectionConfig( 154 - true, 155 - Pack.Position.TOP, 156 - false 157 - ) 158 - ); 159 - 160 - event.addRepositorySource((consumer) -> consumer.accept(ibo)); 161 - } 162 - } 163 - *///?} 164 - 165 - //? if fabric { 166 - @Override 167 - public void onInitialize() { 168 - FabricLoader.getInstance().getModContainer("ibo").ifPresent((modContainer -> ResourceManagerHelper.registerBuiltinResourcePack( 169 - rl("ibo", "ibo"), 170 - modContainer, 171 - "Incendium Biomes Only", 172 - ResourcePackActivationType.ALWAYS_ENABLED 173 - ))); 174 - } 175 - //?} 176 - }
-35
src/main/resources/META-INF/mods.toml
··· 1 - modLoader = "javafml" 2 - loaderVersion = "[1,)" 3 - issueTrackerURL = "https://codeberg.org/naomi/ibo/issues" 4 - license = "LGPL-v3" 5 - 6 - [[mods]] 7 - modId = "${id}" 8 - version = "${version}" 9 - displayName = "${name}" 10 - authors = "Naomi Roberts <mia@naomieow.xyz>" 11 - description = ''' 12 - Disables everything but biomes in Incendium 13 - ''' 14 - logoFile = "icon.png" 15 - 16 - [["dependencies.${id}"]] 17 - modId = "${forgeId}" 18 - mandatory = true 19 - versionRange = "${forgeConstraint}" 20 - ordering = "NONE" 21 - side = "BOTH" 22 - 23 - [["dependencies.${id}"]] 24 - modId = "minecraft" 25 - mandatory = true 26 - versionRange = "${minecraft}" 27 - ordering = "NONE" 28 - side = "BOTH" 29 - 30 - [["dependencies.${id}"]] 31 - modId = "incendium" 32 - mandatory = true 33 - versionRange = "${incendium}" 34 - ordering = "AFTER" 35 - side = "SERVER"
-35
src/main/resources/META-INF/neoforge.mods.toml
··· 1 - modLoader = "javafml" 2 - loaderVersion = "[1,)" 3 - issueTrackerURL = "https://codeberg.org/naomi/ibo/issues" 4 - license = "LGPL-v3" 5 - 6 - [[mods]] 7 - modId = "${id}" 8 - version = "${version}" 9 - displayName = "${name}" 10 - authors = "Naomi Roberts <mia@naomieow.xyz>" 11 - description = ''' 12 - Disables everything but biomes in Incendium 13 - ''' 14 - logoFile = "icon.png" 15 - 16 - [["dependencies.${id}"]] 17 - modId = "${forgeId}" 18 - mandatory = true 19 - versionRange = "${forgeConstraint}" 20 - ordering = "NONE" 21 - side = "BOTH" 22 - 23 - [["dependencies.${id}"]] 24 - modId = "minecraft" 25 - mandatory = true 26 - versionRange = "${minecraft}" 27 - ordering = "NONE" 28 - side = "BOTH" 29 - 30 - [["dependencies.${id}"]] 31 - modId = "incendium" 32 - mandatory = true 33 - versionRange = "${incendium}" 34 - ordering = "AFTER" 35 - side = "SERVER"
src/main/resources/assets/ibo/icon.png src/common/datapack/main/resources/assets/ibo/icon.png
-31
src/main/resources/fabric.mod.json
··· 1 - { 2 - "schemaVersion": 1, 3 - "id": "${id}", 4 - "version": "${version}", 5 - "name": "${name}", 6 - "description": "Disables everything but biomes in Incendium", 7 - "icon": "icon.png", 8 - "authors": [ 9 - "Naomi Roberts <mia@naomieow.xyz>" 10 - ], 11 - "contact": { 12 - "email": "support@naomieow.xyz", 13 - "homepage": "https://modrinth.com/datapack/ibo", 14 - "sources": "https://codeberg.org/naomi/ibo", 15 - "issues": "https://codeberg.org/naomi/ibo/issues" 16 - }, 17 - "license": "LGPL-v3", 18 - "environment": "*", 19 - "entrypoints": { 20 - "main": [ 21 - "xyz.naomieow.ibo.IboMod" 22 - ] 23 - }, 24 - "mixins": [], 25 - "depends": { 26 - "fabricloader": ">=0.15", 27 - "minecraft": "${minecraft}", 28 - "fabric": "*", 29 - "incendium": "${incendium}" 30 - } 31 - }
src/main/resources/icon.png src/common/datapack/main/resources/data/ibo/pack.png
-6
src/main/resources/pack.mcmeta
··· 1 - { 2 - "pack": { 3 - "pack_format": 10, 4 - "description": "Disables everything but biomes in Incendium" 5 - } 6 - }
src/main/resources/resourcepacks/ibo/data/minecraft/worldgen/structure_set/nether_complexes.json src/common/datapack/main/resources/resourcepacks/ibo/data/minecraft/worldgen/structure_set/nether_complexes.json
src/main/resources/resourcepacks/ibo/pack.mcmeta src/common/datapack/main/resources/resourcepacks/ibo/pack.mcmeta
src/main/resources/resourcepacks/ibo/pack.png src/common/datapack/main/resources/resourcepacks/ibo/pack.png
+9
src/neoforge/1.21/main/java/xyz/naomieow/ibo/IboMod.java
··· 1 + package xyz.naomieow.ibo; 2 + 3 + import net.neoforged.bus.api.IEventBus; 4 + import net.neoforged.fml.common.Mod; 5 + 6 + @Mod("ibo") 7 + public class IboMod { 8 + public IboMod(IEventBus _eventBus) {} 9 + }
-22
stonecutter.gradle.kts
··· 1 - plugins { 2 - id("dev.kikugie.stonecutter") 3 - id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false 4 - } 5 - stonecutter active "1.19-fabric" /* [SC] DO NOT EDIT */ 6 - 7 - stonecutter registerChiseled tasks.register("chiseledBuildAndCollect", stonecutter.chiseled) { 8 - group = "project" 9 - ofTask("buildAndCollect") 10 - } 11 - 12 - stonecutter.configureEach { 13 - val platform = project.property("loom.platform") 14 - 15 - fun String.propDefined() = project.findProperty(this)?.toString()?.isNotBlank() ?: false 16 - consts(listOf( 17 - "fabric" to (platform == "fabric"), 18 - "forge" to (platform == "forge"), 19 - "neoforge" to (platform == "neoforge"), 20 - "forge-like" to (platform == "forge" || platform == "neoforge"), 21 - )) 22 - }
-8
versions/1.19-fabric/gradle.properties
··· 1 - loom.platform=fabric 2 - 3 - deps.minecraft=>=1.19- <1.21- 4 - deps.minecraft_run=1.19 5 - deps.fabric_api=0.58.0+1.19 6 - deps.parchment=1.19.2:2022.11.27 7 - deps.incendium=>=5.1.0 8 - deps.fabric_loader=0.15.0
-9
versions/1.19-forge/gradle.properties
··· 1 - loom.platform=forge 2 - 3 - deps.minecraft=[1.19,1.19.3) 4 - deps.minecraft_run=1.19 5 - deps.parchment=1.19.2:2022.11.27 6 - deps.incendium=5.1.0 7 - deps.forge=1.19-41.1.0 8 - deps.forge_constraint=[41,) 9 - deps.forge_id=forge
-9
versions/1.19.3-forge/gradle.properties
··· 1 - loom.platform=forge 2 - 3 - deps.minecraft=[1.19.3,1.21) 4 - deps.minecraft_run=1.19.3 5 - deps.parchment=1.19.2:2022.11.27 6 - deps.incendium=5.1.0 7 - deps.forge=1.19.3-44.1.23 8 - deps.forge_constraint=[44,) 9 - deps.forge_id=forge
-8
versions/1.21-fabric/gradle.properties
··· 1 - loom.platform=fabric 2 - 3 - deps.minecraft=>=1.21 <=1.21.3 4 - deps.minecraft_run=1.21 5 - deps.fabric_api=0.101.2+1.21 6 - deps.parchment=1.21:2024.07.28 7 - deps.incendium=>=5.4.0 8 - deps.fabric_loader=0.15.0
-9
versions/1.21-neoforge/gradle.properties
··· 1 - loom.platform=neoforge 2 - 3 - deps.minecraft=[1.21.0,1.22) 4 - deps.minecraft_run=1.21 5 - deps.parchment=1.21:2024.07.28 6 - deps.incendium=5.4.0 7 - deps.neoforge=21.0.0-beta 8 - deps.forge_constraint=[21,) 9 - deps.forge_id=neoforge