This repository contains various examples of Minecraft datapacks created using Kore, a modern Kotlin library for datapack development.
Kore allows you to create complex Minecraft datapacks using Kotlin, eliminating the need to write raw JSON or .mcfunction files manually.
A recreation of the MoreApples datapack by Stoupy51.
This example demonstrates how to:
- Modify loot tables for all types of leaves.
- Use predicates and conditions (e.g., Silk Touch checks).
- Generate a
.zipdatapack file automatically.
The datapack ensures that all leaf types have a chance to drop apples, doubling the drop rate compared to vanilla oak leaves.
A recreation of the rotten-flesh-to-leather datapack.
This example demonstrates how to:
- Add simple recipes (smelting and smoking).
- Use items as ingredients and results.
The datapack allows you to smoke rotten flesh for leather and smelt it for brown dye.
These examples use Amper as the build system.
To build and generate the datapacks:
- Clone the repository.
- Run the main class in the desired example module.
- The generated datapacks will be located in the
out/directory.
To install one of these datapacks into your Minecraft world:
- Generate the datapack: Follow the How to run instructions to create the
.zipfile. - Locate the file: Find the generated
.zipfile in theout/directory (e.g.,out/more-apples.zip). - Open your world folder: In Minecraft, select your world, click Edit, then Open World Folder.
- Copy to datapacks: Move the
.zipfile into thedatapacksfolder. - Reload: If the world is already running, use the
/reloadcommand.
This project uses GitHub Actions to automate the publishing process to Modrinth.
The workflow is defined in .github/workflows/publish.yml.
- Trigger: The workflow runs automatically when a new release is published or can be triggered manually via
workflow_dispatch. - Build: It uses Amper to build the project and generate the datapack files.
- Publish: The
Kir-Antipov/mc-publishaction takes the generated.zipfiles from theout/directory and uploads them to Modrinth.
This ensures that every release of this repository is automatically available for users to download.
This project is licensed under the GNU v3 License - see the LICENSE file for details.
Created with ❤️ using Kore.