diff --git a/README.md b/README.md index 6a1e0cb9b..49ec9fd67 100644 --- a/README.md +++ b/README.md @@ -57,18 +57,35 @@ We also recommend using [blockcolors.app](https://blockcolors.app/) to get a rep --- -### Adding a new model/animation +### Development + +#### Important scripts + +Read the descriptions of the following scripts and run them when it is recommended to: + +1. `yarn start`: this does two important things: + + 1. keeps your local repository's content synced with your `.minecraft` directory -- datapack/resourcepack changes will reflect in-game + 2. watches `.ajmodel` files and runs our auto-exporter on them -- this reads all `.ajmodel` files in your local repo and runs Animated Java's `Export Project` function on them. + 1. we specifically _do not_ commit AJ's exported files to the repo since they are _very large_ + 2. the `watch.models` script _will not_ work if you already have Blockbench open, so don't expect it to do anything while that's the case + + We recommend keeping `yarn start` running at all times while working on the project. + +2. `yarn sync`: zips your Minecraft world and copies it to the repo as (`world.zip`). This is how we handle version-control for the actual Minecraft world. This is especially important to run and commit if you make any _physical changes_ to the world like breaking/placing blocks. +3. `yarn lint`: runs Prettier, ESLint, and our custom linting rules on our files. Run this prior to pushing commits to save on our workflow hours. +4. `yarn start export`: manually run the AJ model export script + 1. add `ELECTRON_ENABLE_LOGGING=1` to your `.env` file to enable log-passthrough from Blockbench's renderer process to the main process. **Run this if your `watch.models` script (from `yarn start`) runs into an error while exporting AJ models.** + +#### Adding a new model/animation 1. Create a new Animated Java Rig via `File > New > Animated Java Rig` 2. Enter inputs for the following required fields: 1. `Project Name` 2. `Resource Pack`: select the `pack.mcmeta` file located in the repository at `resourcepack/pack.mcmeta` - 3. `Data Pack`: select the `pack.mcmeta` file located in the repository at `datapacks/omega-flowey/pack.mcmeta` -3. Export your model/animations by clicking `Animated Java > Export Project` at the top - -When finished, ensure you partition commits into the following categories: - -1. `.ajmodel` + custom texture files ([example](https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/pull/55/commits/344c6da2d0676d2a6d358d5bf30df2e419458b77)) -2. automated export files when clicking `Animated Java > Export Project` ([example](https://github.com/TheAfroOfDoom/https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/pull/55/commits/ee471449e7e131b6c38129ddffb492769bf8064d)) - -This ensures we split commits by what's 100% required (new custom textures + the `.ajmodel` files) and by what's automatically generated (`Export Project` files). + 3. `Data Pack`: select the `pack.mcmeta` file located in the repository at `datapacks/animated_java/pack.mcmeta` +3. Save the file with `CTRL + S` to somewhere appropriate under `resourcepack/assets/omega-flowey/models` + 1. **While the model is still a work-in-progress, append `_dev` to the filename so our auto-export scripts skip it** + 1. e.g. `housefly_dev.ajmodel` +4. Export your model/animations by clicking `Animated Java > Export Project` at the top +5. When finished with the model, remove the `_dev` suffix from the filename (e.g. `housefly.ajmodel`)