
Nutlet
A Datapack API that focus on creating Multi-block Machines. It provides schematic displays, simple enhanced /schedule, utilities for handling block orientation, UUID conversion, in‑game adjustable setting.
Nutlet is a lightweight, utility‑focused data pack designed to easyly creating Multi-block machines.
Key Features
📖 Spell Book
A book with a custom Enchantment. Players write a specific Word or Phrase on its first page, then left-click a block or attack an entity to trigger a corresponding Function.
This lets creators capture Block/Entity Interactions without relying on advancements or raycasting. Just like the function of Soft Mallet in GregTech mod.
Easy registration via the #nutlet:spells function tag.
⏰ Enhanced /schedule
Extends the vanilla /schedule command by allowing you to pass NBT data to the delayed function via storage.
🖼️ Schematic Displays
Summon Block, Item, or Text Display entities that vanish after a set time—even if the chunk is unloaded. Perfect for previewing multiblock structures or giving visual feedback. The vanish function depends on the enhanced /schedule mentioned earlier.
Can specify transformation, block properties, item components, or text JSON.
Optional validity check: if the projected block doesn't match the intended state, a warning text display appears instead.
🔄 Orientation Helpers
Functions that adjust Command Execution Context based on a block's facing direction or an entity's rotation.
-
nutlet:-m/facing/block
Get Facing and Orientation of a block (furnace, piston, dispenser, crafter, etc.). -
nutlet:-m/facing/entity
Get the Facing Direction from an entity's Rotation. -
nutlet:-m/facing/block_axis_align&nutlet:-m/facing/entity_axis_align
run a function after aligning Execution Angle to the faced direction, making Multi-Block Machines orientation‑agnostic.
🔁 UUID Conversion
Converts a UUID Array (e.g., from an entity's UUID tag) into a hyphenated hexadecimal string that can be used directly in Target Selectors (e.g., /execute as 2ed128ed-5e7b-4a13-b3e0-a49b2749dbd7 run ...).
☀️ Brightness
Calculates the light level at the Executing Position, taking into account adjacent blocks if the block itself is light‑blocking.
⚙️ In‑Game Configuration
Register configuration options that players can Modify at In-Game using the Spell Book.
Two storage backings: scoreboard (for integers) or command storage (for any NBT).
Can define a description, valid range, or a whitelist of acceptable values.
Default values are automatically injected on first load world.
Only the First Player to obtain a Spell Book can Change settings (prevents abuse).
🧰 Additional Utilities
nutlet:-m/schematic/tick
Summon an Armor Stand that runs a Function every tick (with mutable cooldown and changable functions) for simple periodic tasks.
For Datapack Creators
Register spells via the #nutlet:spells function tag.
Register configuration options via the #nutlet:configs function tag.
Call utility functions under the nutlet:-m/... namespace.
Look at these two sample Datapacks to get a more detailed understanding of how to use Nutlet:
Roost, Rock Generator
How to install
Datapack part
- Open Minecraft.
- Select the world you want to install the Datapack for, click on "Edit", then "Open world folder".
- Open the folder named "datapacks", and put the Datapack(It should like "Nutlet_V1.2.zip") into it.
- Relogin the world, you will see the version of Datapack on chats.
You can use Spell Book disable print version of Datapack when relogin.
Resourcepack part, for Localization translation
- Open Minecraft, select "Options", then "Resource Packs", then "Open Pack Folder".
- Put the Datapack(The Datapack file is both datapack and resourcepack) into it.
- Back the Minecraft, select new one and Click "Done".
