Skip to content

Commit 6b57e81

Browse files
committed
fabric 1.21
1 parent 9fd9ba6 commit 6b57e81

File tree

20 files changed

+781
-1
lines changed

20 files changed

+781
-1
lines changed

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[*]
2+
indent_size = 4
3+
indent_style = tab
4+
tab_width = 4
5+
insert_final_newline = true
6+
7+
[*.yml]
8+
indent_size = 2
9+
indent_style = space
10+
11+
[*.java]
12+
ij_java_block_brace_style = end_of_line
13+
ij_java_lambda_brace_style = end_of_line
14+
ij_java_method_brace_style = end_of_line
15+
ij_java_names_count_to_use_import_on_demand = 999
16+
17+
[{*.gant,*.groovy,*.gy,*.gradle}]
18+
ij_groovy_block_brace_style = end_of_line
19+
ij_groovy_class_brace_style = end_of_line
20+
ij_groovy_lambda_brace_style = end_of_line
21+
ij_groovy_method_brace_style = end_of_line
22+
23+
[{*.har,*.json,*.png.mcmeta,mcmod.info,pack.mcmeta}]
24+
ij_json_array_wrapping = split_into_lines

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build
2+
3+
on: [ push, pull_request ]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: JDK Setup
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: 21
19+
distribution: 'temurin'
20+
21+
- name: Gradle Setup
22+
uses: gradle/actions/setup-gradle@v3
23+
with:
24+
validate-wrappers: true
25+
26+
- name: Gradle Build
27+
run: ./gradlew build
28+
29+
- name: Upload Artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: Artifacts
33+
path: build/libs/

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
permissions:
9+
id-token: write
10+
attestations: write
11+
contents: write
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: JDK Setup
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: 21
24+
distribution: 'temurin'
25+
26+
- name: Gradle Setup
27+
uses: gradle/actions/setup-gradle@v3
28+
with:
29+
validate-wrappers: true
30+
31+
- name: Gradle Build
32+
run: ./gradlew build
33+
34+
- name: Attest Build Provenance
35+
uses: actions/attest-build-provenance@v2
36+
with:
37+
subject-path: 'build/libs/*.jar, !build/libs/*-sources.jar'
38+
39+
- name: Maven Publish
40+
run: ./gradlew publish
41+
42+
- name: Github Publish
43+
uses: AButler/[email protected]
44+
with:
45+
files: 'build/libs/*.jar;!build/libs/*-sources.jar'
46+
repo-token: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Modrinth Publish
49+
run: |
50+
./gradlew modrinth
51+
./gradlew modrinthSyncBody
52+
env:
53+
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
54+
CHANGELOG: ${{ github.event.release.body }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# gradle
2+
.gradle/
3+
build/
4+
out/
5+
classes/
6+
7+
# eclipse
8+
*.launch
9+
10+
# idea
11+
.idea/
12+
*.iml
13+
*.ipr
14+
*.iws
15+
16+
# vscode
17+
.settings/
18+
.vscode/
19+
bin/
20+
.classpath
21+
.project
22+
23+
# macos
24+
*.DS_Store
25+
26+
# fabric
27+
run/

LICENSE

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

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
# fabric-template
1+
<!--suppress HtmlDeprecatedTag, XmlDeprecatedElement -->
2+
<center><img alt="mod preview" src="https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png"/></center>
3+
4+
<center>
5+
A short quick summary of this mod
6+
</center>
7+
8+
---
9+
10+
A long description of your mod, including
11+
- Dot point lists of all features
12+
13+
`path/to/config/files` if you have them
14+
15+
Screenshots of features where possible
16+
17+
---
18+
19+
A footnote for special thanks, credits, and other shoutouts - including "created at modfest" banners.

build.gradle

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
//file:noinspection GroovyAssignabilityCheck
2+
//file:noinspection GroovyAccessibility
3+
plugins {
4+
id "maven-publish"
5+
alias libs.plugins.loom
6+
alias libs.plugins.minotaur
7+
}
8+
9+
version = "$modVersion+$branchName"
10+
archivesBaseName = project.slug
11+
12+
repositories {
13+
}
14+
15+
dependencies {
16+
minecraft libs.mc
17+
mappings variantOf(libs.yarn) { classifier "v2" }
18+
19+
modImplementation libs.fl
20+
modImplementation libs.fapi
21+
}
22+
23+
processResources {
24+
final Map<String, String> meta = [
25+
version : version,
26+
modId : modId,
27+
modName : modName,
28+
modDescription: modDescription,
29+
homepage : "https://modrinth.com/mod/${slug}",
30+
issues : "https://github.com/${user}/${slug}/issues",
31+
sources : "https://github.com/${user}/${slug}",
32+
license : license,
33+
authors : authors.split(", ").join("\",\n \""),
34+
contributors : contributors.split(", ").join("\",\n \""),
35+
members : "${authors}${contributors ? ". Contributions by ${contributors}." : ""}",
36+
mc : compatibleVersions.split(", ")[0],
37+
fl : libs.versions.fl.get(),
38+
fapi : libs.versions.fapi.get(),
39+
]
40+
inputs.properties meta
41+
filesMatching("*.mod.json") { expand(meta) }
42+
filesMatching("META-INF/*mods.toml") { expand(meta) }
43+
}
44+
45+
tasks.withType(JavaCompile).configureEach {
46+
it.options.encoding = "UTF-8"
47+
it.options.release = 21
48+
}
49+
50+
java {
51+
withSourcesJar()
52+
sourceCompatibility = JavaVersion.VERSION_21
53+
targetCompatibility = JavaVersion.VERSION_21
54+
}
55+
56+
jar {
57+
from("LICENSE") {
58+
rename { "${it}_${archivesBaseName}" }
59+
}
60+
}
61+
62+
publishing {
63+
repositories {
64+
}
65+
publications {
66+
mavenJava(MavenPublication) {
67+
from components.java
68+
}
69+
}
70+
}
71+
72+
modrinth {
73+
token = "$System.env.MODRINTH_TOKEN"
74+
projectId = slug
75+
versionNumber = project.version
76+
uploadFile = remapJar
77+
gameVersions = compatibleVersions.split(", ").toList()
78+
loaders = compatibleLoaders.split(", ").toList()
79+
changelog = "$System.env.CHANGELOG"
80+
syncBodyFrom = "<!--DO NOT EDIT MANUALLY: synced from gh readme-->\n" + rootProject.file("README.md").text
81+
dependencies {
82+
required.version "fabric-api", libs.versions.fapi.get()
83+
}
84+
}

gradle.properties

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Gradle
2+
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
3+
org.gradle.caching=true
4+
org.gradle.parallel=true
5+
org.gradle.caching.debug=false
6+
org.gradle.configureondemand=true
7+
# Loom
8+
fabric.loom.multiProjectOptimisation=true
9+
# Mod Metadata
10+
group=io.github.username
11+
user=username
12+
slug=mod-id
13+
modId=mod_id
14+
modName=Mod ID
15+
modDescription=Sal doesn't have editing software so he has to make memes through minecraft mod descriptions, making him tonight's big loser.
16+
authors=Anonymous
17+
contributors=all this mod's adoring fans!
18+
license=MIT
19+
# Mod Version
20+
modVersion=0.1.0
21+
# Branch Metadata
22+
branchName=fabric-1.21
23+
compatibleVersions=1.21.1
24+
compatibleLoaders=fabric

gradle/wrapper/gradle-wrapper.jar

42.7 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.2-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)