Skip to content

Contributing

YoannDev90 edited this page May 3, 2026 · 1 revision

Development Guide

For Modders

Building From Source

Prerequisites:

  • Java 17+
  • Git
  • Gradle 8.11+

Steps:

  1. Clone the repository:
git clone https://github.com/YoannDev90/StackableTools.git
cd StackableTools
  1. Configure the build:
cp compile_config_sample.json compile_config.json
# Edit compile_config.json with your launcher paths
  1. Build the mod:
./gradlew build

The compiled JAR will be in build/libs/.

Project Structure

src/
├── main/
│   ├── kotlin/stackabletools/
│   │   ├── StackableTools.kt          # Main entry point
│   │   ├── StackableToolsUtils.kt     # Core utilities
│   │   ├── CustomLogger.kt            # Logging
│   │   ├── config/
│   │   │   ├── ConfigManager.kt
│   │   │   ├── StackableToolsConfig.kt
│   │   │   └── StackingCategory.kt
│   │   └── mixin/
│   │       ├── ArmorItemMixin.kt
│   │       ├── ArmorSlotMixin.kt
│   │       ├── ElytraItemMixin.kt
│   │       ├── InventoryMixin.kt
│   │       ├── ItemStackMixin.kt
│   │       └── ScreenHandlerMixin.kt
│   └── resources/
│       ├── fabric.mod.json
│       ├── stackabletools.mixins.json
│       ├── stackabletools.default.toml
│       └── assets/

Key Classes

  • StackableToolsUtils.kt: Core stacking logic

    • isStackableItem() - Determines if an item can stack
    • canStackItems() - Checks if two items are compatible
  • InventoryMixin.kt: Handles insertion into player inventory

  • ItemStackMixin.kt: Handles durability isolation when items are used

  • ConfigManager.kt: TOML configuration loading and saving

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/MyFeature
  3. Commit your changes: git commit -m 'Add MyFeature'
  4. Push to your fork: git push origin feature/MyFeature
  5. Open a Pull Request

Clone this wiki locally