Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 4.04 KB

5_miscellaneous.md

File metadata and controls

57 lines (42 loc) · 4.04 KB

🔧 Miscellaneous Features

This documentation covers various features and examples that didn't really fit in other categories.

🗄️ SimpleDrawer's Compacting Drawer

If you're adding custom materials to your datapack, you might want to add compatibility for SimpleDrawer's compacting drawers 🗄️.
By default, the process is handled automatically and will recognize patterns in your recipes to create compacting drawer recipes ✨.
For instance,

  • If you have a steel block 🧊, steel ingots ⚔️ and steel nuggets 💎, having recipes that link them,
  • It will create a compacting drawer recipe that turns steel ingots into a steel block and steel nuggets into a steel ingot.
  • The recipe ratio is by default 1:9:81, but the program will detect the ratio used in your recipes and use the same one.
  • For instance, if you have a 1:4:16 ratio defined in your recipes, it will create a 1:4:16 ratio for the compacting drawer recipe.

In case you don't want this behavior, you can still use delete_files("simpledrawer/") during link process to remove the compacting drawer recipes.
They are generated at your_namespace:calls/simpledrawer/material 📁.

🔮 SimplEnergy's Pulverizer Items

If you're adding custom materials to your datapack, and you have a dust item, you might want to add compatibility for SimplEnergy's pulverizer 🔮.
By default, the process is handled automatically and will recognize patterns in your recipes to create pulverizer recipes ✨.
For instance,

  • If you have raw steel 🔩 (or steel ore) and steel ingots ⚔️,
  • It will create a pulverizer recipe that turns raw steel into 2x steel dust 💧.
  • Those 2 steel dust can be smelted into one steel ingot each.
  • Additionally, you can pulverize 1x steel ingot into 1x steel dust.

In case you don't want this behavior, you can still use delete_files("simplenergy/") during link process to remove the pulverizer recipes.
They are generated at your_namespace:calls/simplenergy/pulverizer_recipes 📁.

🔓 Recipe Unlocking

By default, vanilla recipes (ones that don't use custom items in ingredients) will be automatically unlocked for players whenever they discover an ingredient of said recipe.
This behavior can be changed by deleting the advancement unlock_recipes.json along with the reward function unlock_recipes.mcfunction 📁.

⏰ Clock Functions for Custom Blocks

When creating custom blocks ⚡, you often need to run functions every tick or at regular intervals ⏰.
For all custom blocks, the program will check if a function named tick or second is present in the custom block's folder 📁.
If it is, the custom block will be granted additional tags on placement to identify it as a ticking block 🏷️.
Then, proper functions will be created to run the tick or second code at the right time for each detected custom block 🔄.
For instance,

  • If you want an electric furnace to run a function every tick ⚡, you simply add a tick.mcfunction file in the electric furnace's folder 📁.
  • Same goes for a second.mcfunction file, if you want the custom block to run a function every 20 ticks ⏳.
  • The program will do everything else automatically, so you don't have to worry about a thing ✨.

📚 Conclusion

You now know how to:

  • Create compacting drawer recipes for SimpleDrawer
  • Add custom dust items for SimplEnergy's pulverizer
  • Control recipe unlocking through advancements
  • Set up clock functions for custom blocks

These features will help you create more complex and interactive datapacks!
Thank you for reading 🙌