From 485056e0eea412088b992356b4f5f72fa8c34f3d Mon Sep 17 00:00:00 2001 From: haykam821 <24855774+haykam821@users.noreply.github.com> Date: Sun, 24 Nov 2024 12:55:59 -0500 Subject: [PATCH] Update minigame to Minecraft 1.20.1 --- .github/workflows/build.yml | 16 +++++----------- build.gradle | 11 +++++++---- gradle.properties | 10 +++++----- .../io/github/haykam821/parkourrun/Main.java | 10 +++++++--- .../game/map/ParkourRunChunkGenerator.java | 8 ++++---- src/main/resources/fabric.mod.json | 4 +++- 6 files changed, 31 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18e1b13..05b2b40 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,24 +6,18 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/loom-cache - ~/.gradle/caches - key: gradle-${{hashFiles('**/*.gradle*')}} - restore-keys: gradle- - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: + cache: gradle + distribution: microsoft java-version: 17 - name: Build with Gradle run: gradle build - name: Upload Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: artifacts path: build/libs \ No newline at end of file diff --git a/build.gradle b/build.gradle index 89e9339..2f9c127 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,8 @@ plugins { - id "fabric-loom" version "1.3.8" + id "fabric-loom" version "1.8.12" id "maven-publish" } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 - archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -46,7 +43,13 @@ processResources { } } +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} + tasks.withType(JavaCompile) { + options.release = 17 options.encoding = "UTF-8" } diff --git a/gradle.properties b/gradle.properties index 007bf8e..038ba4b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,9 +5,9 @@ mod_version = 1.0.0 org.gradle.jvmargs = -Xmx1G # Versions -minecraft_version = 1.19.4 -yarn_mappings = 1.19.4+build.2 -loader_version = 0.14.21 -fabric_version = 0.85.0+1.19.4 +minecraft_version = 1.20.1 +yarn_mappings = 1.20.1+build.10 +loader_version = 0.16.9 +fabric_version = 0.92.2+1.20.1 -plasmid_version = 0.5+1.19.4-SNAPSHOT +plasmid_version = 0.5.102-SNAPSHOT+1.20.1 diff --git a/src/main/java/io/github/haykam821/parkourrun/Main.java b/src/main/java/io/github/haykam821/parkourrun/Main.java index ea79652..b8ffdc7 100644 --- a/src/main/java/io/github/haykam821/parkourrun/Main.java +++ b/src/main/java/io/github/haykam821/parkourrun/Main.java @@ -10,16 +10,20 @@ import xyz.nucleoid.plasmid.game.GameType; public class Main implements ModInitializer { - public static final String MOD_ID = "parkourrun"; + private static final String MOD_ID = "parkourrun"; - private static final Identifier ENDING_PLATFORMS_ID = new Identifier(MOD_ID, "ending_platforms"); + private static final Identifier ENDING_PLATFORMS_ID = Main.identifier("ending_platforms"); public static final TagKey ENDING_PLATFORMS = TagKey.of(RegistryKeys.BLOCK, ENDING_PLATFORMS_ID); - private static final Identifier PARKOUR_RUN_ID = new Identifier(MOD_ID, "parkour_run"); + private static final Identifier PARKOUR_RUN_ID = Main.identifier("parkour_run"); public static final GameType PARKOUR_RUN_TYPE = GameType.register(PARKOUR_RUN_ID, ParkourRunConfig.CODEC, ParkourRunWaitingPhase::open); @Override public void onInitialize() { return; } + + public static Identifier identifier(String path) { + return new Identifier(MOD_ID, path); + } } \ No newline at end of file diff --git a/src/main/java/io/github/haykam821/parkourrun/game/map/ParkourRunChunkGenerator.java b/src/main/java/io/github/haykam821/parkourrun/game/map/ParkourRunChunkGenerator.java index 8f35790..41718e4 100644 --- a/src/main/java/io/github/haykam821/parkourrun/game/map/ParkourRunChunkGenerator.java +++ b/src/main/java/io/github/haykam821/parkourrun/game/map/ParkourRunChunkGenerator.java @@ -31,10 +31,10 @@ import xyz.nucleoid.plasmid.game.world.generator.GameChunkGenerator; public class ParkourRunChunkGenerator extends GameChunkGenerator { - private static final Identifier STARTS_ID = new Identifier(Main.MOD_ID, "starts"); - private static final Identifier AREAS_ID = new Identifier(Main.MOD_ID, "areas"); - private static final Identifier CONNECTORS_ID = new Identifier(Main.MOD_ID, "connectors"); - private static final Identifier ENDINGS_ID = new Identifier(Main.MOD_ID, "endings"); + private static final Identifier STARTS_ID = Main.identifier("starts"); + private static final Identifier AREAS_ID = Main.identifier("areas"); + private static final Identifier CONNECTORS_ID = Main.identifier("connectors"); + private static final Identifier ENDINGS_ID = Main.identifier("endings"); private final ParkourRunMap map; private final StructureTemplateManager structureTemplateManager; diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 8c6b740..c01733a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -20,6 +20,8 @@ "license": "MIT", "icon": "assets/parkourrun/icon.png", "depends": { - "fabricloader": ">=0.5.0" + "fabricloader": ">=0.5.0", + "java": ">=17", + "plasmid": ">=0.5.0" } }