Skip to content

Python Datapack is a Python package aiming to provide huge automation for creating datapacks. It is designed to be very simple to use and very convenient for developers.

Notifications You must be signed in to change notification settings

Stoupy51/PythonDatapackTemplate

Repository files navigation

Python Datapack Template

YouTube GitHub PMC Discord PyPI - Downloads

❓ What is python_datapack

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:
  • 🌐 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.

📦 How to use

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! 🧹

🔧 Minecraft version

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 ⚠️, the template could use features that are not available in the previous versions.

📚 Documentation

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:

🤝 Contribute

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.

📜 What projects use Python Datapack?

To search for projects that use the package, I search like this.
Here is a list of projects that use the package:

⭐ Star History

Star History Chart

About

Python Datapack is a Python package aiming to provide huge automation for creating datapacks. It is designed to be very simple to use and very convenient for developers.

Resources

Stars

Watchers

Forks

Packages

No packages published