Skip to content

Commit 2ba2cc8

Browse files
authored
Merge pull request #73 from MoSadie/mc-26.1
Minecraft 26.1
2 parents 1cf8f16 + 93c894f commit 2ba2cc8

File tree

28 files changed

+3307
-24
lines changed

28 files changed

+3307
-24
lines changed

.github/workflows/ci.yml

Lines changed: 93 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v6
1313

1414
# Setup JDK
1515
- name: Set up JDK 8
16-
uses: actions/setup-java@v4
16+
uses: actions/setup-java@v5
1717
with:
1818
distribution: adopt
1919
java-version: 8
2020

2121
- name: Set up Gradle
22-
uses: gradle/actions/setup-gradle@v3
22+
uses: gradle/actions/setup-gradle@v6
23+
with:
24+
build-scan-publish: true
25+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
26+
build-scan-terms-of-use-agree: 'yes'
2327

2428
# Build Core
2529
- name: Build/Install Core
@@ -28,7 +32,7 @@ jobs:
2832

2933
# Upload Maven Local
3034
- name: Upload
31-
uses: actions/upload-artifact@v4
35+
uses: actions/upload-artifact@v7
3236
with:
3337
path: ~/.m2/repository
3438
name: maven
@@ -50,21 +54,25 @@ jobs:
5054

5155
steps:
5256
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
53-
- uses: actions/checkout@v4
57+
- uses: actions/checkout@v6
5458

5559
# Setup JDK
5660
- name: Set up JDK 8
57-
uses: actions/setup-java@v4
61+
uses: actions/setup-java@v5
5862
with:
5963
distribution: adopt
6064
java-version: 8
6165

6266
- name: Set up Gradle
63-
uses: gradle/actions/setup-gradle@v3
67+
uses: gradle/actions/setup-gradle@v6
68+
with:
69+
build-scan-publish: true
70+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
71+
build-scan-terms-of-use-agree: 'yes'
6472

6573
# Download Core
6674
- name: Download Core Artifact
67-
uses: actions/download-artifact@v4
75+
uses: actions/download-artifact@v8
6876
with:
6977
name: maven
7078
path: ~/.m2/repository
@@ -81,7 +89,7 @@ jobs:
8189

8290
# Upload Artifact
8391
- name: Upload Artifact
84-
uses: actions/upload-artifact@v4
92+
uses: actions/upload-artifact@v7
8593
with:
8694
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }}
8795
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar
@@ -108,7 +116,7 @@ jobs:
108116

109117
steps:
110118
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
111-
- uses: actions/checkout@v4
119+
- uses: actions/checkout@v6
112120

113121
# # Setup JDK
114122
# - name: Set up JDK 1.8
@@ -124,17 +132,21 @@ jobs:
124132

125133
# Setup JDK
126134
- name: Set up JDK 1.17
127-
uses: actions/setup-java@v4
135+
uses: actions/setup-java@v5
128136
with:
129137
distribution: 'adopt'
130138
java-version: 17
131139

132140
- name: Set up Gradle
133-
uses: gradle/actions/setup-gradle@v3
141+
uses: gradle/actions/setup-gradle@v6
142+
with:
143+
build-scan-publish: true
144+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
145+
build-scan-terms-of-use-agree: 'yes'
134146

135147
# Download Core
136148
- name: Download Core Artifact
137-
uses: actions/download-artifact@v4
149+
uses: actions/download-artifact@v8
138150
with:
139151
name: maven
140152
path: ~/.m2/repository
@@ -146,7 +158,7 @@ jobs:
146158

147159
# Upload Artifact
148160
- name: Upload Artifact
149-
uses: actions/upload-artifact@v4
161+
uses: actions/upload-artifact@v7
150162
with:
151163
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }}
152164
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar
@@ -165,21 +177,74 @@ jobs:
165177

166178
steps:
167179
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
168-
- uses: actions/checkout@v4
180+
- uses: actions/checkout@v6
169181

170182
# Setup JDK
171183
- name: Set up JDK 21
172-
uses: actions/setup-java@v4
184+
uses: actions/setup-java@v5
173185
with:
174186
distribution: 'microsoft'
175187
java-version: 21
176188

177189
- name: Set up Gradle
178-
uses: gradle/actions/setup-gradle@v3
190+
uses: gradle/actions/setup-gradle@v6
191+
with:
192+
build-scan-publish: true
193+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
194+
build-scan-terms-of-use-agree: 'yes'
195+
196+
# Download Core
197+
- name: Download Core Artifact
198+
uses: actions/download-artifact@v8
199+
with:
200+
name: maven
201+
path: ~/.m2/repository
202+
203+
# Build Minecraft Mod
204+
- name: Build Mod
205+
working-directory: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}
206+
run: './gradlew build --no-daemon'
207+
208+
# Upload Artifact
209+
- name: Upload Artifact
210+
uses: actions/upload-artifact@v7
211+
with:
212+
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }}
213+
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar
214+
215+
buildJava25:
216+
name: Build ${{ matrix.mod-loader }} ${{ matrix.mc-version }}
217+
runs-on: ubuntu-latest
218+
needs: buildCore
219+
220+
# Matrix of jobs to run
221+
strategy:
222+
fail-fast: false
223+
matrix:
224+
mod-loader: ['fabric', 'neoforge']
225+
mc-version: ["26.1"]
226+
227+
steps:
228+
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
229+
- uses: actions/checkout@v6
230+
231+
# Setup JDK
232+
- name: Set up JDK 25
233+
uses: actions/setup-java@v5
234+
with:
235+
distribution: 'microsoft'
236+
java-version: 25
237+
238+
- name: Set up Gradle
239+
uses: gradle/actions/setup-gradle@v6
240+
with:
241+
build-scan-publish: true
242+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
243+
build-scan-terms-of-use-agree: 'yes'
179244

180245
# Download Core
181246
- name: Download Core Artifact
182-
uses: actions/download-artifact@v4
247+
uses: actions/download-artifact@v8
183248
with:
184249
name: maven
185250
path: ~/.m2/repository
@@ -191,7 +256,7 @@ jobs:
191256

192257
# Upload Artifact
193258
- name: Upload Artifact
194-
uses: actions/upload-artifact@v4
259+
uses: actions/upload-artifact@v7
195260
with:
196261
name: ${{ matrix.mod-loader }} ${{ matrix.mc-version }}
197262
path: ./MinecraftMod/${{ matrix.mod-loader }}/${{ matrix.mc-version }}/build/libs/*.jar
@@ -202,20 +267,24 @@ jobs:
202267
needs: buildCore
203268

204269
steps:
205-
- uses: actions/checkout@v4
270+
- uses: actions/checkout@v6
206271

207272
# Setup JDK
208273
- name: Set up JDK 8
209-
uses: actions/setup-java@v4
274+
uses: actions/setup-java@v5
210275
with:
211276
distribution: adopt
212277
java-version: 8
213278

214279
- name: Set up Gradle
215-
uses: gradle/actions/setup-gradle@v3
280+
uses: gradle/actions/setup-gradle@v6
281+
with:
282+
build-scan-publish: true
283+
build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service'
284+
build-scan-terms-of-use-agree: 'yes'
216285

217286
- name: Set up Node.js
218-
uses: actions/setup-node@v4
287+
uses: actions/setup-node@v6
219288
with:
220289
node-version: '20'
221290
cache: 'npm'
@@ -253,7 +322,7 @@ jobs:
253322

254323
# Upload Artifact
255324
- name: Upload Artifact
256-
uses: actions/upload-artifact@v4
325+
uses: actions/upload-artifact@v7
257326
with:
258327
name: Stream Deck Plugin
259328
path: ./effectmc/*.streamDeckPlugin
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# gradle
2+
3+
.gradle/
4+
build/
5+
out/
6+
classes/
7+
8+
# eclipse
9+
10+
*.launch
11+
12+
# idea
13+
14+
.idea/
15+
*.iml
16+
*.ipr
17+
*.iws
18+
19+
# vscode
20+
21+
.settings/
22+
.vscode/
23+
bin/
24+
.classpath
25+
.project
26+
27+
# macos
28+
29+
*.DS_Store
30+
31+
# fabric
32+
33+
run/
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
plugins {
2+
id 'net.fabricmc.fabric-loom' version "${loom_version}"
3+
id 'maven-publish'
4+
}
5+
6+
version = project.mod_version
7+
group = project.maven_group
8+
9+
base {
10+
archivesName = project.archives_base_name + "-fabric-" + project.minecraft_version
11+
}
12+
13+
repositories {
14+
// Add repositories to retrieve artifacts from in here.
15+
// You should only use this when depending on other mods because
16+
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
17+
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
18+
// for more information about repositories.
19+
20+
mavenLocal()
21+
}
22+
23+
loom {
24+
splitEnvironmentSourceSets()
25+
26+
mods {
27+
"effectmc" {
28+
sourceSet sourceSets.main
29+
sourceSet sourceSets.client
30+
}
31+
}
32+
33+
}
34+
35+
dependencies {
36+
// To change the versions see the gradle.properties file
37+
minecraft "com.mojang:minecraft:${project.minecraft_version}"
38+
implementation "net.fabricmc:fabric-loader:${project.loader_version}"
39+
40+
// Fabric API. This is technically optional, but you probably want it anyway.
41+
implementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
42+
43+
// Uncomment the following line to enable the deprecated Fabric API modules.
44+
// These are included in the Fabric API production distribution and allow you to update your mod to the latest modules at a later more convenient time.
45+
46+
// implementation "net.fabricmc.fabric-api:fabric-api-deprecated:${project.fabric_version}"
47+
48+
implementation "com.mosadie.effectmc:core:${project.effectmc_core_version}"
49+
include "com.mosadie.effectmc:core:${project.effectmc_core_version}"
50+
}
51+
processResources {
52+
inputs.property "version", project.version
53+
54+
filesMatching("fabric.mod.json") {
55+
expand "version": project.version
56+
}
57+
}
58+
59+
tasks.withType(JavaCompile).configureEach {
60+
it.options.release = 25
61+
}
62+
63+
java {
64+
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
65+
// if it is present.
66+
// If you remove this line, sources will not be generated.
67+
withSourcesJar()
68+
69+
sourceCompatibility = JavaVersion.VERSION_25
70+
targetCompatibility = JavaVersion.VERSION_25
71+
}
72+
73+
jar {
74+
from("LICENSE") {
75+
rename { "${it}_${project.base.archivesName.get()}"}
76+
}
77+
}
78+
79+
// configure the maven publication
80+
publishing {
81+
publications {
82+
mavenJava(MavenPublication) {
83+
from components.java
84+
}
85+
}
86+
87+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
88+
repositories {
89+
// Add repositories to publish to here.
90+
// Notice: This block does NOT have the same function as the block in the top level.
91+
// The repositories here will be used for publishing your artifact, not for
92+
// retrieving dependencies.
93+
}
94+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Done to increase the memory available to gradle.
2+
org.gradle.jvmargs=-Xmx1G
3+
4+
# Fabric Properties
5+
# check these on https://fabricmc.net/develop
6+
minecraft_version=26.1
7+
loader_version=0.18.4
8+
loom_version=1.15-SNAPSHOT
9+
10+
11+
# Mod Properties
12+
mod_version = 3.1.0
13+
maven_group = com.mosadie.effectmc
14+
archives_base_name = effectmc
15+
16+
# Dependencies
17+
fabric_version=0.144.0+26.1
18+
19+
effectmc_core_version=3.1.0
44.6 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-9.4.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)