Skip to content

Commit 47e8b28

Browse files
authored
Updated to 1.17.1 and Java 16 (#2)
* Updated to 1.17 Release Candidate 1 and Java 16 * Updated to 1.17.1 * Applied suggestion
1 parent 6884897 commit 47e8b28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3636
-3660
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ jobs:
1212
matrix:
1313
# Use these Java versions
1414
java: [
15-
1.8, # Minimum supported by Minecraft
16-
11, # Current Java LTS
17-
15 # Latest version
15+
16 # Minimum supported by Minecraft
1816
]
1917
# and run on both Linux and Windows
2018
os: [ubuntu-20.04, windows-latest]
@@ -34,7 +32,7 @@ jobs:
3432
- name: build
3533
run: ./gradlew assemble
3634
- name: capture build artifacts
37-
if: ${{ runner.os == 'Linux' && matrix.java == '11' }} # Only upload artifacts built from LTS Java on one OS
35+
if: ${{ runner.os == 'Linux' && matrix.java == '16' }} # Only upload artifacts built from latest Java on one OS
3836
uses: actions/upload-artifact@v2
3937
with:
4038
name: Artifacts

.github/workflows/checkstyle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
checkstyle_config: 'checkstyle.xml'
1919
reporter: 'github-pr-check'
20-
level: 'warning'
20+
level: 'error'
2121
fail_on_error: 'true'
2222
tool_name: 'checkstyle'

build.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
plugins {
2-
id 'fabric-loom' version '0.7-SNAPSHOT'
2+
id 'fabric-loom' version '0.8-SNAPSHOT'
33
id 'checkstyle'
44
id 'maven-publish'
55
}
66

7-
sourceCompatibility = JavaVersion.VERSION_1_8
8-
targetCompatibility = JavaVersion.VERSION_1_8
7+
sourceCompatibility = JavaVersion.VERSION_16
8+
targetCompatibility = JavaVersion.VERSION_16
99

1010
archivesBaseName = project.archives_base_name
1111
version = "$project.mod_version+$project.minecraft_version"
@@ -38,10 +38,8 @@ processResources {
3838
tasks.withType(JavaCompile).configureEach {
3939
it.options.encoding = 'UTF-8'
4040

41-
def targetVersion = 8
42-
if (JavaVersion.current().isJava9Compatible()) {
43-
it.options.release = targetVersion
44-
}
41+
// Minecraft 1.17 (21w19a) upwards uses Java 16.
42+
it.options.release = 16
4543
}
4644

4745
java {
@@ -50,7 +48,7 @@ java {
5048

5149
checkstyle {
5250
configFile = rootProject.file('checkstyle.xml')
53-
toolVersion = '8.31'
51+
toolVersion = '8.45'
5452
}
5553

5654
jar {

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
org.gradle.jvmargs=-Xmx1G
22

33
# Fabric Properties
4-
# check these on https://modmuss50.me/fabric.html
5-
minecraft_version=21w18a
6-
yarn_mappings=21w18a+build.5
7-
loader_version=0.11.3
4+
# check these on https://fabricmc.net/versions.html
5+
minecraft_version=1.17.1
6+
yarn_mappings=1.17.1+build.31
7+
loader_version=0.11.6
88

99
# Mod Properties
10-
mod_version = 1.1.0
10+
mod_version = 2.0.0
1111
maven_group = motherlode
1212
archives_base_name = motherlode-api
1313

1414
# Dependencies
15-
fabric_version=0.34.2+1.17
15+
fabric_version=0.37.1+1.17
1616
artifice_version=1.17-SNAPSHOT
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
package motherlode.base;
2-
3-
import net.fabricmc.api.DedicatedServerModInitializer;
4-
import net.fabricmc.api.ModInitializer;
5-
import net.fabricmc.loader.api.FabricLoader;
6-
import motherlode.base.api.Motherlode;
7-
import motherlode.base.api.MotherlodeInitEvents;
8-
import org.apache.logging.log4j.Level;
9-
10-
public class MotherlodeBase implements ModInitializer, DedicatedServerModInitializer {
11-
public static final String MODID = "motherlode-api";
12-
13-
private static boolean moduleInitDone;
14-
15-
@Override
16-
public void onInitialize() {
17-
FabricLoader.getInstance().getEntrypointContainers("motherlode:init", ModInitializer.class)
18-
.forEach(container -> container.getEntrypoint().onInitialize());
19-
moduleInitDone = true;
20-
21-
MotherlodeInitEvents.MAIN.invoker().initialize();
22-
23-
Motherlode.getLogger().log(Level.INFO, "[Motherlode] Initialized.");
24-
}
25-
26-
@Override
27-
public void onInitializeServer() {
28-
MotherlodeInitEvents.DEDICATED_SERVER.invoker().initialize();
29-
}
30-
31-
public static boolean isModuleInitializationDone() {
32-
return moduleInitDone;
33-
}
34-
}
1+
package motherlode.base;
2+
3+
import net.fabricmc.api.DedicatedServerModInitializer;
4+
import net.fabricmc.api.ModInitializer;
5+
import net.fabricmc.loader.api.FabricLoader;
6+
import motherlode.base.api.Motherlode;
7+
import motherlode.base.api.MotherlodeInitEvents;
8+
import org.apache.logging.log4j.Level;
9+
10+
public class MotherlodeBase implements ModInitializer, DedicatedServerModInitializer {
11+
public static final String MODID = "motherlode-api";
12+
13+
private static boolean moduleInitDone;
14+
15+
@Override
16+
public void onInitialize() {
17+
FabricLoader.getInstance().getEntrypointContainers("motherlode:init", ModInitializer.class)
18+
.forEach(container -> container.getEntrypoint().onInitialize());
19+
moduleInitDone = true;
20+
21+
MotherlodeInitEvents.MAIN.invoker().initialize();
22+
23+
Motherlode.getLogger().log(Level.INFO, "[Motherlode] Initialized.");
24+
}
25+
26+
@Override
27+
public void onInitializeServer() {
28+
MotherlodeInitEvents.DEDICATED_SERVER.invoker().initialize();
29+
}
30+
31+
public static boolean isModuleInitializationDone() {
32+
return moduleInitDone;
33+
}
34+
}
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package motherlode.base;
2-
3-
import net.fabricmc.api.ClientModInitializer;
4-
import motherlode.base.api.MotherlodeInitEvents;
5-
6-
public class MotherlodeClient implements ClientModInitializer {
7-
@Override
8-
public void onInitializeClient() {
9-
MotherlodeInitEvents.CLIENT.invoker().initialize();
10-
}
11-
}
1+
package motherlode.base;
2+
3+
import net.fabricmc.api.ClientModInitializer;
4+
import motherlode.base.api.MotherlodeInitEvents;
5+
6+
public class MotherlodeClient implements ClientModInitializer {
7+
@Override
8+
public void onInitializeClient() {
9+
MotherlodeInitEvents.CLIENT.invoker().initialize();
10+
}
11+
}

0 commit comments

Comments
 (0)