1
I made a browser tool that turns Python-like code into Minecraft datapacks
I’ve been working on datapack-py, a browser-based datapack compiler.
It lets you write Python-like code and compile it into a normal Minecraft datapack zip. The idea is to
make bigger datapacks less painful when they start needing scoreboards, right-click items, raycasts,
bossbars, generated functions, and lots of repeated execute commands.
It features builtin functions for most in-game actions, all of which are much simpler to use. I also added additional features like variables which persist over reloads, lists, builtin raycast, and entity-specific values which aren't a complete mess.
Beta site:
https://datapack-py.pages.dev
Docs/examples:
https://github.com/Jplayz2468/datapack-py-docs
Example:
on_right_click(blink_wand):
with raycast_miss(
max=10,
step=1,
through=[air, cave_air, void_air],
__on_step=blink_trail
):
particle(portal, pos=here, delta=vec3(0.2, 0.4, 0.2), speed=0.1, count=35, force=true)
playsound("minecraft:entity.enderman.teleport", target=me, volume=0.8, pitch=1.2)
tp(me, here)
That compiles into a datapack with a custom item, right-click advancement, raycast functions,
particles, sound, teleport logic, and the needed Minecraft command structure.
The generated output includes files like:
data/my_pack/advancement/__click/right/blink_wand_1.json
data/my_pack/function/__click/right/blink_wand_1.mcfunction
data/my_pack/function/__click/right/blink_wand_1_body.mcfunction
data/my_pack/function/__ray/start_1.mcfunction
data/my_pack/function/__ray/step_1.mcfunction
data/my_pack/function/__ray/hit_1.mcfunction
It's NOT meant for you to edit in this format.
I’m mainly looking for feedback from people who actually make datapacks:
- Does the syntax make sense?
- Are the additional features, such as lists, useful?
- What Minecraft commands/features should be added next?
- What examples would convince you to try it?
- Is this useful, or would you rather stay with raw mcfunction?
It’s still beta, so expect rough edges. But the compiler works in-browser and downloads a datapack zip
directly.
It lets you write Python-like code and compile it into a normal Minecraft datapack zip. The idea is to
make bigger datapacks less painful when they start needing scoreboards, right-click items, raycasts,
bossbars, generated functions, and lots of repeated execute commands.
It features builtin functions for most in-game actions, all of which are much simpler to use. I also added additional features like variables which persist over reloads, lists, builtin raycast, and entity-specific values which aren't a complete mess.
Beta site:
https://datapack-py.pages.dev
Docs/examples:
https://github.com/Jplayz2468/datapack-py-docs
Example:
on_right_click(blink_wand):
with raycast_miss(
max=10,
step=1,
through=[air, cave_air, void_air],
__on_step=blink_trail
):
particle(portal, pos=here, delta=vec3(0.2, 0.4, 0.2), speed=0.1, count=35, force=true)
playsound("minecraft:entity.enderman.teleport", target=me, volume=0.8, pitch=1.2)
tp(me, here)
That compiles into a datapack with a custom item, right-click advancement, raycast functions,
particles, sound, teleport logic, and the needed Minecraft command structure.
The generated output includes files like:
data/my_pack/advancement/__click/right/blink_wand_1.json
data/my_pack/function/__click/right/blink_wand_1.mcfunction
data/my_pack/function/__click/right/blink_wand_1_body.mcfunction
data/my_pack/function/__ray/start_1.mcfunction
data/my_pack/function/__ray/step_1.mcfunction
data/my_pack/function/__ray/hit_1.mcfunction
It's NOT meant for you to edit in this format.
I’m mainly looking for feedback from people who actually make datapacks:
- Does the syntax make sense?
- Are the additional features, such as lists, useful?
- What Minecraft commands/features should be added next?
- What examples would convince you to try it?
- Is this useful, or would you rather stay with raw mcfunction?
It’s still beta, so expect rough edges. But the compiler works in-browser and downloads a datapack zip
directly.
