python_datapack
is a Python package 📦 (and a template) aiming to provide huge automation for creating Minecraft datapacks.
It is designed to be very simple to use and very convenient for developers.
Here is a list of features that the package provides (the template is using all of them with clear comments):
- 🔄 Automatic resource pack files generation (models, textures, sounds, music discs) with the ability to override them with help of the
assets
folder. - ⏳ Versioned load, and clock functions such as
tick
,second
,minute
. - 🗃️ Loot tables for every item in the
database
along with a proper_give_all
function that gives named chests. - 📖 Automatic generation of a really advanced and interactive items
manual
. - 📝 Automatic generation of a
en-us.json
lang file in the resource pack if configuration is set. - 🖼️ Automatic headers for every function in
functions
folders. - 📦 Minecraft like vanilla recipes unlocking.
- 📚 Official libraries integrations:
- 🧪 Automatic support for NBT Recipes with
Smithed Crafter
andFurnace NBT Recipes
- 🛠️ Placement and destruction for every custom block in the
database
with support for blockstates, ore drops (fortune, silk touch), withSmithed Custom Blocks
. - ⛏️ Custom ore generation with
Smart Ore Generation
. - 📦 Item transportation / container declaration with
ItemIO
when making custom containers. - 🔔 Events such as new items detection with
Common Signals
.
- 🧪 Automatic support for NBT Recipes with
- 🌐 External datapack libraries support, see configuration for more information.
- 🔗 Merging datapacks and resource packs with libraries using Smithed Weld.
- 🧩 Automatic recognition of custom blocks patterns depending on the texture names in the
assets/textures
folder. For instance, if you have a top, side, and bottom texture, the block will be automatically recognized as a cube with the top, side, and bottom textures. - 📏 Follow the datapack conventions such as LanternLoad, CustomModelData prefix, tag specification, and namespacing.
- 🧰 Ability to merge a model with the autogenerated one or override it.
- 🔀
merge
folder providing a way to merge custom files with the autogenerated ones or add custom files to the datapack. - ⚙️ Automatic special compatibilities with datapacks such as
SimpleDrawer's compacted drawer
,SimplEnergy's pulverizer
. - 📂 Automatic copy of generated zip files to configured folders.
In order to use the package, you need to have at least Python 3.10 or higher installed on your computer.
Then, you can clone this repository and start configuring the config.py
script.
Every configuration is explained in the file.
Once you have configured the script, you can run the build.py
script.
The script will generate a datapack and a resource pack in the build
folder.
And that's it! 🎉 That is very simple to use the package.
Since this template is using all the features of the package, you can remove the parts you don't need! 🧹
The Minecraft version will depend on the version of the package you are using.
Currently, this template is using the 1.21.3.x
version of the package.
As you can see, the x
is the version of the package and the 1.21.3
is the Minecraft version.
If you have Python knowledge, you can use previous versions of the package with pip install python_datapack==1.21.3.x
.
But warned
There are a lot of features in the package, you could check the template to see how to use them.
Alternatively, you could join the Discord server to ask questions and get help from the community!
Or, you could check the highly detailed documentation folder
Here a list of all the currently available guides:
- Project structure
- Database setup
- Writing to files
- External dependencies
- Miscellaneous
- Migration guide
- Adding a sword
- More soon!
Want to help improve Python Datapack? 🔍
Make sure first you contribute on the right repository, such as the package 📦 itself.
Here's how you can contribute:
- 🐛 Report Bugs: Found a bug? Open an issue on GitHub describing what happened and how to reproduce it.
- ✨ Suggest Features: Have an idea for a new feature? Share it in the issues section!
- 🔧 Submit Pull Requests: Feel free to fix bugs or add new features by submitting pull requests.
- 📚 Improve Documentation: Help make our docs better by fixing errors or adding examples.
- 💬 Help Others: Join our Discord server and help other users with their questions.
All contributions are welcome! Please make sure to read our contribution guidelines before making a pull request.
To search for projects that use the package, I search like this.
Here is a list of projects that use the package:
-
Actual projects:
- Your next project here!
- https://github.com/e-psi-lon/Armored-Elytra
- https://github.com/Stoupy51/SimplEnergy
- https://github.com/Stoupy51/ImagineYourCraftDatapack
- https://github.com/Stoupy51/LifeSteal
- https://github.com/Stoupy51/Survisland
- https://github.com/Stoupy51/SmithedSummit
- https://github.com/Stoupy51/SheepWars
- https://github.com/Stoupy51/MoreApples
- https://github.com/Stoupy51/CauldronConcretePowder
-
Libraries or tools: