Skip to content

Commit 67b5cfa

Browse files
committed
Initial commit
0 parents  commit 67b5cfa

17 files changed

Lines changed: 667 additions & 0 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
run
2+
build
3+
.gradle
4+
.idea
5+
run-data

CHANGELOG.md

Whitespace-only changes.

CHEST.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
IEventBus modBus, Dist dist, ModContainer container
2+
3+
# Proxy
4+
systemProp.http.proxyHost=localhost
5+
systemProp.http.proxyPort=7897
6+
systemProp.https.proxyHost=localhost
7+
systemProp.https.proxyPort=7897

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 狂想ThePotato
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build.gradle

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
import net.darkhax.curseforgegradle.TaskPublishCurseForge
2+
import net.darkhax.curseforgegradle.UploadArtifact
3+
4+
plugins {
5+
id 'dev.architectury.loom' version '1.10-SNAPSHOT'
6+
id "com.github.johnrengelman.shadow" version "8.1.1"
7+
id 'net.darkhax.curseforgegradle' version '1.1.+'
8+
}
9+
10+
boolean isNeo = minecraft_version == "1.21.1"
11+
boolean isOld = minecraft_version == "1.16.5"
12+
13+
boolean useShadow = use_shadow == "true"
14+
boolean useMixin = use_mixin == "true"
15+
boolean useMixinExtras = use_mixin_extras == "true"
16+
boolean useDuplicationLess = use_duplicationless == "true"
17+
boolean claimIntegration = claim_integration == "true"
18+
boolean embeddiumIntegration = embeddium_integration == "true"
19+
20+
if (isNeo) useShadow = false
21+
22+
if (useShadow) {
23+
configurations {
24+
shadow
25+
implementation.extendsFrom(shadow)
26+
}
27+
28+
shadowJar {
29+
configurations = [project.configurations.shadow]
30+
relocate "com.llamalad7.mixinextras", "me.kall.${archives_name}.mixinextras"
31+
mergeServiceFiles()
32+
archiveClassifier = "dev-shadow"
33+
}
34+
35+
remapJar {
36+
dependsOn tasks.named("shadowJar")
37+
inputFile = shadowJar.archiveFile
38+
archiveClassifier = null
39+
}
40+
}
41+
42+
group = project.maven_group
43+
version = "${project.minecraft_version}-${project.mod_version}"
44+
45+
base {
46+
archivesName = project.archives_name
47+
}
48+
49+
loom {
50+
silentMojangMappingsLicense()
51+
52+
if (!isNeo && useMixin) {
53+
forge {
54+
mixinConfig "${archives_name}.mixins.json"
55+
}
56+
}
57+
}
58+
59+
repositories {
60+
maven { name = 'ParchmentMC'; url = 'https://maven.parchmentmc.org' }
61+
maven {
62+
name = "Modrinth"
63+
url = "https://api.modrinth.com/maven"
64+
content { includeGroup "maven.modrinth" }
65+
}
66+
maven {
67+
url "https://cursemaven.com"
68+
content { includeGroup "curse.maven" }
69+
}
70+
maven { name = 'NeoForged'; url = 'https://maven.neoforged.net/releases' }
71+
}
72+
73+
def versionMap = [
74+
"1.20.1": [forge: "47.4.2", parchment: "2023.09.03", ftbChunks: "6431735", ftbLib: "6164053", opac: "6242869", embeddium: "5681725", duplicationless: "7349275"],
75+
"1.19.2": [forge: "43.5.0", parchment: "2022.11.27", ftbChunks: "5710631", ftbLib: "4661834", opac: "6242849", embeddium: "5539178", duplicationless: "7349271"],
76+
"1.18.2": [forge: "40.3.10", parchment: "2022.11.06", ftbChunks: "5423717", ftbLib: "4396792", opac: "6242845", embeddium: "5322305", duplicationless: "7349269"],
77+
"1.16.5": [forge: "36.2.42", parchment: "2022.03.06", ftbChunks: "4297564", ftbLib: "3553840", opac: "unfound" , embeddium: "5322311", duplicationless: "7349267"],
78+
"1.21.1": [neo : "21.1.192", parchment: "2024.11.17", ftbChunks: "6504893", ftbLib: "6711324", opac: "6476205", embeddium: "6118392", duplicationless: "7349264"]
79+
]
80+
81+
LinkedHashMap<String, String> versionInfo = versionMap[minecraft_version]
82+
if (versionInfo == null) throw new IllegalArgumentException("Unsupported version: ${minecraft_version}")
83+
84+
String forgeVersion = versionInfo.forge ?: ""
85+
String parchmentVersion = versionInfo.parchment
86+
String ftbChunks = versionInfo.ftbChunks ?: ""
87+
String ftbLib = versionInfo.ftbLib ?: ""
88+
String opac = versionInfo.opac ?: ""
89+
String embeddium = versionInfo.embeddium ?: ""
90+
String duplicationLess = versionInfo.duplicationless ?: ""
91+
92+
if (isNeo) useMixinExtras = false
93+
94+
dependencies {
95+
minecraft "net.minecraft:minecraft:$project.minecraft_version"
96+
mappings loom.layered {
97+
officialMojangMappings()
98+
parchment("org.parchmentmc.data:parchment-${project.minecraft_version}:${parchmentVersion}@zip")
99+
}
100+
101+
if (isNeo) {
102+
neoForge "net.neoforged:neoforge:${versionInfo.neo}"
103+
} else {
104+
forge "net.minecraftforge:forge:${project.minecraft_version}-${forgeVersion}"
105+
}
106+
107+
if (useShadow) {
108+
if (useMixinExtras) shadow(annotationProcessor("io.github.llamalad7:mixinextras-common:${project.mixinextras_version}"))
109+
}
110+
111+
if (claimIntegration) {
112+
modImplementation("curse.maven:ftb-chunks-forge-314906:${ftbChunks}")
113+
modImplementation("curse.maven:ftb-library-forge-404465:${ftbLib}")
114+
if (!isOld) modImplementation("curse.maven:open-parties-and-claims-636608:${opac}")
115+
}
116+
117+
if (embeddiumIntegration) modImplementation("curse.maven:embeddium-908741:${embeddium}")
118+
if (useDuplicationLess) modImplementation("curse.maven:duplicationless-1380105:${duplicationLess}")
119+
modImplementation("curse.maven:astral-sorcery-241721:3813365")
120+
}
121+
122+
processResources {
123+
inputs.property 'version', project.version
124+
if (isNeo) {
125+
filesMatching('META-INF/neoforge.mods.toml') {
126+
expand version: project.version
127+
}
128+
exclude("META-INF/mods.toml")
129+
} else {
130+
filesMatching('META-INF/mods.toml') {
131+
expand version: project.version
132+
}
133+
exclude("META-INF/neoforge.mods.toml")
134+
}
135+
}
136+
137+
java {
138+
withSourcesJar()
139+
JavaVersion javaVer = isNeo ? JavaVersion.VERSION_21 : (isOld ? JavaVersion.VERSION_1_8 : JavaVersion.VERSION_17)
140+
sourceCompatibility = javaVer
141+
targetCompatibility = javaVer
142+
}
143+
144+
tasks.withType(JavaCompile).configureEach {
145+
it.options.release = isNeo ? 21 : (isOld ? 8 : 17)
146+
}
147+
148+
String currentChangeLog = file("CHANGELOG.md").getText("UTF-8")
149+
String[] javaVersions = isNeo ? ["Java 21", "Java 22"] : (isOld ? ["Java 8", "Java 17", "Java 21", "Java 22"] : ["Java 17", "Java 21", "Java 22"])
150+
151+
tasks.register("publishCurseForge", TaskPublishCurseForge) {
152+
if (cf_project_id != "") {
153+
apiToken = System.getenv("CURSEFORGE_TOKEN")
154+
disableVersionDetection()
155+
156+
UploadArtifact mainFile = upload(cf_project_id, remapJar)
157+
mainFile.displayName = "${archives_name}-${version}"
158+
mainFile.releaseType = "release"
159+
mainFile.changelog = currentChangeLog
160+
mainFile.changelogType = "markdown"
161+
mainFile.addModLoader(isNeo ? "NeoForge" : "Forge")
162+
mainFile.addJavaVersion(javaVersions)
163+
mainFile.addGameVersion(minecraft_version)
164+
if (claimIntegration) {
165+
mainFile.addOptional("ftb-chunks-forge")
166+
if (!isOld) mainFile.addOptional("open-parties-and-claims")
167+
}
168+
if (embeddiumIntegration) mainFile.addOptional("embeddium")
169+
if (useDuplicationLess) mainFile.addRequirement("duplicationless")
170+
171+
UploadArtifact sourcesFile = mainFile.withAdditionalFile(sourcesJar)
172+
sourcesFile.changelog = currentChangeLog
173+
sourcesFile.changelogType = "markdown"
174+
}
175+
}

gradle.properties

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
org.gradle.jvmargs = -Xmx8192m -XX:MaxMetaspaceSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
2+
org.gradle.parallel = true
3+
org.gradle.caching = true
4+
5+
loom.platform = forge
6+
7+
mod_version = 1.0.0
8+
maven_group = me.kall.astrafix
9+
archives_name = astrafix
10+
11+
minecraft_version = 1.16.5
12+
mixinextras_version = 0.5.0
13+
14+
cf_project_id=""
15+
16+
use_shadow=false
17+
use_mixin=true
18+
use_mixin_extras=false
19+
use_duplicationless=false
20+
21+
claim_integration=false
22+
embeddium_integration=false

gradle/wrapper/gradle-wrapper.jar

42.4 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)