Open BehrRiley opened 8 months ago
The zipping can be done via a script Python API script:
git pull
to verify synced with upstream
@echo off
SETLOCAL
set "FOLDER_NAME=b-resource" set "ZIP_FILE=b.zip"
cd %FOLDER_NAME%
REM Pull the latest changes from the remote repository echo Pulling latest changes from the git repository... git pull
REM Check for git pull errors if errorlevel 1 ( echo Error encountered during 'git pull'. Aborting script. goto End )
REM Using git to archive non-ignored files echo Creating archive of non-ignored files... git archive -o "../%ZIP_FILE%" HEAD
echo Archive created successfully.
:End ENDLOCAL
Three parts to this system, allowing us to host the resource pack directly from our web cloud and the server directly.
Save and Compile Pack
This piece is the first piece but can be skipped for the moment since we can manually upload the pack to it's file location on the web cloud.
Generate the Pack SHA-1
This should be simple; the endpoint opened explicitly for this file:
https://api.behr.dev/resource/b.zip
That should make the entirety of the script, excluding any debugging or error handling:this can be updated on startup:
Serve the Resource Pack
Lastly and simply, just serving it on join:
Likely may need something to do with the resource pack status event