refactor: bundle mcfstd as a datapack (#1)

So it turns out it will be much harder to create namespaced instances of this datapack like we initially thought. It might be worth considering in the future, but we would not be able to use any functions that we add with this library by the library itself, since the namespace change will make all internal function calls point to an undefined target. So we will bundle this as a datapack for now.

Reviewed-on: https://codeberg.org/vlw/mcfstd/pulls/1
Co-authored-by: vlw <victor@vlw.se>
Co-committed-by: vlw <victor@vlw.se>
This commit is contained in:
Victor Westerlund 2026-03-13 20:02:31 +01:00 committed by Victor Westerlund
parent c908e61aa3
commit c4195baf85
29 changed files with 14 additions and 17 deletions

View file

@ -24,26 +24,14 @@ execute unless std:out run return fail
**See the [function reference](#functions) for a full list of available functions**
# Installation
This is not a stand-alone datapack but is instead intended to be placed inside the `data/` directory of your own datapack. Clone this repository into the `data/` directory of your datapack.
Download the datapack as a zip from [the releases page](/vlw/mcfstd/releases) for the version that you require. Place the zip file directly into the `datapacks/` directory of your Minecraft world save directory.
```
git clonne http://codeberg.org/vlw/mcfstd
```
Enable this library in Minecraft by typing the following two commands
```mcfunction
reload
It is highly recommended that you rename the directory that contains this library after you clone it. This will prevent other datapacks that use this library from interfering with yours, and it also prevents your datapacks from interfering with theirs. This is important since other datapacks might use a version of this library that is not compatible with yours.
For example
datapack enable "file/mcfstd-X-X-X.zip" # Where X-X-X would be the version of the datapack
```
data/
mcfstd/
```
would become:
```
data/
std_my_datapack/
```
One that is done, reload your plugins with `/reload` and you should have access to mcfstd functions
# The standard output
This library contains a standard output that is used as an intermediary for arithmetic and comparison operations.

9
pack.mcmeta Normal file
View file

@ -0,0 +1,9 @@
{
"pack": {
"description": {
"translate": "A standard library that adds variables, arithmetic, and relational operators to mcfunction"
},
"min_format": [88, 0],
"max_format": [88, 0]
}
}