From 92bc9e0556cb330760b4a2fc7eab2cd605d3a054 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 20:50:29 +0800 Subject: [PATCH 1/9] Add GitHub Actions to replace TeamCity as CI (#309) --- .github/workflows/bleeding.yml | 78 +++++++++++++++++++++++++++ .github/workflows/nightly.yml | 81 ++++++++++++++++++++++++++++ .github/workflows/prs.yml | 30 +++++++++++ .github/workflows/release.yml | 99 ++++++++++++++++++++++++++++++++++ README.md | 14 ++--- build.gradle | 19 +++---- 6 files changed, 305 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/bleeding.yml create mode 100644 .github/workflows/nightly.yml create mode 100644 .github/workflows/prs.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml new file mode 100644 index 000000000..2062e32b8 --- /dev/null +++ b/.github/workflows/bleeding.yml @@ -0,0 +1,78 @@ +on: + workflow_dispatch: + push: + +name: Publish bleeding export + +jobs: + publish: + name: Publish export + runs-on: ubuntu-latest + outputs: + CI_VERSION: ${{ steps.info.outputs.CI_VERSION }} + CI_GROUP: ${{ steps.info.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ steps.info.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ steps.info.outputs.CI_GAME_VERSION }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Obtain GAV info + id: info + run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + + - name: Publish export + run: ./gradlew publishExport -PreleaseType=bleeding + env: + LDTTeamJfrogUsername: ${{ secrets.PUBLISHING_USERNAME }} + LDTTeamJfrogPassword: ${{ secrets.PUBLISHING_PASSWORD }} + announce: + name: Send announcement message + needs: publish + runs-on: ubuntu-latest + steps: + - name: Download discord.sh + run: curl -LOJ https://github.com/fieu/discord.sh/releases/download/v2.0.0/discord.sh + + - name: Set discord.sh executable + run: chmod +x discord.sh + + - name: Send announcement message + run: | + ./discord.sh \ + --webhook-url="$WEBHOOK" \ + --username "ParchmentMC" \ + --color "0xFF0000" \ + --title "New bleeding for \`$CI_GAME_VERSION!\`" \ + --field "Version;\`$CI_VERSION\`;false" \ + --field "Group;\`$CI_GROUP\`;true" \ + --field "Artifact;\`$CI_ARTIFACT\`;true" \ + --field "Coordinate;\`$CI_GROUP:$CI_ARTIFACT:$CI_VERSION\`;false" \ + --timestamp + env: + WEBHOOK: ${{ secrets.BLEEDING_DISCORD_WEBHOOK }} + CI_VERSION: ${{ needs.publish.outputs.CI_VERSION }} + CI_GROUP: ${{ needs.publish.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ needs.publish.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ needs.publish.outputs.CI_GAME_VERSION }} + set-variables: + name: Set repository variables + needs: publish + runs-on: ubuntu-latest + steps: + - name: Mark pending variables + run: | + gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_NIGHTLY --body "true" + gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_RELEASE --body "true" + env: + # This should be a GH PAT with 'repo' scope + GH_TOKEN: ${{ secrets.VARIABLES_GH_TOKEN }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 000000000..9fa2afe7b --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,81 @@ +on: + workflow_dispatch: + schedule: + - cron: "0 12 * * *" # 12NN every day + +name: Publish nightly export + +jobs: + publish: + name: Publish export + runs-on: ubuntu-latest + # If triggered by schedule, only run if the variable is set to true + # (This allows the workflow to be triggered manually) + if: ${{ github.event_name != 'schedule' || fromJSON(vars.HAS_PENDING_NIGHTLY) == true }} + outputs: + CI_VERSION: ${{ steps.info.outputs.CI_VERSION }} + CI_GROUP: ${{ steps.info.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ steps.info.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ steps.info.outputs.CI_GAME_VERSION }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Obtain GAV info + id: info + run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + + - name: Publish export + run: ./gradlew publishExport -PreleaseType=nightly + env: + LDTTeamJfrogUsername: ${{ secrets.PUBLISHING_USERNAME }} + LDTTeamJfrogPassword: ${{ secrets.PUBLISHING_PASSWORD }} + announce: + name: Send announcement message + needs: publish + runs-on: ubuntu-latest + steps: + - name: Download discord.sh + run: curl -LOJ https://github.com/fieu/discord.sh/releases/download/v2.0.0/discord.sh + + - name: Set discord.sh executable + run: chmod +x discord.sh + + - name: Send announcement message + run: | + ./discord.sh \ + --webhook-url="$WEBHOOK" \ + --username "ParchmentMC" \ + --color "0xFFA500" \ + --title "New nightly for \`$CI_GAME_VERSION!\`" \ + --field "Version;\`$CI_VERSION\`;false" \ + --field "Group;\`$CI_GROUP\`;true" \ + --field "Artifact;\`$CI_ARTIFACT\`;true" \ + --field "Coordinate;\`$CI_GROUP:$CI_ARTIFACT:$CI_VERSION\`;false" \ + --timestamp + env: + WEBHOOK: ${{ secrets.NIGHTLY_DISCORD_WEBHOOK }} + CI_VERSION: ${{ needs.publish.outputs.CI_VERSION }} + CI_GROUP: ${{ needs.publish.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ needs.publish.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ needs.publish.outputs.CI_GAME_VERSION }} + set-variables: + name: Set repository variables + needs: publish + runs-on: ubuntu-latest + steps: + - name: Unmark pending variable + run: | + gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_NIGHTLY --body "false" + env: + # This should be a GH PAT with 'repo' scope + GH_TOKEN: ${{ secrets.VARIABLES_GH_TOKEN }} diff --git a/.github/workflows/prs.yml b/.github/workflows/prs.yml new file mode 100644 index 000000000..ac000e0b4 --- /dev/null +++ b/.github/workflows/prs.yml @@ -0,0 +1,30 @@ +on: + - pull_request + +name: Validate PR + +jobs: + build: + name: Build and validate PR + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Run validation task + run: ./gradlew validateData + + - name: Upload ZIPs + uses: actions/upload-artifact@v4 + with: + name: export-zips + path: build/exportZips/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..6a4aa30af --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,99 @@ +on: + workflow_dispatch: + schedule: + - cron: "0 12 * * 0" # 12NN on Sundays + +name: Publish release export + +permissions: + contents: write # For creating and pushing the tag + +jobs: + publish: + name: Publish export + runs-on: ubuntu-latest + # If triggered by schedule, only run if the variable is set to true + # (This allows the workflow to be triggered manually) + if: ${{ github.event_name != 'schedule' || fromJSON(vars.HAS_PENDING_RELEASE) == true }} + outputs: + CI_VERSION: ${{ steps.info.outputs.CI_VERSION }} + CI_GROUP: ${{ steps.info.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ steps.info.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ steps.info.outputs.CI_GAME_VERSION }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Obtain GAV info + id: info + run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + + - name: Publish export + run: ./gradlew publishExport -PreleaseType=release + env: + LDTTeamJfrogUsername: ${{ secrets.PUBLISHING_USERNAME }} + LDTTeamJfrogPassword: ${{ secrets.PUBLISHING_PASSWORD }} + create-tag: + name: Create tag + needs: publish + runs-on: ubuntu-latest + steps: + - name: Create tag + uses: actions/github-script@v7 + with: + script: | + github.rest.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: 'refs/tags/releases/${{ needs.publish.outputs.CI_GAME_VERSION }}-${{ needs.publish.outputs.CI_VERSION }}', + sha: context.sha + }) + announce: + name: Send announcement message + needs: publish + runs-on: ubuntu-latest + steps: + - name: Download discord.sh + run: curl -LOJ https://github.com/fieu/discord.sh/releases/download/v2.0.0/discord.sh + + - name: Set discord.sh executable + run: chmod +x discord.sh + + - name: Send announcement message + run: | + ./discord.sh \ + --webhook-url="$WEBHOOK" \ + --username "ParchmentMC" \ + --color "0x228B22" \ + --title "New release for \`$CI_GAME_VERSION!\`" \ + --field "Version;\`$CI_VERSION\`;false" \ + --field "Group;\`$CI_GROUP\`;true" \ + --field "Artifact;\`$CI_ARTIFACT\`;true" \ + --field "Coordinate;\`$CI_GROUP:$CI_ARTIFACT:$CI_VERSION\`;false" \ + --timestamp + env: + WEBHOOK: ${{ secrets.RELEASES_DISCORD_WEBHOOK }} + CI_VERSION: ${{ needs.publish.outputs.CI_VERSION }} + CI_GROUP: ${{ needs.publish.outputs.CI_GROUP }} + CI_ARTIFACT: ${{ needs.publish.outputs.CI_ARTIFACT }} + CI_GAME_VERSION: ${{ needs.publish.outputs.CI_GAME_VERSION }} + set-variables: + name: Set repository variables + needs: publish + runs-on: ubuntu-latest + steps: + - name: Unmark pending variables + run: | + gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_RELEASE --body "false" + env: + # This should be a GH PAT with 'repo' scope + GH_TOKEN: ${{ secrets.VARIABLES_GH_TOKEN }} diff --git a/README.md b/README.md index 2a8548733..6b0113c52 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ Parchment Mappings ================== [![Discord server badge](https://img.shields.io/discord/851855518398152725?color=5865F2&label=discord&logo=discord&logoColor=white)](https://discord.parchmentmc.org/) -[![Minecraft version badge](https://img.shields.io/badge/mc%20version-1.21-3b8526)](#) +![Minecraft version badge](https://img.shields.io/badge/mc%20version-1.21-3b8526)   -[![Latest release version badge](https://img.shields.io/maven-metadata/v?color=forestgreen&label=release&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-internal%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml)](#) -[![CI release build status](https://buildsystem.ldtteam.com/app/rest/builds/buildType:(id:ParchmentMC_Mappings_Release),branch:1.21.x/statusIcon)](#) +![Latest release version badge](https://img.shields.io/maven-metadata/v?color=forestgreen&label=release&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-internal%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml) +![CI release build status](https://github.com/ParchmentMC/Parchment/actions/workflows/release.yml/badge.svg) -[![Latest nightly version badge](https://img.shields.io/maven-metadata/v?color=orange&label=nightly&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-snapshots%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml)](#) -[![CI nightly build status](https://buildsystem.ldtteam.com/app/rest/builds/buildType:(id:ParchmentMC_Mappings_Nightly),branch:1.21.x/statusIcon)](#) +![Latest nightly version badge](https://img.shields.io/maven-metadata/v?color=orange&label=nightly&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-snapshots%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml) +![CI nightly build status](https://github.com/ParchmentMC/Parchment/actions/workflows/nightly.yml/badge.svg)   -[![Latest bleeding version badge](https://img.shields.io/maven-metadata/v?color=red&label=bleeding&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-bleeding%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml)](#) -[![CI bleeding build status](https://buildsystem.ldtteam.com/app/rest/builds/buildType:(id:ParchmentMC_Mappings_Bleeding),branch:1.21.x/statusIcon)](#) +![Latest bleeding version badge](https://img.shields.io/maven-metadata/v?color=red&label=bleeding&metadataUrl=https%3A%2F%2Fldtteam.jfrog.io%2Fartifactory%2Fparchmentmc-bleeding%2Forg%2Fparchmentmc%2Fdata%2Fparchment-1.21%2Fmaven-metadata.xml) +![CI bleeding build status](https://github.com/ParchmentMC/Parchment/actions/workflows/bleeding.yml/badge.svg) Welcome to the Parchment mappings repository! diff --git a/build.gradle b/build.gradle index 6c1b5e65a..b1e8c9e3f 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,10 @@ final isBleeding = releaseType.toString() == 'bleeding' if (isBleeding) { version = 'BLEEDING-SNAPSHOT' } -println("Version: $version") +// Only output if not in CI +if (!Boolean.parseBoolean(System.getenv("CI"))){ + println("Version: $version") +} writtenbooks { snapshotVersion = !isRelease @@ -75,14 +78,12 @@ dependencies { jammer 'org.parchmentmc.jam:jam-parchment:0.1.0' } -afterEvaluate { - final isCI = Boolean.parseBoolean(project.findProperty('isCI') as String) - if (isCI) { - println('Running on CI.') - println("##teamcity[setParameter name='env.CI_VERSION' value='$version']") - println("##teamcity[setParameter name='env.CI_GROUP' value='$group']") - println("##teamcity[setParameter name='env.CI_ARTIFACT' value='parchment-${project.compass.version.get()}']") - println("##teamcity[setParameter name='env.CI_GAME_VERSION' value='${project.compass.version.get()}']") +tasks.register('printGHActionsOutput') { + doLast { + println("CI_VERSION=${project.version}") + println("CI_GROUP=${project.group}") + println("CI_ARTIFACT=parchment-${"1.21.3"}") + println("CI_GAME_VERSION=${"1.21.3"}") } } From 29c5f58ce0470edb5d3447246e811036b6037818 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 20:56:00 +0800 Subject: [PATCH 2/9] Fix left-in hardcoded constant That was a remnant from testing. --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index b1e8c9e3f..f141d8e9d 100644 --- a/build.gradle +++ b/build.gradle @@ -82,8 +82,8 @@ tasks.register('printGHActionsOutput') { doLast { println("CI_VERSION=${project.version}") println("CI_GROUP=${project.group}") - println("CI_ARTIFACT=parchment-${"1.21.3"}") - println("CI_GAME_VERSION=${"1.21.3"}") + println("CI_ARTIFACT=parchment-${project.compass.version.get()}") + println("CI_GAME_VERSION=${project.compass.version.get()}") } } From 6041fb998f8261b98430feb3b27c0063eb70f511 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 20:59:29 +0800 Subject: [PATCH 3/9] Copy releaseType property to GAV step --- .github/workflows/bleeding.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml index 2062e32b8..a3c632fe9 100644 --- a/.github/workflows/bleeding.yml +++ b/.github/workflows/bleeding.yml @@ -28,7 +28,7 @@ jobs: - name: Obtain GAV info id: info - run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + run: ./gradlew --quiet -PreleaseType=bleeding printGHActionsOutput >> "$GITHUB_OUTPUT" - name: Publish export run: ./gradlew publishExport -PreleaseType=bleeding diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9fa2afe7b..b67082409 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -32,7 +32,7 @@ jobs: - name: Obtain GAV info id: info - run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + run: ./gradlew --quiet -PreleaseType=nightly printGHActionsOutput >> "$GITHUB_OUTPUT" - name: Publish export run: ./gradlew publishExport -PreleaseType=nightly diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6a4aa30af..16f0e8767 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Obtain GAV info id: info - run: ./gradlew --quiet printGHActionsOutput >> "$GITHUB_OUTPUT" + run: ./gradlew --quiet -PreleaseType=release printGHActionsOutput >> "$GITHUB_OUTPUT" - name: Publish export run: ./gradlew publishExport -PreleaseType=release From 0a56ca6cd13e1e5cab2bf70052a9bb285161b252 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 21:02:20 +0800 Subject: [PATCH 4/9] Move exclamation point outside of backticks --- .github/workflows/bleeding.yml | 2 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml index a3c632fe9..f870ad188 100644 --- a/.github/workflows/bleeding.yml +++ b/.github/workflows/bleeding.yml @@ -52,7 +52,7 @@ jobs: --webhook-url="$WEBHOOK" \ --username "ParchmentMC" \ --color "0xFF0000" \ - --title "New bleeding for \`$CI_GAME_VERSION!\`" \ + --title "New bleeding for \`$CI_GAME_VERSION\`!" \ --field "Version;\`$CI_VERSION\`;false" \ --field "Group;\`$CI_GROUP\`;true" \ --field "Artifact;\`$CI_ARTIFACT\`;true" \ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b67082409..03f18ffd5 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -56,7 +56,7 @@ jobs: --webhook-url="$WEBHOOK" \ --username "ParchmentMC" \ --color "0xFFA500" \ - --title "New nightly for \`$CI_GAME_VERSION!\`" \ + --title "New nightly for \`$CI_GAME_VERSION\`!" \ --field "Version;\`$CI_VERSION\`;false" \ --field "Group;\`$CI_GROUP\`;true" \ --field "Artifact;\`$CI_ARTIFACT\`;true" \ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16f0e8767..0cbb4f8ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -74,7 +74,7 @@ jobs: --webhook-url="$WEBHOOK" \ --username "ParchmentMC" \ --color "0x228B22" \ - --title "New release for \`$CI_GAME_VERSION!\`" \ + --title "New release for \`$CI_GAME_VERSION\`!" \ --field "Version;\`$CI_VERSION\`;false" \ --field "Group;\`$CI_GROUP\`;true" \ --field "Artifact;\`$CI_ARTIFACT\`;true" \ From 4fc4a5a345a00f96b75c22b5ddf08621544c2913 Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 21:06:07 +0800 Subject: [PATCH 5/9] Run bleeding workflow only on releases branches --- .github/workflows/bleeding.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml index f870ad188..42f3fdccb 100644 --- a/.github/workflows/bleeding.yml +++ b/.github/workflows/bleeding.yml @@ -1,6 +1,8 @@ on: workflow_dispatch: push: + branches: + - 'releases/**' name: Publish bleeding export From d451cb04caeac0a5a6a936e4fee834865b023d0e Mon Sep 17 00:00:00 2001 From: sciwhiz12 Date: Sat, 9 Nov 2024 21:07:31 +0800 Subject: [PATCH 6/9] Fix incorrect branch spec --- .github/workflows/bleeding.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bleeding.yml b/.github/workflows/bleeding.yml index 42f3fdccb..3e94db87d 100644 --- a/.github/workflows/bleeding.yml +++ b/.github/workflows/bleeding.yml @@ -2,7 +2,7 @@ on: workflow_dispatch: push: branches: - - 'releases/**' + - 'versions/**' name: Publish bleeding export From d6661282fa0927b8929b97132525604ff182ff91 Mon Sep 17 00:00:00 2001 From: PiTheGuy <55959311+PiTheGuy@users.noreply.github.com> Date: Sat, 9 Nov 2024 07:09:45 -0600 Subject: [PATCH 7/9] Fix typos (#302) --- .../util/datafix/fixes/SavedDataFeaturePoolElementFix.mapping | 2 +- .../level/levelgen/flat/FlatLevelGeneratorSettings.mapping | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/net/minecraft/util/datafix/fixes/SavedDataFeaturePoolElementFix.mapping b/data/net/minecraft/util/datafix/fixes/SavedDataFeaturePoolElementFix.mapping index 331dd8a15..0a01c4a7c 100644 --- a/data/net/minecraft/util/datafix/fixes/SavedDataFeaturePoolElementFix.mapping +++ b/data/net/minecraft/util/datafix/fixes/SavedDataFeaturePoolElementFix.mapping @@ -13,7 +13,7 @@ CLASS net/minecraft/util/datafix/fixes/SavedDataFeaturePoolElementFix ARG 1 name ARG 2 stateProviderType ARG 3 state - ARG 4 staaeProviderName + ARG 4 stateProviderName ARG 5 foliagePlacerType ARG 6 leavesState METHOD updateChildren (Lcom/mojang/serialization/Dynamic;)Lcom/mojang/serialization/Dynamic; diff --git a/data/net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorSettings.mapping b/data/net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorSettings.mapping index 818580a3b..474cc7057 100644 --- a/data/net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorSettings.mapping +++ b/data/net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorSettings.mapping @@ -15,7 +15,7 @@ CLASS net/minecraft/world/level/levelgen/flat/FlatLevelGeneratorSettings METHOD adjustGenerationSettings (Lnet/minecraft/core/Holder;)Lnet/minecraft/world/level/biome/BiomeGenerationSettings; ARG 1 biome METHOD createLakesList (Lnet/minecraft/core/HolderGetter;)Ljava/util/List; - ARG 0 placedFEatureGetter + ARG 0 placedFeatureGetter METHOD getBiome ()Lnet/minecraft/core/Holder; COMMENT Return the biome used on this preset. METHOD getBiome (Ljava/util/Optional;Lnet/minecraft/core/Holder;)Lnet/minecraft/core/Holder; From de521f87ff47f81df12ff43ca4ff97bd347abd7e Mon Sep 17 00:00:00 2001 From: Sleepy-Horse <97367938+Sleepy-Horse@users.noreply.github.com> Date: Sat, 9 Nov 2024 14:19:34 +0100 Subject: [PATCH 8/9] Rename RandomSource.triangle arguments (#308) --- data/net/minecraft/util/RandomSource.mapping | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/net/minecraft/util/RandomSource.mapping b/data/net/minecraft/util/RandomSource.mapping index 6755e91b4..22b98ba05 100644 --- a/data/net/minecraft/util/RandomSource.mapping +++ b/data/net/minecraft/util/RandomSource.mapping @@ -19,5 +19,5 @@ CLASS net/minecraft/util/RandomSource METHOD setSeed (J)V ARG 1 seed METHOD triangle (DD)D - ARG 1 min - ARG 3 max + ARG 1 center + ARG 3 maxDeviation From 26483e775a8883117c1a8b0704b07d5b9f9c1435 Mon Sep 17 00:00:00 2001 From: hammy275 Date: Sat, 9 Nov 2024 21:31:07 -0500 Subject: [PATCH 9/9] Javadocs for Entity, LivingEntity, and Player (#304) --- data/net/minecraft/world/entity/Entity.mapping | 6 ++++++ data/net/minecraft/world/entity/LivingEntity.mapping | 1 + data/net/minecraft/world/entity/player/Player.mapping | 2 ++ 3 files changed, 9 insertions(+) diff --git a/data/net/minecraft/world/entity/Entity.mapping b/data/net/minecraft/world/entity/Entity.mapping index 9fdf5a336..972b36d47 100644 --- a/data/net/minecraft/world/entity/Entity.mapping +++ b/data/net/minecraft/world/entity/Entity.mapping @@ -252,8 +252,12 @@ CLASS net/minecraft/world/entity/Entity ARG 1 partialTick METHOD getX (D)D ARG 1 scale + METHOD getXRot ()F + COMMENT Gets the rotation of this entity around the x-axis (the pitch) in degrees. METHOD getY (D)D ARG 1 scale + METHOD getYRot ()F + COMMENT Gets the rotation of this entity around the y-axis (the yaw) in degrees. METHOD getZ (D)D ARG 1 scale METHOD handleDamageEvent (Lnet/minecraft/world/damagesource/DamageSource;)V @@ -627,6 +631,7 @@ CLASS net/minecraft/world/entity/Entity METHOD setViewScale (D)V ARG 0 renderDistWeight METHOD setXRot (F)V + COMMENT Sets the rotation of this entity around the x-axis (the pitch) in degrees. ARG 1 xRot METHOD setYBodyRot (F)V COMMENT Set the body Y rotation of the entity. @@ -635,6 +640,7 @@ CLASS net/minecraft/world/entity/Entity COMMENT Sets the head's Y rotation of the entity. ARG 1 yHeadRot METHOD setYRot (F)V + COMMENT Sets the rotation of this entity around the y-axis (the yaw) in degrees. ARG 1 yRot METHOD shouldBlockExplode (Lnet/minecraft/world/level/Explosion;Lnet/minecraft/world/level/BlockGetter;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;F)Z ARG 1 explosion diff --git a/data/net/minecraft/world/entity/LivingEntity.mapping b/data/net/minecraft/world/entity/LivingEntity.mapping index 17ff6ee8e..70cf99519 100644 --- a/data/net/minecraft/world/entity/LivingEntity.mapping +++ b/data/net/minecraft/world/entity/LivingEntity.mapping @@ -193,6 +193,7 @@ CLASS net/minecraft/world/entity/LivingEntity METHOD getMaxHealth ()F COMMENT Returns the maximum health of the entity (what it is able to regenerate up to, what it spawned with, etc.) METHOD getProjectile (Lnet/minecraft/world/item/ItemStack;)Lnet/minecraft/world/item/ItemStack; + COMMENT Gets an item stack available to this entity to be loaded into the provided weapon, or an empty item stack if no such item stack is available. ARG 1 weaponStack METHOD getRiddenInput (Lnet/minecraft/world/entity/player/Player;Lnet/minecraft/world/phys/Vec3;)Lnet/minecraft/world/phys/Vec3; ARG 1 player diff --git a/data/net/minecraft/world/entity/player/Player.mapping b/data/net/minecraft/world/entity/player/Player.mapping index 8f4656a28..4c35cb219 100644 --- a/data/net/minecraft/world/entity/player/Player.mapping +++ b/data/net/minecraft/world/entity/player/Player.mapping @@ -172,6 +172,7 @@ CLASS net/minecraft/world/entity/player/Player METHOD lambda$readAdditionalSaveData$2 (Lnet/minecraft/world/phys/Vec3;)V ARG 1 currentImpulseImpactPos METHOD magicCrit (Lnet/minecraft/world/entity/Entity;)V + COMMENT Called when the entity hit is dealt extra melee damage due to an enchantment. ARG 1 entityHit METHOD makeStuckInBlock (Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/phys/Vec3;)V ARG 1 state @@ -267,6 +268,7 @@ CLASS net/minecraft/world/entity/player/Player METHOD setShoulderEntityRight (Lnet/minecraft/nbt/CompoundTag;)V ARG 1 entityCompound METHOD startAutoSpinAttack (IFLnet/minecraft/world/item/ItemStack;)V + COMMENT Starts the attack used by the Riptide enchantment. ARG 1 ticks ARG 2 damage ARG 3 itemStack