Skip to content

Commit

Permalink
Update minigame to Minecraft 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
haykam821 committed Nov 24, 2024
1 parent 3ac57c5 commit ac8fe8a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 7 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
plugins {
id "fabric-loom" version "1.2.7"
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
Expand Down Expand Up @@ -42,7 +39,13 @@ processResources {
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType(JavaCompile) {
options.release = 17
options.encoding = "UTF-8"
}

Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.1
loader_version = 0.14.17
fabric_version = 0.76.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
10 changes: 7 additions & 3 deletions src/main/java/io/github/haykam821/snowballfight/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@
import xyz.nucleoid.plasmid.game.GameType;

public class Main implements ModInitializer {
public static final String MOD_ID = "snowballfight";
private static final String MOD_ID = "snowballfight";

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

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

@Override
public void onInitialize() {
return;
}

public static Identifier identifier(String path) {
return new Identifier(MOD_ID, path);
}
}
1 change: 1 addition & 0 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"icon": "assets/snowballfight/icon.png",
"depends": {
"fabricloader": ">=0.4.0",
"java": ">=17",
"plasmid": ">=0.5.0"
}
}

0 comments on commit ac8fe8a

Please sign in to comment.