mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge branch 'master' of https://github.com/GeyserMC/Geyser into dev
This commit is contained in:
commit
6c88cc5883
7 changed files with 121 additions and 136 deletions
36
.github/workflows/build-remote.yml
vendored
36
.github/workflows/build-remote.yml
vendored
|
@ -22,79 +22,79 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
echo "BUILD_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Setup Java
|
||||||
# See https://github.com/actions/setup-java/commits
|
# See https://github.com/actions/setup-java/commits
|
||||||
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
|
|
||||||
- name: Checkout repository and submodules
|
- name: Checkout repository and submodules
|
||||||
# See https://github.com/actions/checkout/commits
|
# See https://github.com/actions/checkout/commits
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
||||||
with:
|
with:
|
||||||
repository: ${{ inputs.repository }}
|
repository: ${{ inputs.repository }}
|
||||||
ref: ${{ inputs.ref }}
|
ref: ${{ inputs.ref }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
path: geyser
|
|
||||||
|
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
# See https://github.com/gradle/wrapper-validation-action/commits
|
# See https://github.com/gradle/wrapper-validation-action/commits
|
||||||
uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2.1.1
|
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
||||||
|
|
||||||
|
- name: Setup Gradle
|
||||||
|
# See https://github.com/gradle/actions/commits
|
||||||
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
||||||
|
with:
|
||||||
|
cache-read-only: true
|
||||||
|
|
||||||
- name: Build Geyser
|
- name: Build Geyser
|
||||||
# See https://github.com/gradle/actions/commits
|
run: ./gradlew build
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
|
|
||||||
with:
|
|
||||||
arguments: build
|
|
||||||
build-root-directory: geyser
|
|
||||||
cache-read-only: true
|
|
||||||
|
|
||||||
- name: Archive artifacts (Geyser Fabric)
|
- name: Archive artifacts (Geyser Fabric)
|
||||||
# See https://github.com/actions/upload-artifact/commits
|
# See https://github.com/actions/upload-artifact/commits
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Fabric
|
name: Geyser Fabric
|
||||||
path: geyser/bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
path: geyser/bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser NeoForge)
|
- name: Archive artifacts (Geyser NeoForge)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser NeoForge
|
name: Geyser NeoForge
|
||||||
path: geyser/bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
path: geyser/bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Standalone)
|
- name: Archive artifacts (Geyser Standalone)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Standalone
|
name: Geyser Standalone
|
||||||
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
path: geyser/bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Spigot)
|
- name: Archive artifacts (Geyser Spigot)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Spigot
|
name: Geyser Spigot
|
||||||
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
path: geyser/bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser BungeeCord)
|
- name: Archive artifacts (Geyser BungeeCord)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser BungeeCord
|
name: Geyser BungeeCord
|
||||||
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
path: geyser/bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Velocity)
|
- name: Archive artifacts (Geyser Velocity)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Velocity
|
name: Geyser Velocity
|
||||||
path: geyser/bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
path: geyser/bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser ViaProxy)
|
- name: Archive artifacts (Geyser ViaProxy)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser ViaProxy
|
name: Geyser ViaProxy
|
||||||
|
|
125
.github/workflows/build.yml
vendored
125
.github/workflows/build.yml
vendored
|
@ -21,84 +21,86 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
PROJECT: 'geyser'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set Build Number
|
- name: Get Release Info
|
||||||
env:
|
id: release-info
|
||||||
BUILD_JSON: ${{ vars.RELEASEACTION_PREVRELEASE }}
|
uses: GeyserMC/actions/previous-release@master
|
||||||
run: |
|
with:
|
||||||
BUILD_NUMBER=$(echo $BUILD_JSON | jq --arg branch "${GITHUB_REF_NAME}" 'if .[$branch] == null then 1 else .[$branch] | .t | tonumber + 1 end // 1')
|
data: ${{ vars.RELEASEACTION_PREVRELEASE }}
|
||||||
echo "BUILD_NUMBER=${BUILD_NUMBER:=$GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Checkout repository and submodules
|
- name: Checkout repository and submodules
|
||||||
# See https://github.com/actions/checkout/commits
|
# See https://github.com/actions/checkout/commits
|
||||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
# See https://github.com/gradle/wrapper-validation-action/commits
|
# See https://github.com/gradle/actions/commits
|
||||||
uses: gradle/wrapper-validation-action@699bb18358f12c5b78b37bb0111d3a0e2276e0e2 # v2.1.1
|
uses: gradle/actions/wrapper-validation@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
||||||
|
|
||||||
# See https://github.com/actions/setup-java/commits
|
# See https://github.com/actions/setup-java/commits
|
||||||
- uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
|
||||||
with:
|
with:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
|
|
||||||
- name: Build
|
- name: Setup Gradle
|
||||||
# See https://github.com/gradle/actions/commits
|
# See https://github.com/gradle/actions/commits
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
|
uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
|
||||||
with:
|
with:
|
||||||
arguments: build
|
|
||||||
gradle-home-cache-cleanup: true
|
gradle-home-cache-cleanup: true
|
||||||
|
|
||||||
|
- name: Build Geyser
|
||||||
|
run: ./gradlew build
|
||||||
|
env:
|
||||||
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||||
|
|
||||||
- name: Archive artifacts (Geyser Fabric)
|
- name: Archive artifacts (Geyser Fabric)
|
||||||
# See https://github.com/actions/upload-artifact/commits
|
# See https://github.com/actions/upload-artifact/commits
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Fabric
|
name: Geyser Fabric
|
||||||
path: bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
path: bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser NeoForge)
|
- name: Archive artifacts (Geyser NeoForge)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser NeoForge
|
name: Geyser NeoForge
|
||||||
path: bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
path: bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Standalone)
|
- name: Archive artifacts (Geyser Standalone)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Standalone
|
name: Geyser Standalone
|
||||||
path: bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
path: bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Spigot)
|
- name: Archive artifacts (Geyser Spigot)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Spigot
|
name: Geyser Spigot
|
||||||
path: bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
path: bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser BungeeCord)
|
- name: Archive artifacts (Geyser BungeeCord)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser BungeeCord
|
name: Geyser BungeeCord
|
||||||
path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
path: bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser Velocity)
|
- name: Archive artifacts (Geyser Velocity)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser Velocity
|
name: Geyser Velocity
|
||||||
path: bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
path: bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: Archive artifacts (Geyser ViaProxy)
|
- name: Archive artifacts (Geyser ViaProxy)
|
||||||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: Geyser ViaProxy
|
name: Geyser ViaProxy
|
||||||
|
@ -107,17 +109,23 @@ jobs:
|
||||||
|
|
||||||
- name: Publish to Maven Repository
|
- name: Publish to Maven Repository
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
|
run: ./gradlew publish
|
||||||
env:
|
env:
|
||||||
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||||
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
|
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
|
||||||
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
|
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
|
||||||
with:
|
|
||||||
arguments: publish
|
- name: Get Version
|
||||||
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
|
id: get-version
|
||||||
|
run: |
|
||||||
|
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
||||||
|
echo "VERSION=${version}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get Release Metadata
|
- name: Get Release Metadata
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
# See https://github.com/Kas-tle/base-release-action/releases/tag/main-11
|
uses: GeyserMC/actions/release@master
|
||||||
uses: Kas-tle/base-release-action@b863fa0f89bd15267a96a72efb84aec25f168d4c # main-11
|
id: metadata
|
||||||
with:
|
with:
|
||||||
appID: ${{ secrets.RELEASE_APP_ID }}
|
appID: ${{ secrets.RELEASE_APP_ID }}
|
||||||
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
||||||
|
@ -131,61 +139,42 @@ jobs:
|
||||||
viaproxy:bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
viaproxy:bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
||||||
releaseEnabled: false
|
releaseEnabled: false
|
||||||
saveMetadata: true
|
saveMetadata: true
|
||||||
- name: Update Generated Metadata
|
releaseProject: 'geyser'
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
releaseVersion: ${{ steps.get-version.outputs.VERSION }}
|
||||||
run: |
|
|
||||||
cat metadata.json
|
|
||||||
echo
|
|
||||||
mv metadata.json metadata.json.tmp
|
|
||||||
version=$(cat gradle.properties | grep -o "version=[0-9\\.]*" | cut -d"=" -f2)
|
|
||||||
jq --arg project "${PROJECT}" --arg version "${version}" '
|
|
||||||
.
|
|
||||||
| .changes |= map({"commit", "summary", "message"})
|
|
||||||
| .downloads |= map_values({"name", "sha256"})
|
|
||||||
| {$project, "repo", $version, "number": .build, "changes", "downloads"}
|
|
||||||
' metadata.json.tmp > metadata.json
|
|
||||||
cat metadata.json
|
|
||||||
- name: Publish to Downloads API
|
- name: Publish to Downloads API
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
shell: bash
|
uses: GeyserMC/actions/upload-release@master
|
||||||
env:
|
with:
|
||||||
DOWNLOADS_USERNAME: ${{ vars.DOWNLOADS_USERNAME }}
|
username: ${{ vars.DOWNLOADS_USERNAME }}
|
||||||
DOWNLOADS_PRIVATE_KEY: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
||||||
DOWNLOADS_SERVER_IP: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
||||||
run: |
|
files: |
|
||||||
# Save the private key to a file
|
bootstrap/bungeecord/build/libs/Geyser-BungeeCord.jar
|
||||||
echo "$DOWNLOADS_PRIVATE_KEY" > id_ecdsa
|
bootstrap/mod/fabric/build/libs/Geyser-Fabric.jar
|
||||||
chmod 600 id_ecdsa
|
bootstrap/mod/neoforge/build/libs/Geyser-NeoForge.jar
|
||||||
# Create the build folder
|
bootstrap/spigot/build/libs/Geyser-Spigot.jar
|
||||||
ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP mkdir -p "~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/"
|
bootstrap/standalone/build/libs/Geyser-Standalone.jar
|
||||||
# Copy over artifacts
|
bootstrap/velocity/build/libs/Geyser-Velocity.jar
|
||||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bootstrap/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
bootstrap/viaproxy/build/libs/Geyser-ViaProxy.jar
|
||||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" bootstrap/mod/**/build/libs/Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
|
||||||
# Run the build script
|
|
||||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$GITHUB_RUN_NUMBER/
|
|
||||||
|
|
||||||
- name: Publish to Modrinth (Fabric)
|
- name: Publish to Modrinth (Fabric)
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
|
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
env:
|
env:
|
||||||
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
with:
|
run: ./gradlew fabric:modrinth
|
||||||
arguments: fabric:modrinth
|
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
|
|
||||||
- name: Publish to Modrinth (NeoForge)
|
- name: Publish to Modrinth (NeoForge)
|
||||||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5
|
|
||||||
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
if: ${{ success() && github.repository == 'GeyserMC/Geyser' && github.ref_name == 'master' }}
|
||||||
env:
|
env:
|
||||||
|
BUILD_NUMBER: ${{ steps.release-info.outputs.curentRelease }}
|
||||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
with:
|
run: ./gradlew neoforge:modrinth
|
||||||
arguments: neoforge:modrinth
|
|
||||||
gradle-home-cache-cleanup: true
|
|
||||||
|
|
||||||
- name: Notify Discord
|
- name: Notify Discord
|
||||||
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
if: ${{ (success() || failure()) && github.repository == 'GeyserMC/Geyser' }}
|
||||||
# See https://github.com/Tim203/actions-git-discord-webhook/commits
|
uses: GeyserMC/actions/notify-discord@master
|
||||||
uses: Tim203/actions-git-discord-webhook@70f38ded3aca51635ec978ab4e1a58cd4cd0c2ff
|
|
||||||
with:
|
with:
|
||||||
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
|
discordWebhook: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
|
body: ${{ steps.metadata.outputs.body }}
|
||||||
|
|
57
.github/workflows/preview.yml
vendored
57
.github/workflows/preview.yml
vendored
|
@ -26,30 +26,30 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
|
||||||
PROJECT: 'geyserpreview'
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set Variables
|
- name: Set Variables
|
||||||
id: setvars
|
id: setvars
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
|
||||||
echo "BUILD=${{ github.event.inputs.build }}" >> $GITHUB_ENV
|
echo "BUILD=${{ github.event.inputs.build }}" >> $GITHUB_ENV
|
||||||
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
|
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
|
||||||
echo "RUN=${{ github.event.inputs.runId }}" >> $GITHUB_OUTPUT
|
echo "RUN=${{ github.event.inputs.runId }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "BUILD=${{ inputs.build }}" >> $GITHUB_ENV
|
echo "BUILD=${{ inputs.build }}" >> $GITHUB_ENV
|
||||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
|
echo "VERSION=${{ inputs.version }}" >> $GITHUB_OUTPUT
|
||||||
echo "RUN=${{ github.run_id }}" >> $GITHUB_OUTPUT
|
echo "RUN=${{ github.run_id }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427
|
- name: Download Artifacts
|
||||||
|
# See https://github.com/actions/download-artifact/commits
|
||||||
|
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.6
|
||||||
with:
|
with:
|
||||||
run-id: ${{ steps.setvars.outputs.RUN }}
|
run-id: ${{ steps.setvars.outputs.RUN }}
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Get Preview Metadata
|
- name: Get Preview Metadata
|
||||||
if: success()
|
if: success()
|
||||||
# See https://github.com/Kas-tle/base-release-action/releases/tag/main-11
|
uses: GeyserMC/actions/release@master
|
||||||
uses: Kas-tle/base-release-action@664c39985eb9d0d393ce98e7eb8414d3d98e762a # main-11
|
id: metadata
|
||||||
with:
|
with:
|
||||||
appID: ${{ secrets.RELEASE_APP_ID }}
|
appID: ${{ secrets.RELEASE_APP_ID }}
|
||||||
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
appPrivateKey: ${{ secrets.RELEASE_APP_PK }}
|
||||||
|
@ -64,33 +64,20 @@ jobs:
|
||||||
releaseEnabled: false
|
releaseEnabled: false
|
||||||
saveMetadata: true
|
saveMetadata: true
|
||||||
updateReleaseData: false
|
updateReleaseData: false
|
||||||
- name: Update Generated Metadata
|
releaseProject: 'geyserpreview'
|
||||||
if: success()
|
releaseVersion: ${{ steps.setvars.outputs.VERSION }}
|
||||||
run: |
|
|
||||||
cat metadata.json
|
|
||||||
echo
|
|
||||||
mv metadata.json metadata.json.tmp
|
|
||||||
jq --arg project "${PROJECT}" --arg version "${VERSION}" --arg number "${BUILD}" '
|
|
||||||
.
|
|
||||||
| .downloads |= map_values({"name", "sha256"})
|
|
||||||
| {$project, "repo", $version, "number": $number | tonumber, "changes": [], "downloads"}
|
|
||||||
' metadata.json.tmp > metadata.json
|
|
||||||
cat metadata.json
|
|
||||||
- name: Publish to Downloads API
|
- name: Publish to Downloads API
|
||||||
if: success()
|
if: success()
|
||||||
shell: bash
|
uses: GeyserMC/actions/upload-release@master
|
||||||
env:
|
with:
|
||||||
DOWNLOADS_USERNAME: ${{ vars.DOWNLOADS_USERNAME }}
|
username: ${{ vars.DOWNLOADS_USERNAME }}
|
||||||
DOWNLOADS_PRIVATE_KEY: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
privateKey: ${{ secrets.DOWNLOADS_PRIVATE_KEY }}
|
||||||
DOWNLOADS_SERVER_IP: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
host: ${{ secrets.DOWNLOADS_SERVER_IP }}
|
||||||
run: |
|
files: |
|
||||||
# Save the private key to a file
|
Geyser-BungeeCord.jar
|
||||||
echo "$DOWNLOADS_PRIVATE_KEY" > id_ecdsa
|
Geyser-Fabric.jar
|
||||||
chmod 600 id_ecdsa
|
Geyser-NeoForge.jar
|
||||||
# Create the build folder
|
Geyser-Spigot.jar
|
||||||
ssh -o StrictHostKeyChecking=no -i id_ecdsa $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP mkdir -p "~/uploads/$PROJECT/$BUILD/"
|
Geyser-Standalone.jar
|
||||||
# Copy over artifacts
|
Geyser-Velocity.jar
|
||||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" Geyser-*.jar $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$BUILD/
|
Geyser-ViaProxy.jar
|
||||||
# Run the build script
|
|
||||||
# Push the metadata
|
|
||||||
rsync -P -e "ssh -o StrictHostKeyChecking=no -i id_ecdsa" metadata.json $DOWNLOADS_USERNAME@$DOWNLOADS_SERVER_IP:~/uploads/$PROJECT/$BUILD/
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ public abstract class GeyserJacksonConfiguration implements GeyserConfiguration
|
||||||
private boolean debugMode = false;
|
private boolean debugMode = false;
|
||||||
|
|
||||||
@JsonProperty("allow-third-party-capes")
|
@JsonProperty("allow-third-party-capes")
|
||||||
private boolean allowThirdPartyCapes = true;
|
private boolean allowThirdPartyCapes = false;
|
||||||
|
|
||||||
@JsonProperty("show-cooldown")
|
@JsonProperty("show-cooldown")
|
||||||
private String showCooldown = "title";
|
private String showCooldown = "title";
|
||||||
|
|
|
@ -80,7 +80,10 @@ public class InteractionEntity extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHeight(FloatEntityMetadata height) {
|
public void setHeight(FloatEntityMetadata height) {
|
||||||
setBoundingBoxHeight(height.getPrimitiveValue());
|
// Bedrock does *not* like high values being placed here
|
||||||
|
// https://gist.github.com/Owen1212055/f5d59169d3a6a5c32f0c173d57eb199d recommend(s/ed) using the tactic
|
||||||
|
// https://github.com/GeyserMC/Geyser/issues/4688
|
||||||
|
setBoundingBoxHeight(Math.min(height.getPrimitiveValue(), 64f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setResponse(BooleanEntityMetadata response) {
|
public void setResponse(BooleanEntityMetadata response) {
|
||||||
|
|
|
@ -41,16 +41,18 @@ public class TippedArrowItem extends ArrowItem {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemData.Builder translateToBedrock(int count, DataComponents components, ItemMapping mapping, ItemMappings mappings) {
|
public ItemData.Builder translateToBedrock(int count, DataComponents components, ItemMapping mapping, ItemMappings mappings) {
|
||||||
PotionContents potionContents = components.get(DataComponentType.POTION_CONTENTS);
|
if (components != null) {
|
||||||
if (potionContents != null) {
|
PotionContents potionContents = components.get(DataComponentType.POTION_CONTENTS);
|
||||||
TippedArrowPotion tippedArrowPotion = TippedArrowPotion.of(potionContents.getPotionId());
|
if (potionContents != null) {
|
||||||
if (tippedArrowPotion != null) {
|
TippedArrowPotion tippedArrowPotion = TippedArrowPotion.of(potionContents.getPotionId());
|
||||||
return ItemData.builder()
|
if (tippedArrowPotion != null) {
|
||||||
.definition(mapping.getBedrockDefinition())
|
return ItemData.builder()
|
||||||
.damage(tippedArrowPotion.getBedrockId())
|
.definition(mapping.getBedrockDefinition())
|
||||||
.count(count);
|
.damage(tippedArrowPotion.getBedrockId())
|
||||||
|
.count(count);
|
||||||
|
}
|
||||||
|
GeyserImpl.getInstance().getLogger().debug("Unknown Java potion (tipped arrow): " + potionContents.getPotionId());
|
||||||
}
|
}
|
||||||
GeyserImpl.getInstance().getLogger().debug("Unknown Java potion (tipped arrow): " + potionContents.getPotionId());
|
|
||||||
}
|
}
|
||||||
return super.translateToBedrock(count, components, mapping, mappings);
|
return super.translateToBedrock(count, components, mapping, mappings);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,10 +72,6 @@ public class JavaContainerSetSlotTranslator extends PacketTranslator<Clientbound
|
||||||
|
|
||||||
InventoryTranslator translator = session.getInventoryTranslator();
|
InventoryTranslator translator = session.getInventoryTranslator();
|
||||||
if (translator != null) {
|
if (translator != null) {
|
||||||
if (session.getCraftingGridFuture() != null) {
|
|
||||||
session.getCraftingGridFuture().cancel(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
int slot = packet.getSlot();
|
int slot = packet.getSlot();
|
||||||
if (slot >= inventory.getSize()) {
|
if (slot >= inventory.getSize()) {
|
||||||
GeyserLogger logger = session.getGeyser().getLogger();
|
GeyserLogger logger = session.getGeyser().getLogger();
|
||||||
|
@ -112,14 +108,22 @@ public class JavaContainerSetSlotTranslator extends PacketTranslator<Clientbound
|
||||||
* Checks for a changed output slot in the crafting grid, and ensures Bedrock sees the recipe.
|
* Checks for a changed output slot in the crafting grid, and ensures Bedrock sees the recipe.
|
||||||
*/
|
*/
|
||||||
private static void updateCraftingGrid(GeyserSession session, int slot, ItemStack item, Inventory inventory, InventoryTranslator translator) {
|
private static void updateCraftingGrid(GeyserSession session, int slot, ItemStack item, Inventory inventory, InventoryTranslator translator) {
|
||||||
|
// Check if it's the crafting grid result slot.
|
||||||
if (slot != 0) {
|
if (slot != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if there is any crafting grid.
|
||||||
int gridSize = translator.getGridSize();
|
int gridSize = translator.getGridSize();
|
||||||
if (gridSize == -1) {
|
if (gridSize == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Only process the most recent crafting grid result, and cancel the previous one.
|
||||||
|
if (session.getCraftingGridFuture() != null) {
|
||||||
|
session.getCraftingGridFuture().cancel(false);
|
||||||
|
}
|
||||||
|
|
||||||
if (InventoryUtils.isEmpty(item)) {
|
if (InventoryUtils.isEmpty(item)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue