TheAfroOfDoom/omega-flowey-minecraft-remastered

make `datapack` workflow compile AJ export files

Closed this issue · 0 comments

ever since #71 deleted AJ export files from the repo, the datapack test server (packtest) will no longer be able to call animated_java functions it was previously able to in tests. this means that we can't actually test any map functionality that relies on Animated Java export files. this includes:

  • attacks
  • soul events
  • anything with a model, e.g. Flowey model stuff

the bulk of important map functionality relies directly on Animated Java

work of this ticket is to change the .github/workflows/datapack.yml workflow to TL;DR do the setup steps we defined in the README to be able to run the auto-export script. that is:

  1. download and install Blockbench to the runner
  2. install our bb-cli plugin
  3. install AJ at some version

setup steps above are from the README:

1. [Blockbench](https://www.blockbench.net/downloads) -- for 3D modelling
- Install our Blockbench CLI plugin:
- Open Blockbench, then go to `File > Plugins > Load Plugin From File` and select the `bb-cli.js` file from your local `omega-flowey-remastered` repo (`omega-flowey-remastered/package-scripts/modules/bb-cli.js`).
- Install Animated Java from the Blockbench plugin store
- see the [docs](https://animated-java.dev/docs/getting-started/installing-animated-java#installing-animated-java) for a detailed guide on how to do this.
- Restart Blockbench after installing these plugins

we should also definitely implement some caching so the github runner doesn't need to do all those steps everytime it runs -- if we use the same version of blockbench, bb-cli, and our AJ fork plugin, the runner should be able to restore all of that from cache and save (probably a lot of) time


after Blockbench and our required plugins are installed, we should be able to make the workflow run our AJ export scripts (yarn start export) to generate the AJ export files, just like we do during local development.


datapack unit test workflow at time of writing:

test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Download server files
run: |
curl -o server.jar $FABRIC_SERVER
mkdir mods
curl -o mods/fabric-api.jar $FABRIC_API
curl -o mods/packtest.jar $PACKTEST
- name: Copy packs to world
run: |
mkdir -p world
cp -r datapacks world
- name: Run test server
run: |
java -Xmx2G -Dpacktest.auto -jar server.jar nogui