repo for my hex addons :3
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

finish hexic demotion

+113 -111
+98 -90
build.gradle.kts
··· 1 1 import de.undercouch.gradle.tasks.download.Download 2 2 import groovy.json.JsonSlurper 3 - import org.eu.net.pool.mc_plugin.Environment 4 3 import org.gradle.api.publish.maven.internal.publication.MavenPomInternal 5 4 import org.gradle.kotlin.dsl.support.uppercaseFirstChar 6 5 import kotlin.io.path.exists ··· 27 26 id("maven-publish") 28 27 id("idea") 29 28 id("de.undercouch.download") version "5.6.0" 30 - id("org.eu.net.pool.mc-plugin") 29 + //id("org.eu.net.pool.mc-plugin") 31 30 } 32 31 33 32 allprojects { ··· 54 53 55 54 val release: Boolean = !System.getenv("release").isNullOrEmpty() 56 55 allprojects { 57 - val p = P(project) 56 + val p by lazy { 57 + val p = P(project) 58 + ext["p"] = p 59 + p 60 + } 58 61 val modid: String by project.properties 59 - ext["p"] = p 60 62 ext["release"] = release 61 - version = project.property("mod_version") as String 62 - if (!release) version = "${version}+${p.commit_id.take(7)}" 63 - group = rootProject.property("maven_group") as String 64 - println("configuring $modid ($project) v$version @ $group") 63 + val isProject = project.projectDir.path.contains("/project/") 64 + 65 65 plugins.withId("java") { 66 - base { 67 - archivesBaseName = modid 68 - } 69 66 java { 70 67 toolchain.languageVersion = JavaLanguageVersion.of(17) 71 68 withSourcesJar() 72 69 } 73 - // be extra sure 74 - version = project.property("mod_version") as String 70 + } 71 + 72 + if (isProject) { 75 73 if (!release) version = "${version}+${p.commit_id.take(7)}" 76 74 group = rootProject.property("maven_group") as String 77 - 78 - tasks.named<Jar>("jar").configure { 79 - from("LICENSE") { 80 - rename { "LICENSE_$modid" } 75 + println("configuring $modid ($project) v$version @ $group") 76 + plugins.withId("java") { 77 + base { 78 + archivesBaseName = modid 79 + } 80 + tasks.named<Jar>("jar").configure { 81 + from("LICENSE") { 82 + rename { "LICENSE_$modid" } 83 + } 84 + duplicatesStrategy = DuplicatesStrategy.WARN 81 85 } 82 - duplicatesStrategy = DuplicatesStrategy.WARN 83 86 } 84 - } 85 87 86 - plugins.withId("scala") { 87 - scala { 88 - scalaVersion = "3.7.1" 89 - } 90 - } 91 - 92 - plugins.withId("fabric-loom") { 93 - extensions.getByType<LoomGradleExtensionAPI>().apply { 94 - splitEnvironmentSourceSets() 95 - runs["client"].programArgs += listOf("--username", "Player", "--uuid", "9e1b34e3-8031-4623-8918-eb7914ab564b") 88 + plugins.withId("fabric-loom") { 89 + extensions.getByType<LoomGradleExtensionAPI>().apply { 90 + splitEnvironmentSourceSets() 91 + runs["client"].programArgs += listOf( 92 + "--username", 93 + "Player", 94 + "--uuid", 95 + "9e1b34e3-8031-4623-8918-eb7914ab564b" 96 + ) 96 97 97 - mods { 98 - register(modid) { 99 - sourceSet("main") 100 - sourceSet("client") 98 + mods { 99 + register(modid) { 100 + sourceSet("main") 101 + sourceSet("client") 102 + } 101 103 } 104 + 105 + mixin.useLegacyMixinAp = false 102 106 } 103 107 104 - mixin.useLegacyMixinAp = false 105 - } 108 + extensions.getByType<net.fabricmc.loom.api.fabricapi.FabricApiExtension>().apply { 109 + configureTests { 110 + modId = modid 111 + eula = true 112 + } 113 + } 106 114 107 - extensions.getByType<net.fabricmc.loom.api.fabricapi.FabricApiExtension>().apply { 108 - configureTests { 109 - modId = modid 110 - eula = true 115 + dependencies { 116 + "modLocalRuntime"("maven.modrinth:ears:1.4.7+fabric-1.20") 111 117 } 112 - } 113 - 114 - dependencies { 115 - "modLocalRuntime"("maven.modrinth:ears:1.4.7+fabric-1.20") 116 - } 117 118 118 - if (project != rootProject) { 119 - tasks.named("runClient") { 120 - doFirst { 121 - val rootOptions = rootProject.file("run/options.txt").toPath() 122 - val options = file("run/options.txt").toPath() 123 - options.deleteIfExists() 124 - Files.createSymbolicLink(options, rootOptions) 119 + if (project != rootProject) { 120 + tasks.named("runClient") { 121 + doFirst { 122 + val rootOptions = rootProject.file("run/options.txt").toPath() 123 + val options = file("run/options.txt").toPath() 124 + options.deleteIfExists() 125 + Files.createSymbolicLink(options, rootOptions) 126 + } 125 127 } 126 128 } 127 - } 128 129 129 - tasks.processResources { 130 - val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 131 - val langRoot = destinationDir.resolve("assets/$modid/lang") 130 + tasks.processResources { 131 + val bookRoot = destinationDir.resolve("assets/hexcasting/patchouli_books/thehexbook") 132 + val langRoot = destinationDir.resolve("assets/$modid/lang") 132 133 133 - doLast { 134 - bookRoot.list()?.forEach { lang -> 135 - val langFile = langRoot.resolve("$lang.json") 136 - if (langFile.exists()) { 137 - val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 138 - var n = 0 139 - for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 140 - if (bookFile.isFile) { 141 - val json = JsonSlurper().parseText(bookFile.readText()) 142 - if (json !is Map<*, *>) continue 143 - json as MutableMap<Any, Any> 144 - val name = json["name"] 145 - if (name is String) { 146 - entries["text.$modid.book.${n}"] = name 147 - json["name"] = "text.$modid.book.${n}" 148 - n++ 149 - } 150 - val pages = json["pages"] 151 - if (pages !is MutableList<*>) continue 152 - pages as MutableList<Any> 153 - for (i in pages.indices) { 154 - val page = pages[i] 155 - if (page is String) { 156 - entries["text.$modid.book.${n}"] = page 157 - pages[i] = "text.$modid.book.${n}" 134 + doLast { 135 + bookRoot.list()?.forEach { lang -> 136 + val langFile = langRoot.resolve("$lang.json") 137 + if (langFile.exists()) { 138 + val entries = JsonSlurper().parseText(langFile.readText()) as MutableMap<String, String> 139 + var n = 0 140 + for (bookFile in bookRoot.resolve(lang).walkTopDown()) { 141 + if (bookFile.isFile) { 142 + val json = JsonSlurper().parseText(bookFile.readText()) 143 + if (json !is Map<*, *>) continue 144 + json as MutableMap<Any, Any> 145 + val name = json["name"] 146 + if (name is String) { 147 + entries["text.$modid.book.${n}"] = name 148 + json["name"] = "text.$modid.book.${n}" 158 149 n++ 159 - } else if (page is MutableMap<*, *>) { 160 - page as MutableMap<Any, Any> 161 - for (key in listOf("text", "title", "header")) { 162 - val text = page[key] 163 - if (text != null && text is String) { 164 - entries["text.$modid.book.${n}"] = text 165 - page[key] = "text.$modid.book.${n}" 166 - n++ 150 + } 151 + val pages = json["pages"] 152 + if (pages !is MutableList<*>) continue 153 + pages as MutableList<Any> 154 + for (i in pages.indices) { 155 + val page = pages[i] 156 + if (page is String) { 157 + entries["text.$modid.book.${n}"] = page 158 + pages[i] = "text.$modid.book.${n}" 159 + n++ 160 + } else if (page is MutableMap<*, *>) { 161 + page as MutableMap<Any, Any> 162 + for (key in listOf("text", "title", "header")) { 163 + val text = page[key] 164 + if (text != null && text is String) { 165 + entries["text.$modid.book.${n}"] = text 166 + page[key] = "text.$modid.book.${n}" 167 + n++ 168 + } 167 169 } 168 170 } 169 171 } 172 + bookFile.writeText(JsonOutput.toJson(json)) 170 173 } 171 - bookFile.writeText(JsonOutput.toJson(json)) 172 174 } 175 + langFile.writeText(JsonOutput.toJson(entries)) 173 176 } 174 - langFile.writeText(JsonOutput.toJson(entries)) 175 177 } 176 178 } 177 179 } 180 + } 181 + } 182 + 183 + plugins.withId("scala") { 184 + scala { 185 + scalaVersion = "3.7.1" 178 186 } 179 187 } 180 188
+1 -15
gradle.properties
··· 1 - # Done to increase the memory available to gradle. 2 1 org.gradle.jvmargs=-Xmx1G 3 2 org.gradle.java.installations.fromEnv=JDK17 4 - # Fabric Properties 5 - # check these on https://modmuss50.me/fabric.html 6 - minecraft_version=1.20.1 7 - yarn_mappings=1.20.1+build.10 8 - loader_version=0.16.14 9 - scala_loader_version=0.3.1.11 10 - # Mod Properties 11 - modid=hexic 12 - mod_version=2.0.0-alpha.01 13 - py_version=1.0 14 - maven_group=org.eu.net.pool 15 - # Dependencies 16 - # check this on https://modmuss50.me/fabric.html 17 - fabric_version=0.92.6+1.20.1 3 + maven_group=org.eu.net.pool
+8
project/hexic/gradle.properties
··· 1 + minecraft_version=1.20.1 2 + yarn_mappings=1.20.1+build.10 3 + loader_version=0.16.14 4 + scala_loader_version=0.3.1.11 5 + modid=hexic 6 + version=2.0.0-alpha.01 7 + py_version=1.0 8 + fabric_version=0.92.6+1.20.1
+2 -2
project/hexxychests/gradle.properties
··· 2 2 yarn_mappings=1.20.1+build.10 3 3 loader_version=0.16.14 4 4 scala_loader_version=0.3.1.11 5 - mod_version=0.1.0 5 + version=0.1.0 6 6 maven_group=org.eu.net.pool 7 7 modid=hexxychests 8 8 archives_base_name=hexxychests 9 - fabric_version=0.92.6+1.20.1 9 + fabric_version=0.92.6+1.20.1
+2 -2
project/hexxytounge/gradle.properties
··· 2 2 yarn_mappings=1.20.1+build.10 3 3 loader_version=0.16.14 4 4 scala_loader_version=0.3.1.11 5 - mod_version=0.1.0 5 + version=0.1.0 6 6 maven_group=org.eu.net.pool 7 7 modid=hexxytognue 8 8 archives_base_name=hexxytognue 9 - fabric_version=0.92.6+1.20.1 9 + fabric_version=0.92.6+1.20.1
+1 -1
project/iotaworks/gradle.properties
··· 2 2 yarn_mappings=1.20.1+build.10 3 3 loader_version=0.16.14 4 4 scala_loader_version=0.3.1.11 5 - mod_version=0.1.3 5 + version=0.1.3 6 6 maven_group=org.eu.net.pool 7 7 modid=iotaworks 8 8 archives_base_name=iotaworks
+1 -1
util/gradle.properties
··· 2 2 yarn_mappings=1.20.1+build.10 3 3 loader_version=0.16.14 4 4 scala_loader_version=0.3.1.11 5 - mod_version=0.1.1 5 + version=0.1.1 6 6 maven_group=org.eu.net.pool 7 7 modid=phlib 8 8 archives_base_name=phlib