Skip to content

MinecraftPlayground/generate-assets

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generate-assets

GitHub Action that generates Minecraft default resourcepack assets for a specified version.

Test Action

Usage

jobs:
  download-assets:
    runs-on: ubuntu-latest
    steps:
      - name: 'Download assets to "./default_assets"'
        id: download_assets
        uses: MinecraftPlayground/generate-assets@latest
        with:
          version: 1.21.2
          path: './default_assets'
          parallel-downloads: 10

      - name: 'List failed downloads'
        run: |
          FAILED_DOWNLOADS_FILES=${{ steps.download_assets.outputs.failed-downloads }}
          if [ $FAILED_DOWNLOADS_FILES != "[]" ]; then
            echo "Failed downloads:"
            echo $FAILED_DOWNLOADS_FILES | jq '.[]'
          else
            echo "No failed downloads."
          fi

Inputs

Input Required? Default Description
version No latest-release Minecraft version to generate assets for or one of latest-release/latest-snapshot.
path No ./default Relative path under $GITHUB_WORKSPACE to place the assets.
api-url No https://piston-meta.mojang.com/mc/game/version_manifest_v2.json URL to the Minecraft manifest API.
resources-url No https://resources.download.minecraft.net URL to the Minecraft resources API.
parallel-downloads No 5 How much files to download in parallel.
download-retries No 3 How much retries to download failed files.

Outputs

Output Description
failed-downloads List of URLs that failed to download.

License

The scripts and documentation in this project are released under the GPLv3 License.