From e697337f067feb7917e460553c493107adab299b Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 8 Oct 2024 17:03:15 -0400 Subject: [PATCH] Added explanation of mindustry.gen --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 095c70ed3a..30e864545c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,16 @@ To debug the application on a connected device/emulator, run `gradlew android:in If the terminal returns `Permission denied` or `Command not found` on Mac/Linux, run `chmod +x ./gradlew` before running `./gradlew`. *This is a one-time procedure.* +#### Where is the `mindustry.gen` package? + +As the name implies, `mindustry.gen` is generated *at build time* based on other code. You will not find source code for this package in the repository, and it should not be edited by hand. + +The following is a non-exhaustive list of the "source" of generated code in `mindustry.gen`: + +- `Call`, `*Packet` classes: Generated from methods marked with `@Remote`. +- All entity classes (`Unit`, `EffectState`, `Posc`, etc): Generated from component classes in the `mindustry.entities.comp` package, and combined using definitions in `mindustry.content.UnitTypes`. +- `Sounds`, `Musics`, `Tex`, `Icon`, etc: Generated based on files in the respective asset folders. + --- Gradle may take up to several minutes to download files. Be patient.