Skip to content

Commit ac8fe8a

Browse files
committed
Update minigame to Minecraft 1.20.1
1 parent 3ac57c5 commit ac8fe8a

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,18 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Cache
10-
uses: actions/cache@v2
11-
with:
12-
path: |
13-
~/.gradle/loom-cache
14-
~/.gradle/caches
15-
key: gradle-${{hashFiles('**/*.gradle*')}}
16-
restore-keys: gradle-
179
- name: Checkout
18-
uses: actions/checkout@v2
10+
uses: actions/checkout@v4
1911
- name: Set up Java
20-
uses: actions/setup-java@v1
12+
uses: actions/setup-java@v4
2113
with:
14+
cache: gradle
15+
distribution: microsoft
2216
java-version: 17
2317
- name: Build with Gradle
2418
run: gradle build
2519
- name: Upload Artifacts
26-
uses: actions/upload-artifact@v2
20+
uses: actions/upload-artifact@v4
2721
with:
2822
name: artifacts
2923
path: build/libs

build.gradle

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
plugins {
2-
id "fabric-loom" version "1.2.7"
2+
id "fabric-loom" version "1.8.12"
33
id "maven-publish"
44
}
55

6-
sourceCompatibility = JavaVersion.VERSION_17
7-
targetCompatibility = JavaVersion.VERSION_17
8-
96
archivesBaseName = project.archives_base_name
107
version = project.mod_version
118
group = project.maven_group
@@ -42,7 +39,13 @@ processResources {
4239
}
4340
}
4441

42+
java {
43+
sourceCompatibility = JavaVersion.VERSION_17
44+
targetCompatibility = JavaVersion.VERSION_17
45+
}
46+
4547
tasks.withType(JavaCompile) {
48+
options.release = 17
4649
options.encoding = "UTF-8"
4750
}
4851

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ mod_version = 1.0.0
55
org.gradle.jvmargs = -Xmx1G
66

77
# Versions
8-
minecraft_version = 1.19.4
9-
yarn_mappings = 1.19.4+build.1
10-
loader_version = 0.14.17
11-
fabric_version = 0.76.0+1.19.4
8+
minecraft_version = 1.20.1
9+
yarn_mappings = 1.20.1+build.10
10+
loader_version = 0.16.9
11+
fabric_version = 0.92.2+1.20.1
1212

13-
plasmid_version = 0.5+1.19.4-SNAPSHOT
13+
plasmid_version = 0.5.102-SNAPSHOT+1.20.1

src/main/java/io/github/haykam821/snowballfight/Main.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,20 @@
1010
import xyz.nucleoid.plasmid.game.GameType;
1111

1212
public class Main implements ModInitializer {
13-
public static final String MOD_ID = "snowballfight";
13+
private static final String MOD_ID = "snowballfight";
1414

15-
private static final Identifier SNOWBALL_PROVIDERS_ID = new Identifier(MOD_ID, "snowball_providers");
15+
private static final Identifier SNOWBALL_PROVIDERS_ID = Main.identifier("snowball_providers");
1616
public static final TagKey<Block> SNOWBALL_PROVIDERS = TagKey.of(RegistryKeys.BLOCK, SNOWBALL_PROVIDERS_ID);
1717

18-
private static final Identifier SNOWBALL_FIGHT_ID = new Identifier(MOD_ID, "snowball_fight");
18+
private static final Identifier SNOWBALL_FIGHT_ID = Main.identifier("snowball_fight");
1919
public static final GameType<SnowballFightConfig> SNOWBALL_FIGHT_TYPE = GameType.register(SNOWBALL_FIGHT_ID, SnowballFightConfig.CODEC, SnowballFightWaitingPhase::open);
2020

2121
@Override
2222
public void onInitialize() {
2323
return;
2424
}
25+
26+
public static Identifier identifier(String path) {
27+
return new Identifier(MOD_ID, path);
28+
}
2529
}

src/main/resources/fabric.mod.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"icon": "assets/snowballfight/icon.png",
2121
"depends": {
2222
"fabricloader": ">=0.4.0",
23+
"java": ">=17",
2324
"plasmid": ">=0.5.0"
2425
}
2526
}

0 commit comments

Comments
 (0)