#I created a language for datapack

1 messages · Page 1 of 1 (latest)

rare ferry
#

I'm currently working on this project, and it's still under active development. It follows a progressive design philosophy—meaning original Minecraft datapacks and .mcfunction files are valid Deco code. This allows you to gradually adopt Deco's syntax to take advantage of its features.

I've included a simple example as an image. Feel free to check out its GitHub page if you're interested:
https://github.com/adyingdeath/deco

GitHub

Contribute to adyingdeath/deco development by creating an account on GitHub.

dry aspen
#

I like this

tacit shuttle
#

I like the syntax

rare ferry
#

That's great.

#

The feature is still in its early stages, but I'll continue improving it.

#

Feel free to give it a try and share your suggestions. Your feedback will help me understand how Deco can better improve datapack development efficiency.

tepid gale
#

this looks good

rare ferry
merry flume
#

keep me updated

#

i have thought for long why no one has made this

rare ferry
#

Happy to hear this! Are there any specific features you'd like to see in Deco?

merry flume
#

definitely but none are on my mind right now

#

but i do need to see a prototype to give useful feedback

#

either way dis is a biig step for datapacks >:)

rare ferry
#

I'll update here if there's any progress.

rare ferry
#

A small update here:
Added raycast(shooter, block, step, distance, callback)

An example:

@onPlaceBlock("minecraft:black_wool")
func onBlackWool {
    tellraw @a [{"selector":"@s"},{"text":" just placed a black wool."}]
    raycast("@s", "minecraft:black_wool", 0.01, 10, "setblock ~ ~ ~ iron_block")
}

@onPlaceBlock("minecraft:sand")
func onSand {
    tellraw @a [{"selector":"@s"},{"text":" just placed a sand."}]
    raycast("@s", "minecraft:sand", 0.01, 10, "setblock ~ ~ ~ gold_block")
}
#

You can download the latest version of Deco from its GitHub page. Note that Deco can compile using an original datapack as input, so you don’t even need to change the .mcfunction file extensions in the pack. Simply create a new Deco file and start experimenting!

#

For details on how raycast() works, check out the GitHub README.

#

Feel free to try it out and share your feedback!

tepid gale
#

Nice

merry flume
#

dem

balmy dawn
rare ferry
#

Just created a document for Deco, and we have a new version available:
Added event onPlayerDie, carrotOnAStick

docs
changelogs

rare ferry
#

I made a small map for practising bridging for fun within just several minutes, using Deco. The codes are provided below:

functions/test.deco

@load
func init {
    // Limit the player's max health and give him some white wools
    execute as @a run attribute @s minecraft:generic.max_health base set 0.5
    effect give @a minecraft:instant_health 1
    give @a minecraft:white_wool 64
}

@onPlaceBlock("minecraft:white_wool")
func onPlaceBlock {
    // Record the position of blocks placed by player using raycast
    raycast("@s", "minecraft:white_wool", 0.01, 10, "summon minecraft:marker ~ ~ ~")
}

@onPlayerDie
func breakBlock {
    tag @e[type=minecraft:marker,limit=1,sort=random] add removing
    execute at @e[tag=removing] run setblock ~ ~ ~ minecraft:air destroy
    kill @e[tag=removing]
    // Keep running if there are still markers left
    execute if entity @e[type=minecraft:marker] run schedule function deco:breakblock 0.1s
    execute unless entity @e[type=minecraft:marker] run schedule function deco:reinit 0.1s
}

func reinit {
    function deco:init
    kill @e[type=item]
}

Note that the instant respawn is set by /gamerule

toxic frigate
#

This is actually a great concept

#

I've thought about this a lot and there is quite a bit that can be done with this if its treated like a compilation lang

rare ferry
#

I’ve considered adding a "lib" feature to it, allowing interested users to develop libraries that others can use in their Deco programs. However, I’m unsure if there’s enough demand, as it seems hardly anyone is even using Deco to create datapacks. It’s a significant challenge.

rare ferry
#

I think Deco is still offering too little incentive for datapackers, so no one bothers to give it a try.

merry flume
#

i think the best use for it is by starters

#

at least with the current features

rare ferry
#

Yeah, I think it's really challenging to develop it into a mature language that attracts others to develop third-party libraries. It needs to have so many essential features before people will actually want to use it. But developing all those features alone is incredibly difficult. Kind of a catch-22 situation, haha.