Modding: Difference between revisions
imported>Ambos m (Added BTA modding Discord link) |
imported>Ambos m (Changed mod names for consistency) |
||
| Line 28: | Line 28: | ||
=== Set up the development environment === | === Set up the development environment === | ||
# Download or clone the [https://github.com/Turnip-Labs/bta-example-mod BTA Babric | # Download or clone the [https://github.com/Turnip-Labs/bta-example-mod BTA Babric Example Mod] (or [https://github.com/Turnip-Labs/bta-example-mod-kotlin BTA Babric Example Mod Kotlin]) and put it somewhere: <code>git clone <nowiki>https://github.com/Turnip-Labs/bta-minimal-mod.git</nowiki></code> | ||
# Import the project in IntelliJ IDEA, close it and open it again. | # Import the project in IntelliJ IDEA, close it and open it again. | ||
# Create a new run configuration by going in <code>Run > Edit Configurations</code>. Then click on the plus icon and select Gradle. In the <code>Tasks and Arguments</code> field enter <code>build</code>. Running it will build your finished jar files and put them in <code>build/libs/</code> | # Create a new run configuration by going in <code>Run > Edit Configurations</code>. Then click on the plus icon and select Gradle. In the <code>Tasks and Arguments</code> field enter <code>build</code>. Running it will build your finished jar files and put them in <code>build/libs/</code> | ||
Revision as of 16:13, 10 August 2023
Users
Prerequisites
- Verify your Java 17 installation (Windows, macOS or Linux)
- Install MultiMC or one of its fork (PolyMC, Prism Launcher, ...)
Note: to avoid a common issue on GNU/Linux systems, both users and developers should use the Temurin 17 JDK (AUR package)
Installation
We are going to use Babric, which is a modification of Fabric for Minecraft Beta 1.7.3.
- Download the Babric MultiMC instance for BTA! 1.7.7.0 (archive) or BTA! 1.7.6.2_02 (archive)
- Import the instance into your launcher
Adding mods
- Search through the
#mods-and-community-downloadschannel on the official BTA! Discord server or find mods on Github (example) - Download the JAR file
- Put it inside your
.minecraft/modsfolder in your Babric BTA! instance directory
Developers
Prerequisites
- Install IntelliJ IDEA and MinecraftDev plugin
Set up the development environment
- Download or clone the BTA Babric Example Mod (or BTA Babric Example Mod Kotlin) and put it somewhere:
git clone https://github.com/Turnip-Labs/bta-minimal-mod.git - Import the project in IntelliJ IDEA, close it and open it again.
- Create a new run configuration by going in
Run > Edit Configurations. Then click on the plus icon and select Gradle. In theTasks and Argumentsfield enterbuild. Running it will build your finished jar files and put them inbuild/libs/ - Open
File > Settingsand head toBuild, Execution, Development > Build Tools > Gradle. ChangeBuild and run usingandRun tests usingtoIntelliJ IDEA - Open
File > Project Structure, selectProjectand setCompiler outputto your project's path/out. - Make sure your Client and Server run configurations have
-Dfabric.gameVersion=1.7.7.0inVM options - Done. Now all that's left is to change every mention of
examplemodto your own mod id.
Resources
Developers documentation
- Fabric Wiki
- Introduction to Mixins
- Mixin Official Wiki
- Mixin javadoc
- Mixin Cheatsheet
- BTA modding Discord (unofficial)
Note: Since BTA is distributed without obfuscation, all Mixin classes must set the remap option to false. Also, when modding for BTA! 1.7.6.2_02, set loadMods to false in option.txt to avoid errors showing up in the run client configurations logs.