From 21e1dd38c3ad359b7a0748e30f2dd0c7eebf341a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 08:18:34 +0200 Subject: [PATCH 1/9] Port --- .github/scripts/generate-run-matrix.sh | 16 ++++ .github/scripts/run-client.sh | 1 + .github/scripts/run-server.sh | 1 + .github/workflows/build.yml | 94 +++++++++++++++------ .github/workflows/publish.yml | 45 +++++----- CHANGELOG.md | 5 ++ build.gradle | 49 ++++++++--- common/build.gradle | 32 +------ fabric/build.gradle | 53 +++--------- fabric/src/main/resources/fabric.mod.json | 4 +- forge/build.gradle | 43 ++++------ forge/src/main/resources/META-INF/mods.toml | 2 +- gradle.properties | 10 ++- gradle/wrapper/gradle-wrapper.properties | 2 +- 14 files changed, 187 insertions(+), 170 deletions(-) create mode 100755 .github/scripts/generate-run-matrix.sh diff --git a/.github/scripts/generate-run-matrix.sh b/.github/scripts/generate-run-matrix.sh new file mode 100755 index 0000000..8d64e1e --- /dev/null +++ b/.github/scripts/generate-run-matrix.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +matrix_content="{\"include\":[" +enabled_platforms=$(awk -F= '/enabled_platforms/{print $2}' gradle.properties | tr -d ' ') +version=$(awk -F= '/minecraft_version/{print $2; exit}' gradle.properties | tr -d ' ') + +for platform in $(echo $enabled_platforms | tr ',' ' '); do + matrix_entry="{\"mod_loader\":\"$platform\",\"version\":\"$version\",\"script\":\"client\"}," + matrix_content+="$matrix_entry" + matrix_entry="{\"mod_loader\":\"$platform\",\"version\":\"$version\",\"script\":\"server\"}," + matrix_content+="$matrix_entry" +done + +matrix_content="${matrix_content%,}]}" +echo "Generated matrix: $matrix_content" +echo "::set-output name=matrix::$matrix_content" \ No newline at end of file diff --git a/.github/scripts/run-client.sh b/.github/scripts/run-client.sh index a4fd778..852d3c1 100755 --- a/.github/scripts/run-client.sh +++ b/.github/scripts/run-client.sh @@ -6,6 +6,7 @@ SUCCESS_PATTERN='minecraft:textures/atlas/mob_effects\.png-atlas' ERROR_PATTERNS=( 'For more details see the full crash report file' ' end of report ' + 'Failed download after 3 attempts' ) TIMEOUT=1800 ELAPSED=0 diff --git a/.github/scripts/run-server.sh b/.github/scripts/run-server.sh index a8dfe97..3923355 100755 --- a/.github/scripts/run-server.sh +++ b/.github/scripts/run-server.sh @@ -8,6 +8,7 @@ SUCCESS_PATTERN='For help, type "help"' ERROR_PATTERNS=( 'For more details see the full crash report file' ' end of report ' + 'Failed download after 3 attempts' ) TIMEOUT=1800 ELAPSED=0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fb4abc..c131c01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,54 +11,98 @@ on: jobs: build: + name: "Build project" runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - mod_loader: [fabric, forge, neoforge] - script: [client, server] - - name: Run ${{ matrix.mod_loader }} ${{ matrix.script }} timeout-minutes: 15 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: "Checkout repository" - uses: actions/checkout@v4.1.1 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: "Check if the mod loader is supported" - id: check-mod-loader + - name: "Parse gradle properties" + id: gradle-properties run: | - if [ -d ${{ matrix.mod_loader }} ]; then - echo "Mod loader is supported" - echo "is_mod_loader_supported=true" >> $GITHUB_OUTPUT - else - echo "Mod loader is not supported" - echo "is_mod_loader_supported=false" >> $GITHUB_OUTPUT - fi + while IFS='=' read -r key value; do + key=$(echo $key | awk '{$1=$1;print}') + value=$(echo $value | awk '{$1=$1;print}') + + case "$key" in + minecraft_version) echo "MINECRAFT_VERSION=$value" >> $GITHUB_OUTPUT ;; + mod_name) echo "MOD_NAME=$value" >> $GITHUB_OUTPUT ;; + mod_version) echo "MOD_VERSION=$value" >> $GITHUB_OUTPUT ;; + enabled_platforms) echo "ENABLED_PLATFORMS=$value" >> $GITHUB_OUTPUT ;; + esac + done < gradle.properties - - name: "Set up JDK" - if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' - uses: actions/setup-java@v4.0.0 + - name: "Set up JDK 17" + if: steps.gradle-properties.outputs.MINECRAFT_VERSION != '1.20.6' && steps.gradle-properties.outputs.MINECRAFT_VERSION != '1.21' + uses: actions/setup-java@v4 with: java-version: 17 distribution: temurin + - name: "Set up JDK 21" + if: steps.gradle-properties.outputs.MINECRAFT_VERSION == '1.20.6' || steps.gradle-properties.outputs.MINECRAFT_VERSION == '1.21' + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + + - name: "Run gradle build" + uses: gradle/gradle-build-action@v3 + with: + generate-job-summary: false + gradle-version: wrapper + arguments: build + + - name: "Generate matrix for the run job" + id: set-matrix + run: ./.github/scripts/generate-run-matrix.sh + + run: + name: Run ${{ matrix.mod_loader }} ${{ matrix.script }} + runs-on: ubuntu-latest + needs: build + strategy: + fail-fast: false + matrix: ${{fromJson(needs.build.outputs.matrix)}} + timeout-minutes: 15 + + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: "Set up JDK 17" + if: matrix.mod_loader.version != '1.20.6' && matrix.mod_loader.version != '1.21' + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + + - name: "Set up JDK 21" + if: matrix.version == '1.20.6' || matrix.version == '1.21' + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + - name: "Setup Gradle and run build" - if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' - uses: gradle/gradle-build-action@v2.11.1 + uses: gradle/gradle-build-action@v3 with: - cache-read-only: false + cache-read-only: true gradle-version: wrapper arguments: ${{ matrix.mod_loader }}:build - name: "Accept eula" - if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' run: mkdir -p ${{ matrix.mod_loader }}/run && echo "eula=true" > ${{ matrix.mod_loader }}/run/eula.txt - name: Run ${{ matrix.mod_loader }} ${{ matrix.script }} - if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' uses: modmuss50/xvfb-action@v1 with: run: ./.github/scripts/run-${{ matrix.script }}.sh ${{ matrix.mod_loader }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 33d3986..55c9ba0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ on: branches: description: 'List of branches to be published' required: true - default: "['1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4']" + default: "['1.19.2', '1.19.3', '1.19.4', '1.20.1', '1.20.2', '1.20.4', '1.20.6', '1.21']" type: string jobs: @@ -27,41 +27,28 @@ jobs: mod_loader: ${{ fromJson(inputs.mod_loaders) }} include: - mod_loader: "fabric" - supported_mod_loaders: ["fabric", "quilt"] + supported_mod_loaders: [ "fabric", "quilt" ] secondary_game_version: "" curseforge_id: ${{ vars.CURSEFORGE_FABRIC_PROJECT_ID }} modrinth_id: ${{ vars.MODRINTH_FABRIC_PROJECT_ID }} - mod_loader: "forge" - supported_mod_loaders: ["forge"] + supported_mod_loaders: [ "forge" ] secondary_game_version: "" curseforge_id: ${{ vars.CURSEFORGE_FORGE_PROJECT_ID }} modrinth_id: ${{ vars.MODRINTH_FORGE_PROJECT_ID }} - mod_loader: "neoforge" - supported_mod_loaders: ["neoforge"] + supported_mod_loaders: [ "neoforge" ] secondary_game_version: "" curseforge_id: ${{ vars.CURSEFORGE_FORGE_PROJECT_ID }} modrinth_id: ${{ vars.MODRINTH_FORGE_PROJECT_ID }} - - branch: "1.20.1" - mod_loader: "forge" - supported_mod_loaders: ["forge", "neoforge"] - secondary_game_version: "1.20" - curseforge_id: ${{ vars.CURSEFORGE_FORGE_PROJECT_ID }} - modrinth_id: ${{ vars.MODRINTH_FORGE_PROJECT_ID }} - - - branch: "1.20.1" - secondary_game_version: "1.20" - - - branch: "1.20.4" - secondary_game_version: "1.20.3" - steps: - name: "Checkout repository" uses: actions/checkout@v4.1.1 with: - ref: ${{ matrix.branch }} + ref: ${{ matrix.branch }} fetch-depth: 0 - name: "Check if the mod loader is supported" @@ -75,13 +62,6 @@ jobs: echo "is_mod_loader_supported=false" >> $GITHUB_OUTPUT fi - - name: "Set up JDK" - if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' - uses: actions/setup-java@v4.0.0 - with: - java-version: 17 - distribution: temurin - - name: "Parse gradle properties" if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' id: gradle-properties @@ -121,6 +101,20 @@ jobs: name: ${{ steps.gradle-properties.outputs.MOD_NAME }} ${{ steps.gradle-properties.outputs.MOD_VERSION }} for Minecraft ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} bodyFile: RELEASE_CHANGELOG.md + - name: "Set up JDK 17" + if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' && steps.gradle-properties.outputs.MINECRAFT_VERSION != '1.20.6' && steps.gradle-properties.outputs.MINECRAFT_VERSION != '1.21' + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + + - name: "Set up JDK 21" + if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' && steps.gradle-properties.outputs.MINECRAFT_VERSION == '1.20.6' || steps.gradle-properties.outputs.MINECRAFT_VERSION == '1.21' + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: temurin + - name: "Setup gradle and run build" if: steps.check-mod-loader.outputs.is_mod_loader_supported == 'true' uses: gradle/gradle-build-action@v2.11.1 @@ -136,6 +130,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} github-tag: mc${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }}-${{ steps.gradle-properties.outputs.MOD_VERSION }} + github-commitish: ${{ steps.gradle-properties.outputs.MINECRAFT_VERSION }} curseforge-id: ${{ matrix.curseforge_id }} curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ba11900..2a95de3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.1 + +- Ported to 1.20.6/1.21 +- Internal refactor + ## 2.0.0 - Fixed tall flower spawns diff --git a/build.gradle b/build.gradle index c63120e..af8a854 100644 --- a/build.gradle +++ b/build.gradle @@ -1,22 +1,18 @@ plugins { id "architectury-plugin" version "3.4-SNAPSHOT" - id "dev.architectury.loom" version "1.4-SNAPSHOT" apply false + id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false } architectury { - minecraft = rootProject.minecraft_version + minecraft = minecraft_version } subprojects { apply plugin: "dev.architectury.loom" - loom { - silentMojangMappingsLicense() - } - dependencies { - minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" - mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}" + minecraft "com.mojang:minecraft:${minecraft_version}" + mappings "net.fabricmc:yarn:${yarn_mappings}" } } @@ -24,9 +20,32 @@ allprojects { apply plugin: "java" apply plugin: "architectury-plugin" - group = rootProject.maven_group - version = rootProject.mod_version - archivesBaseName = "${rootProject.mod_id}-mc${rootProject.minecraft_version}" + group = maven_group + version = mod_version + archivesBaseName = "${mod_id}-mc${minecraft_version}" + + + processResources { + def expandProps = [ + 'modId' : mod_id, + 'modName' : mod_name, + 'modDescription' : mod_description, + 'modVersion' : mod_version, + 'modAuthor' : mod_author, + "minecraftVersion" : minecraft_version, + "minMinecraftVersion" : min_minecraft_version, + "fabricLoaderVersion" : fabric_loader_version, + "fabricApiVersion" : fabric_api_version, + "forgeVersion" : forge_version, + "friendsAndFoesVersion": friendsandfoes_version + ] + + filesMatching(['fabric.mod.json', 'META-INF/mods.toml']) { + expand expandProps + } + + inputs.properties(expandProps) + } repositories { maven { @@ -35,12 +54,14 @@ allprojects { } } - tasks.withType(JavaCompile) { - options.encoding = "UTF-8" - options.release = 17 + tasks.withType(JavaCompile).configureEach { + it.options.release = 17 } java { withSourcesJar() + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } } diff --git a/common/build.gradle b/common/build.gradle index d6b8f41..331db6a 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,35 +1,9 @@ architectury { - common(rootProject.enabled_platforms.split(",")) + common(enabled_platforms.split(",")) } dependencies { - modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" + modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" - // Mixin extras (https://github.com/LlamaLad7/MixinExtras) - implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${rootProject.mixin_extras_version}")) -} - -repositories { - maven { - name = 'Fabric' - url = 'https://maven.fabricmc.net/' - } - - maven { - name = "Modrinth" - url = "https://api.modrinth.com/maven" - - content { - includeGroup "maven.modrinth" - } - } - - maven { - url "https://maven.terraformersmc.com/releases/" - content { - includeGroup "com.terraformersmc" - } - } - - maven { url "https://www.cursemaven.com" } + implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}")) } \ No newline at end of file diff --git a/fabric/build.gradle b/fabric/build.gradle index eb77349..673f79c 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -2,8 +2,12 @@ plugins { id "com.github.johnrengelman.shadow" version "8.1.1" } +def modrinth(String name, String version) { + return "maven.modrinth:$name:$version" +} + allprojects { - archivesBaseName = "friendsandfoes-beekeeperhut-fabric-mc${rootProject.minecraft_version}" + archivesBaseName = "${mod_id}-fabric-mc${minecraft_version}" } architectury { @@ -11,10 +15,6 @@ architectury { fabric() } -loom { - accessWidenerPath = project(":common").loom.accessWidenerPath -} - configurations { common shadowCommon @@ -25,42 +25,18 @@ configurations { dependencies { // Core dependencies - modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" - modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}" + modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" + modApi "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}" // Mixin extras (https://github.com/LlamaLad7/MixinExtras) - include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${rootProject.mixin_extras_version}"))) + include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${mixin_extras_version}"))) - modRuntimeOnly "curse.maven:friendsandfoes-551364:5012381" + modRuntimeOnly(modrinth("friends-and-foes", "fabric-mc${minecraft_version}-${friendsandfoes_version}")) common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false } } -processResources { - inputs.property 'modId', rootProject.mod_id - inputs.property 'modName', rootProject.mod_name - inputs.property 'modDescription', rootProject.mod_description - inputs.property 'modVersion', rootProject.mod_version - inputs.property 'modAuthor', rootProject.mod_author - inputs.property "minecraftVersion", rootProject.minecraft_version - inputs.property "fabricLoaderVersion", rootProject.fabric_loader_version - inputs.property "fabricApiVersion", rootProject.fabric_api_version - - filesMatching("fabric.mod.json") { - expand([ - 'modId' : rootProject.mod_id, - 'modName' : rootProject.mod_name, - 'modDescription' : rootProject.mod_description, - 'modVersion' : rootProject.mod_version, - 'modAuthor' : rootProject.mod_author, - "minecraftVersion" : rootProject.minecraft_version, - "fabricLoaderVersion": rootProject.fabric_loader_version, - "fabricApiVersion" : rootProject.fabric_api_version - ]) - } -} - shadowJar { exclude "architectury.common.json" @@ -70,7 +46,7 @@ shadowJar { remapJar { injectAccessWidener = true - input.set shadowJar.archiveFile + inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } @@ -105,13 +81,4 @@ repositories { includeGroup "maven.modrinth" } } - - maven { - url "https://maven.terraformersmc.com/releases/" - content { - includeGroup "com.terraformersmc" - } - } - - maven { url "https://www.cursemaven.com" } } \ No newline at end of file diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index b00ae77..aa54f7a 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -24,9 +24,9 @@ }, "depends": { "java": ">=17", - "minecraft": ">=${minecraftVersion}", + "minecraft": ">=${minMinecraftVersion}", "fabricloader": ">=${fabricLoaderVersion}", "fabric": ">=${fabricApiVersion}", - "friendsandfoes": ">=2.0.7" + "friendsandfoes": ">=${friendsAndFoesVersion}" } } \ No newline at end of file diff --git a/forge/build.gradle b/forge/build.gradle index 2011ead..7a8f5a4 100644 --- a/forge/build.gradle +++ b/forge/build.gradle @@ -2,8 +2,12 @@ plugins { id "com.github.johnrengelman.shadow" version "8.1.1" } +def modrinth(String name, String version) { + return "maven.modrinth:$name:$version" +} + allprojects { - archivesBaseName = "friendsandfoes-beekeeperhut-forge-mc${rootProject.minecraft_version}" + archivesBaseName = "${mod_id}-forge-mc${minecraft_version}" } architectury { @@ -23,35 +27,15 @@ dependencies { forge "net.minecraftforge:forge:${rootProject.minecraft_version}-${rootProject.forge_version}" // Mixin extras (https://github.com/LlamaLad7/MixinExtras) - implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${rootProject.mixin_extras_version}")) - implementation(include("io.github.llamalad7:mixinextras-forge:${rootProject.mixin_extras_version}")) + implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}")) + implementation(include("io.github.llamalad7:mixinextras-forge:${mixin_extras_version}")) - modRuntimeOnly "curse.maven:friendsandfoes-forge-602059:5012380" + modRuntimeOnly(modrinth("friends-and-foes-forge", "forge-mc${minecraft_version}-${friendsandfoes_version}")) common(project(path: ":common", configuration: "namedElements")) { transitive false } shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false } } -processResources { - inputs.property "modId", rootProject.mod_id - inputs.property "modVersion", rootProject.mod_version - inputs.property "modName", rootProject.mod_name - inputs.property "modDescription", rootProject.mod_description - inputs.property "modAuthor", rootProject.mod_author - inputs.property "minecraftVersion", rootProject.minecraft_version - inputs.property "forgeVersion", rootProject.forge_version - - filesMatching("META-INF/mods.toml") { - expand "modId": rootProject.mod_id, - "modVersion": rootProject.mod_version, - "modName": rootProject.mod_name, - "modDescription": rootProject.mod_description, - "modAuthor": rootProject.mod_author, - "minecraftVersion": rootProject.minecraft_version, - "forgeVersion": rootProject.forge_version - } -} - shadowJar { exclude "fabric.mod.json" exclude "architectury.common.json" @@ -61,7 +45,7 @@ shadowJar { } remapJar { - input.set shadowJar.archiveFile + inputFile.set shadowJar.archiveFile dependsOn shadowJar archiveClassifier.set(null) } @@ -83,5 +67,12 @@ components.java { } repositories { - maven { url "https://www.cursemaven.com" } + maven { + name = "Modrinth" + url = "https://api.modrinth.com/maven" + + content { + includeGroup "maven.modrinth" + } + } } \ No newline at end of file diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 39e8fe7..883d3dd 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -25,4 +25,4 @@ versionRange = "[${minecraftVersion},)" [[dependencies.${ modId }]] modId = "friendsandfoes" mandatory = true -versionRange = "[2.0.7,)" +versionRange = "[${friendsandfoesVersion},)" diff --git a/gradle.properties b/gradle.properties index 832a458..3e76c34 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,22 +8,24 @@ org.gradle.configureondemand=false # Mod mod_name=Friends&Foes - Beekeeper Hut mod_id=beekeeperhut -mod_version=2.0.0 +mod_version=2.0.1 mod_author=Faboslav mod_description=An addon for the Friends&Foes mod, adding a beekeeper hut structure. maven_group=com.faboslav.friendsandfoes.beekeeperhut -#Minecraft +# Minecraft minecraft_version=1.19.2 +min_minecraft_version=1.19.2 -#Mappings +# Mappings yarn_mappings=1.19.2+build.28:v2 # Architectury enabled_platforms=fabric,forge # Common -mixin_extras_version=0.2.1 +mixin_extras_version=0.3.6 +friendsandfoes_version=2.0.7 # Fabric https://fabricmc.net/versions.html fabric_loader_version=0.14.21 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 744c64d..2617362 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From fbfad45825f6949f5847e97af709492e95cf90f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 08:18:57 +0200 Subject: [PATCH 2/9] Removed unused assets --- .github/assets/curseforge/quilt.html | 98 ---------------------------- .github/assets/modrinth/quilt.md | 72 -------------------- 2 files changed, 170 deletions(-) delete mode 100644 .github/assets/curseforge/quilt.html delete mode 100644 .github/assets/modrinth/quilt.md diff --git a/.github/assets/curseforge/quilt.html b/.github/assets/curseforge/quilt.html deleted file mode 100644 index 102ae82..0000000 --- a/.github/assets/curseforge/quilt.html +++ /dev/null @@ -1,98 +0,0 @@ -
- -

- Friends&Foes - Beekeeper Hut -

- -
- -

Beekeeper Hut (Quilt)

- -

- -

- -

- - - - - - - - - - - - - - - -

- -
- -

- Friends&Foes - Beekeeper Hut is a small addon adding the beekeeper hut structure. Structure can be found in meadow and flower forest biomes. You can check the wiki to get more information about the beekeeper. -
-
- Be aware that the main Friends&Foes mod is required to run this addon. Looking for the Fabric or Forge version? -

- -
- -

🍯 Beekeeper huts

-

- -

- - - - - - - - -
  
- -
- -

⚙️ Other addons / compat datapacks

-

- -

- - -
- -

💬 Community

-

- -

-

- Feel free to join our community at the discord server to chat, share your creations, ask any question or to simply be updated about the latest development of the mod and notified when the new release is out. Also don't hesitate to report any crash or bug via GitHub issues. -

- -
- -

👋 Support

-

- -

-

I will continue to develop my mods regardless of any support as it is my hobby, although most of my free time goes into development of my mods. So if you want to support me anyway, you can do that via Patreon or Ko-fi. That said, I do appreciate all of your support.

- -
- -

📜 License

-

- -

-

- The mod is licensed with CC BY-NC-ND 4.0 license. -

-

- Feel free to look over my code for examples of how i have implemented and solved various problems while writing this mod, incorporate snippets into your own code. Also feel free to use this mod in any modpack (although credit/link back to this page will be greatly appreciated). -

\ No newline at end of file diff --git a/.github/assets/modrinth/quilt.md b/.github/assets/modrinth/quilt.md deleted file mode 100644 index 4987cbd..0000000 --- a/.github/assets/modrinth/quilt.md +++ /dev/null @@ -1,72 +0,0 @@ -
- -
- Friends&Foes - Beekeeper Hut -

Beekeeper Hut (Quilt)

-
- -
-

- - - - - - - - - - - - - - - -

-
- -

- Friends&Foes - Beekeeper Hut is a small addon adding the beekeeper hut structure. Structure can be found in meadow and flower forest biomes. -
-
- Be aware that the main Friends&Foes mod is required to run this addon. Looking for the Fabric or Forge version? -

- -

🍯 Beekeeper huts

-

- -    - -

- -
- -

⚙️ Other addons / compat datapacks

- - -
- -

💬 Community

-

- Feel free to join our community at the discord server to chat, share your creations, ask any question or to simply be updated about the latest development of the mod and notified when the new release is out. Also don't hesitate to report any crash or bug via GitHub issues. -

- -
- -

👋 Support

- -

I will continue to develop my mods regardless of any support as it is my hobby, although most of my free time goes into development of my mods. So if you want to support me anyway, you can do that via Patreon or Ko-fi. That said, I do appreciate all of your support.

- -
- -

📜 License

- -

- The mod is licensed with CC BY-NC-ND 4.0 license. -

-

- Feel free to look over my code for examples of how i have implemented and solved various problems while writing this mod, incorporate snippets into your own code. Also feel free to use this mod in any modpack (although credit/link back to this page will be greatly appreciated). -

\ No newline at end of file From c7857f98b74c306adb9cbc833f225d6f29a6831e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 10:09:44 +0200 Subject: [PATCH 3/9] build fix --- forge/src/main/resources/META-INF/mods.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge/src/main/resources/META-INF/mods.toml b/forge/src/main/resources/META-INF/mods.toml index 883d3dd..f42c6d2 100644 --- a/forge/src/main/resources/META-INF/mods.toml +++ b/forge/src/main/resources/META-INF/mods.toml @@ -25,4 +25,4 @@ versionRange = "[${minecraftVersion},)" [[dependencies.${ modId }]] modId = "friendsandfoes" mandatory = true -versionRange = "[${friendsandfoesVersion},)" +versionRange = "[${friendsAndFoesVersion},)" From 07311e03fab623864382176a39a40bb83968afe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 21:44:31 +0200 Subject: [PATCH 4/9] Fixed fabric version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 3e76c34..3f2068c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,7 +28,7 @@ mixin_extras_version=0.3.6 friendsandfoes_version=2.0.7 # Fabric https://fabricmc.net/versions.html -fabric_loader_version=0.14.21 +fabric_loader_version=0.14.25 fabric_api_version=0.76.0+1.19.2 # Forge https://files.minecraftforge.net/net/minecraftforge/forge From 2ea886ed9b1f4bbb3c1dd3a74257818258e3f8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 21:49:04 +0200 Subject: [PATCH 5/9] Updated build --- gradle.properties | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index 3f2068c..6727c69 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,7 @@ # Dev -org.gradle.jvmargs=-Xmx4096M +org.gradle.jvmargs=-Xmx4G org.gradle.parallel=true -org.gradle.caching=false -org.gradle.caching.debug=false -org.gradle.configureondemand=false +org.gradle.caching=true # Mod mod_name=Friends&Foes - Beekeeper Hut From 5981a0e3f41f3ca50ec5fb77917180b458d6d6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 22:04:00 +0200 Subject: [PATCH 6/9] Updated dependency --- neoforge/src/main/resources/META-INF/mods.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/mods.toml index 626c840..5ad2834 100644 --- a/neoforge/src/main/resources/META-INF/mods.toml +++ b/neoforge/src/main/resources/META-INF/mods.toml @@ -21,4 +21,4 @@ versionRange = "[${minecraftVersion},)" [[dependencies.${ modId }]] modId = "friendsandfoes" mandatory = true -versionRange = "[2.0.7,)" \ No newline at end of file +versionRange = "[${friendsAndFoesVersion},)" \ No newline at end of file From c87f39ab4c56502725a7c7c393d072aa446dc86c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Wed, 10 Jul 2024 22:42:29 +0200 Subject: [PATCH 7/9] Updated dep --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 6727c69..65b6a37 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,7 +23,7 @@ enabled_platforms=fabric,forge # Common mixin_extras_version=0.3.6 -friendsandfoes_version=2.0.7 +friendsandfoes_version=2.0.11 # Fabric https://fabricmc.net/versions.html fabric_loader_version=0.14.25 From 41034eee65b3b866cee9aac029e16f04a97e4773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Thu, 11 Jul 2024 16:02:52 +0200 Subject: [PATCH 8/9] port --- build.gradle | 13 ++++++++----- .../fabric/BeekeeperHutArmorStandProcessor.java | 4 ++-- .../fabric/BeekeeperHutItemFrameProcessor.java | 4 ++-- fabric/src/main/resources/fabric.mod.json | 2 +- gradle.properties | 13 +++++++------ .../beekeeperhut/neoforge/BeekeeperHutNeoForge.java | 4 ++-- .../neoforge/BeekeeperHutArmorStandProcessor.java | 4 ++-- .../neoforge/BeekeeperHutItemFrameProcessor.java | 4 ++-- .../META-INF/{mods.toml => neoforge.mods.toml} | 0 9 files changed, 26 insertions(+), 22 deletions(-) rename neoforge/src/main/resources/META-INF/{mods.toml => neoforge.mods.toml} (100%) diff --git a/build.gradle b/build.gradle index 7193c63..0cf67d3 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,10 @@ subprojects { dependencies { minecraft "com.mojang:minecraft:${minecraft_version}" - mappings "net.fabricmc:yarn:${yarn_mappings}" + mappings loom.layered { + it.mappings "net.fabricmc:yarn:${yarn_mappings}" + it.mappings "dev.architectury:yarn-mappings-patch-neoforge:${yarn_mappings_patch}" + } } } @@ -40,7 +43,7 @@ allprojects { "friendsAndFoesVersion": friendsandfoes_version ] - filesMatching(['fabric.mod.json', 'META-INF/mods.toml']) { + filesMatching(['fabric.mod.json', 'META-INF/neoforge.mods.toml']) { expand expandProps } @@ -55,13 +58,13 @@ allprojects { } tasks.withType(JavaCompile).configureEach { - it.options.release = 17 + it.options.release = 21 } java { withSourcesJar() - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } } diff --git a/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutArmorStandProcessor.java b/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutArmorStandProcessor.java index a9bbaf5..b4a3ef7 100644 --- a/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutArmorStandProcessor.java +++ b/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutArmorStandProcessor.java @@ -4,6 +4,7 @@ import com.faboslav.friendsandfoes.beekeeperhut.util.world.processor.BeekeeperHutArmorStandProcessorHelper; import com.faboslav.friendsandfoes.beekeeperhut.world.processor.StructureEntityProcessor; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import net.minecraft.structure.StructurePlacementData; import net.minecraft.structure.StructureTemplate; import net.minecraft.structure.processor.StructureProcessorType; @@ -18,8 +19,7 @@ */ public final class BeekeeperHutArmorStandProcessor extends StructureEntityProcessor { - public static final BeekeeperHutArmorStandProcessor INSTANCE = new BeekeeperHutArmorStandProcessor(); - public static final Codec CODEC = Codec.unit(() -> INSTANCE); + public static final MapCodec CODEC = MapCodec.unit(BeekeeperHutArmorStandProcessor::new); @Override public StructureTemplate.StructureEntityInfo processEntity( diff --git a/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutItemFrameProcessor.java b/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutItemFrameProcessor.java index 4b655da..984a59a 100644 --- a/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutItemFrameProcessor.java +++ b/fabric/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/fabric/BeekeeperHutItemFrameProcessor.java @@ -4,6 +4,7 @@ import com.faboslav.friendsandfoes.beekeeperhut.util.world.processor.BeekeeperHutItemFrameProcessorHelper; import com.faboslav.friendsandfoes.beekeeperhut.world.processor.StructureEntityProcessor; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import net.minecraft.structure.StructurePlacementData; import net.minecraft.structure.StructureTemplate; import net.minecraft.structure.StructureTemplate.StructureEntityInfo; @@ -19,8 +20,7 @@ */ public final class BeekeeperHutItemFrameProcessor extends StructureEntityProcessor { - public static final BeekeeperHutItemFrameProcessor INSTANCE = new BeekeeperHutItemFrameProcessor(); - public static final Codec CODEC = Codec.unit(() -> INSTANCE); + public static final MapCodec CODEC = MapCodec.unit(BeekeeperHutItemFrameProcessor::new); @Override public StructureEntityInfo processEntity( diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json index aa54f7a..dd8b954 100644 --- a/fabric/src/main/resources/fabric.mod.json +++ b/fabric/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ ] }, "depends": { - "java": ">=17", + "java": ">=21", "minecraft": ">=${minMinecraftVersion}", "fabricloader": ">=${fabricLoaderVersion}", "fabric": ">=${fabricApiVersion}", diff --git a/gradle.properties b/gradle.properties index d8365c0..a184299 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,11 +12,12 @@ mod_description=An addon for the Friends&Foes mod, adding a beekeeper hut struct maven_group=com.faboslav.friendsandfoes.beekeeperhut # Minecraft -minecraft_version=1.20.4 -min_minecraft_version=1.20.3 +minecraft_version=1.20.6 +min_minecraft_version=1.20.5 #Mappings -yarn_mappings=1.20.4+build.3:v2 +yarn_mappings=1.20.6+build.1:v2 +yarn_mappings_patch=1.20.5+build.3 # Architectury enabled_platforms=fabric,neoforge @@ -26,8 +27,8 @@ mixin_extras_version=0.3.6 friendsandfoes_version=2.0.11 # Fabric https://fabricmc.net/versions.html -fabric_loader_version=0.15.3 -fabric_api_version=0.92.0+1.20.4 +fabric_loader_version=0.15.11 +fabric_api_version=0.98.0+1.20.6 # Neoforge https://projects.neoforged.net/neoforged/neoforge -neoforge_version=20.4.237 +neoforge_version=20.6.119 diff --git a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/neoforge/BeekeeperHutNeoForge.java b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/neoforge/BeekeeperHutNeoForge.java index 5c7a440..c34367f 100644 --- a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/neoforge/BeekeeperHutNeoForge.java +++ b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/neoforge/BeekeeperHutNeoForge.java @@ -3,15 +3,15 @@ import com.faboslav.friendsandfoes.beekeeperhut.BeekeeperHut; import com.faboslav.friendsandfoes.beekeeperhut.platform.neoforge.RegistryHelperImpl; import net.neoforged.bus.api.IEventBus; +import net.neoforged.fml.ModContainer; import net.neoforged.fml.common.Mod; @Mod(BeekeeperHut.MOD_ID) public final class BeekeeperHutNeoForge { - public BeekeeperHutNeoForge() { + public BeekeeperHutNeoForge(ModContainer modContainer, IEventBus modEventBus) { BeekeeperHut.init(); - IEventBus modEventBus = net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext.get().getModEventBus(); RegistryHelperImpl.STRUCTURE_PROCESSOR_TYPES.register(modEventBus); } } diff --git a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutArmorStandProcessor.java b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutArmorStandProcessor.java index 6afc349..710b078 100644 --- a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutArmorStandProcessor.java +++ b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutArmorStandProcessor.java @@ -3,6 +3,7 @@ import com.faboslav.friendsandfoes.beekeeperhut.platform.neoforge.StructureEntityProcessorTypesImpl; import com.faboslav.friendsandfoes.beekeeperhut.util.world.processor.BeekeeperHutArmorStandProcessorHelper; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import net.minecraft.structure.StructurePlacementData; import net.minecraft.structure.StructureTemplate; import net.minecraft.structure.processor.StructureProcessor; @@ -13,8 +14,7 @@ public final class BeekeeperHutArmorStandProcessor extends StructureProcessor { - public static final BeekeeperHutArmorStandProcessor INSTANCE = new BeekeeperHutArmorStandProcessor(); - public static final Codec CODEC = Codec.unit(() -> INSTANCE); + public static final MapCodec CODEC = MapCodec.unit(BeekeeperHutArmorStandProcessor::new); @Override public StructureTemplate.StructureEntityInfo processEntity( diff --git a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutItemFrameProcessor.java b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutItemFrameProcessor.java index 0541a49..9571f8c 100644 --- a/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutItemFrameProcessor.java +++ b/neoforge/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/world/processor/neoforge/BeekeeperHutItemFrameProcessor.java @@ -3,6 +3,7 @@ import com.faboslav.friendsandfoes.beekeeperhut.platform.neoforge.StructureEntityProcessorTypesImpl; import com.faboslav.friendsandfoes.beekeeperhut.util.world.processor.BeekeeperHutItemFrameProcessorHelper; import com.mojang.serialization.Codec; +import com.mojang.serialization.MapCodec; import net.minecraft.structure.StructurePlacementData; import net.minecraft.structure.StructureTemplate; import net.minecraft.structure.processor.StructureProcessor; @@ -13,8 +14,7 @@ public final class BeekeeperHutItemFrameProcessor extends StructureProcessor { - public static final BeekeeperHutItemFrameProcessor INSTANCE = new BeekeeperHutItemFrameProcessor(); - public static final Codec CODEC = Codec.unit(() -> INSTANCE); + public static final MapCodec CODEC = MapCodec.unit(BeekeeperHutItemFrameProcessor::new); @Override public StructureTemplate.StructureEntityInfo processEntity( diff --git a/neoforge/src/main/resources/META-INF/mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml similarity index 100% rename from neoforge/src/main/resources/META-INF/mods.toml rename to neoforge/src/main/resources/META-INF/neoforge.mods.toml From 65a89f5f83a713e4295ff7e11e4035b8a0348d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Fabi=C3=A1nek?= Date: Thu, 11 Jul 2024 16:49:40 +0200 Subject: [PATCH 9/9] Port --- common/build.gradle | 2 -- .../friendsandfoes/beekeeperhut/BeekeeperHut.java | 2 +- .../barrels/beekeeper_hut.json | 0 .../beekeeper_hut/base_plate1.nbt | Bin .../beekeeper_hut/entity/bee.nbt | Bin .../beekeeper_hut/entity/moobloom.nbt | Bin .../beekeeper_hut/entity/villager.nbt | Bin .../beekeeper_hut/hut/hut1.nbt | Bin .../beekeeper_hut/hut/wall/wall1.nbt | Bin .../beekeeper_hut/hut/wall/wall2.nbt | Bin .../beekeeper_hut/hut/wall/wall3.nbt | Bin .../beekeeper_hut/hut/wall/wall4.nbt | Bin .../moobloom_fence/moobloom_fence_big1.nbt | Bin .../moobloom_fence/moobloom_fence_big2.nbt | Bin .../moobloom_fence/moobloom_fence_small1.nbt | Bin .../moobloom_fence/moobloom_fence_small2.nbt | Bin .../beekeeper_hut/tree/birch_tree.nbt | Bin .../beekeeper_hut/tree/oak_tree.nbt | Bin .../beekeeper_hut/tree/tall_birch_tree.nbt | Bin .../beekeeper_hut/tree/tall_oak_tree.nbt | Bin fabric/build.gradle | 3 --- gradle.properties | 13 ++++++------- neoforge/build.gradle | 9 --------- 23 files changed, 7 insertions(+), 22 deletions(-) rename common/src/main/resources/data/friendsandfoes/{loot_tables => loot_table}/barrels/beekeeper_hut.json (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/base_plate1.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/entity/bee.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/entity/moobloom.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/entity/villager.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/hut/hut1.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/hut/wall/wall1.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/hut/wall/wall2.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/hut/wall/wall3.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/hut/wall/wall4.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/moobloom_fence/moobloom_fence_big1.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/moobloom_fence/moobloom_fence_big2.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/moobloom_fence/moobloom_fence_small1.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/moobloom_fence/moobloom_fence_small2.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/tree/birch_tree.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/tree/oak_tree.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/tree/tall_birch_tree.nbt (100%) rename common/src/main/resources/data/friendsandfoes/{structures => structure}/beekeeper_hut/tree/tall_oak_tree.nbt (100%) diff --git a/common/build.gradle b/common/build.gradle index 331db6a..b03c26a 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -4,6 +4,4 @@ architectury { dependencies { modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" - - implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}")) } \ No newline at end of file diff --git a/common/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/BeekeeperHut.java b/common/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/BeekeeperHut.java index ea9f9e2..07dd5ec 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/BeekeeperHut.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/beekeeperhut/BeekeeperHut.java @@ -11,7 +11,7 @@ public final class BeekeeperHut private static final Logger LOGGER = LoggerFactory.getLogger(BeekeeperHut.MOD_ID); public static Identifier makeID(String path) { - return new Identifier( + return Identifier.of( MOD_ID, path ); diff --git a/common/src/main/resources/data/friendsandfoes/loot_tables/barrels/beekeeper_hut.json b/common/src/main/resources/data/friendsandfoes/loot_table/barrels/beekeeper_hut.json similarity index 100% rename from common/src/main/resources/data/friendsandfoes/loot_tables/barrels/beekeeper_hut.json rename to common/src/main/resources/data/friendsandfoes/loot_table/barrels/beekeeper_hut.json diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/base_plate1.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/base_plate1.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/base_plate1.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/base_plate1.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/bee.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/bee.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/bee.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/bee.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/moobloom.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/moobloom.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/moobloom.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/moobloom.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/villager.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/villager.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/entity/villager.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/entity/villager.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/hut1.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/hut1.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/hut1.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/hut1.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall1.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall1.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall1.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall1.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall2.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall2.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall2.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall2.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall3.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall3.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall3.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall3.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall4.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall4.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/hut/wall/wall4.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/hut/wall/wall4.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_big1.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_big1.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_big1.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_big1.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_big2.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_big2.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_big2.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_big2.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_small1.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_small1.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_small1.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_small1.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_small2.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_small2.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/moobloom_fence/moobloom_fence_small2.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/moobloom_fence/moobloom_fence_small2.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/birch_tree.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/birch_tree.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/birch_tree.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/birch_tree.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/oak_tree.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/oak_tree.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/oak_tree.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/oak_tree.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/tall_birch_tree.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/tall_birch_tree.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/tall_birch_tree.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/tall_birch_tree.nbt diff --git a/common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/tall_oak_tree.nbt b/common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/tall_oak_tree.nbt similarity index 100% rename from common/src/main/resources/data/friendsandfoes/structures/beekeeper_hut/tree/tall_oak_tree.nbt rename to common/src/main/resources/data/friendsandfoes/structure/beekeeper_hut/tree/tall_oak_tree.nbt diff --git a/fabric/build.gradle b/fabric/build.gradle index 673f79c..dba41da 100644 --- a/fabric/build.gradle +++ b/fabric/build.gradle @@ -28,9 +28,6 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}" modApi "net.fabricmc.fabric-api:fabric-api:${fabric_api_version}" - // Mixin extras (https://github.com/LlamaLad7/MixinExtras) - include(implementation(annotationProcessor("io.github.llamalad7:mixinextras-fabric:${mixin_extras_version}"))) - modRuntimeOnly(modrinth("friends-and-foes", "fabric-mc${minecraft_version}-${friendsandfoes_version}")) common(project(path: ":common", configuration: "namedElements")) { transitive false } diff --git a/gradle.properties b/gradle.properties index a184299..d4097ef 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,23 +12,22 @@ mod_description=An addon for the Friends&Foes mod, adding a beekeeper hut struct maven_group=com.faboslav.friendsandfoes.beekeeperhut # Minecraft -minecraft_version=1.20.6 -min_minecraft_version=1.20.5 +minecraft_version=1.21 +min_minecraft_version=1.21 #Mappings -yarn_mappings=1.20.6+build.1:v2 -yarn_mappings_patch=1.20.5+build.3 +yarn_mappings=1.21+build.4:v2 +yarn_mappings_patch=1.21+build.4 # Architectury enabled_platforms=fabric,neoforge # Common -mixin_extras_version=0.3.6 friendsandfoes_version=2.0.11 # Fabric https://fabricmc.net/versions.html fabric_loader_version=0.15.11 -fabric_api_version=0.98.0+1.20.6 +fabric_api_version=0.100.4+1.21 # Neoforge https://projects.neoforged.net/neoforged/neoforge -neoforge_version=20.6.119 +neoforge_version=21.0.86-beta \ No newline at end of file diff --git a/neoforge/build.gradle b/neoforge/build.gradle index e5270e2..21b8b4e 100644 --- a/neoforge/build.gradle +++ b/neoforge/build.gradle @@ -23,11 +23,6 @@ configurations { developmentNeoForge.extendsFrom common } - -loom { - accessWidenerPath = project(":common").loom.accessWidenerPath -} - dependencies { neoForge "net.neoforged:neoforge:${neoforge_version}" @@ -35,10 +30,6 @@ dependencies { shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false } modRuntimeOnly(modrinth("friends-and-foes-forge", "neoforge-mc${minecraft_version}-${friendsandfoes_version}")) - - // Mixin extras (https://github.com/LlamaLad7/MixinExtras) - implementation(annotationProcessor("io.github.llamalad7:mixinextras-common:${mixin_extras_version}")) - implementation(include("io.github.llamalad7:mixinextras-neoforge:${mixin_extras_version}")) } shadowJar {