TheAfroOfDoom / omegaflowey-minecraft-remastered

MIT License
3 stars 1 forks source link

🔨 add build script to compile datapack/resourcepack #189

Closed TheAfroOfDoom closed 3 weeks ago

TheAfroOfDoom commented 3 weeks ago

Summary

I was loathing having to actively delete code in order to bundle a Summit version of the datapack/resourcepack (either through commits to the repo or manually every time I'd want to make a build).

Plan is to merge the majority, if not all, of this code on smithed-summit-2024 to main after the Summit is complete.

Now, we don't need to delete any code we'll actually want later (e.g. the vanilla boss fight code).


This PR adds a build.js script that copies a configurable list of files from the repo source to a build/omegaFlowey[Data/Resource]pack directory.

It supports post-processing steps that are ran on the build directory after copying, allowing for operations like pruning certain files out of the build.


To test the validity of the summit build, I manually copied the built artifacts (the resourcepack and datapack) to my local Minecraft instance. I then ran the boss fight manually to verify the state logic still worked as expected, the models rendered properly, sounds were loaded, the soul event works, etc.

I manually ran each summit test to verify they work in the summit build as well.


Reproducing

yarn start build

Preview

default output
image
verbose
image

Supplemental changes

TheAfroOfDoom commented 3 weeks ago

these builds' first sizes are:

note that these sizes are technically larger than they should be right now because we shouldn't be exporting the unused AJ files (relating to attack/flies and soul/0), but they build on my local machine still if i don't explicitly delete those files