jmcfunction


Namejmcfunction JSON
Version 1.2.19 PyPI version JSON
download
home_pageNone
SummaryCompiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack.
upload_time2025-10-18 11:18:47
maintainerNone
docs_urlNone
authorWingedSeal
requires_python>=3.12
licenseMIT License
keywords python minecraft mcfunction datapack compiler
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# JMC · [![license-mit](https://badgen.net/badge/license/MIT/blue/)](https://github.com/WingedSeal/jmc/blob/main/LICENSE) [![release](https://badgen.net/badge/release/v1.2.19/blue/)](https://github.com/WingedSeal/jmc/releases/latest) [![build-passing](https://badgen.net/badge/build/passing/green/)](https://wingedseal.github.io/jmc/#/) [![discord-invite](https://badgen.net/badge/discord/Official-Server/blue/?icon=discord)](https://discord.gg/PNWKpwdzD3)

## (JavaScript-like Minecraft Function)

JMC (JavaScript-like Minecraft Function) is a mcfunction extension language for making Minecraft Datapack.

![JMC-icon](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/jmc_icon192.png?raw=true)

### Code example:

```js
Text.tellraw(@a, "everything outside the function");
say "just goes into the load function";

function myFunc() { // function
    execute as @a at @s run {
        Text.tellraw(@a, "&<green,bold> this text is green and bold");
        say "this is a function executed through execute as @a";
    }
}
function varOperations() {
    // this variable x is equal to the number of items in hand
    $x = data get entity @s SelectedItem.Count;
    $y = 100; // this is the second variable
    $z = @s::SelectedItem.Count; // the same as $x
    $random_int = Math.random($x, $y);
    Text.tellraw(@a, "random number from &<$x> to 100: &<$random_int>");
}
class folder {
    function funcInFolder() {
        if ($x < $y && $random_int <= 50) {
            printf("X is less than Y and random number is less than or equal to 50");
        } else if ($y > $x || $x == 69) {
            printf("X is greater than Y or X is equal to 69 ($x is &<$x>)");
        } else {
            printf("&6other cases"); // "printf" is shortcut for "tellraw @a" but works with custom formatting
        }
    }
}
function folder.raycast() {
    Raycast.simple(
        onHit=()=>{
            printf("i hit some block");
        },
        onStep=()=>{
            particle happy_villager ~ ~ ~;
        }
        interval=0.5,
        maxIter=100,
        stopAtBlock=true,
    );
}
```

**Documentation:** <https://jmc.wingedseal.com>

**Trailer:** <https://www.youtube.com/watch?v=cFgvCScpirw&ab_channel=WingedSeal>

---

## Why use JMC?

- Avoid repetitive tasks
- Superior Syntax
- Low learning curve
- Many more features

JMC allows you to write minecraft functions in a better language (.jmc) which is more readable and easier to write.

## Documentation

Everything you need to know about JMC can be found at <https://jmc.wingedseal.com>

## Installation

- **Executable**

In "datapacks" folder of your world file (Usually `.minecraft/saves/world_name/datapacks`). Create a new datapack folder. And put JMC.exe in that folder then run it.

![Installation](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/installation/file_location.png?raw=true)

- **Python 3.12+**

```bash
pip install jmcfunction --pre
```

_Latest unreleased build:_

```bash
pip install git+https://github.com/WingedSeal/jmc.git#subdirectory=src
```

## Build

### Executable

If you would like to build the executable yourself (on Windows).

1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)
2. Install [GNU compiler](https://gcc.gnu.org)
3. Open command prompt as administrator
4. Go to repository directory using `cd`
5. Run `pip install -r build_requirements.txt`
6. Run `build`

### Python

If you would like to use latest unreleased feature, you can install jmc directly from github repository.

1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)
2. Open a terminal (command prompt as administrator on Windows)
3. Go to repository directory using `cd`
4. Run `cd ./src`
5. Run `pip install setuptools`
6. Run `python setup.py install`

## License

[MIT](https://github.com/WingedSeal/jmc/blob/main/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jmcfunction",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "python, minecraft, mcfunction, datapack, compiler",
    "author": "WingedSeal",
    "author_email": "firm09719@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fa/d2/8b72ec37a34b05e13a11d427d816801d1788a2f41351cb85c108b46c516a/jmcfunction-1.2.19.tar.gz",
    "platform": null,
    "description": "\r\n# JMC &middot; [![license-mit](https://badgen.net/badge/license/MIT/blue/)](https://github.com/WingedSeal/jmc/blob/main/LICENSE) [![release](https://badgen.net/badge/release/v1.2.19/blue/)](https://github.com/WingedSeal/jmc/releases/latest) [![build-passing](https://badgen.net/badge/build/passing/green/)](https://wingedseal.github.io/jmc/#/) [![discord-invite](https://badgen.net/badge/discord/Official-Server/blue/?icon=discord)](https://discord.gg/PNWKpwdzD3)\r\n\r\n## (JavaScript-like Minecraft Function)\r\n\r\nJMC (JavaScript-like Minecraft Function) is a mcfunction extension language for making Minecraft Datapack.\r\n\r\n![JMC-icon](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/jmc_icon192.png?raw=true)\r\n\r\n### Code example:\r\n\r\n```js\r\nText.tellraw(@a, \"everything outside the function\");\r\nsay \"just goes into the load function\";\r\n\r\nfunction myFunc() { // function\r\n    execute as @a at @s run {\r\n        Text.tellraw(@a, \"&<green,bold> this text is green and bold\");\r\n        say \"this is a function executed through execute as @a\";\r\n    }\r\n}\r\nfunction varOperations() {\r\n    // this variable x is equal to the number of items in hand\r\n    $x = data get entity @s SelectedItem.Count;\r\n    $y = 100; // this is the second variable\r\n    $z = @s::SelectedItem.Count; // the same as $x\r\n    $random_int = Math.random($x, $y);\r\n    Text.tellraw(@a, \"random number from &<$x> to 100: &<$random_int>\");\r\n}\r\nclass folder {\r\n    function funcInFolder() {\r\n        if ($x < $y && $random_int <= 50) {\r\n            printf(\"X is less than Y and random number is less than or equal to 50\");\r\n        } else if ($y > $x || $x == 69) {\r\n            printf(\"X is greater than Y or X is equal to 69 ($x is &<$x>)\");\r\n        } else {\r\n            printf(\"&6other cases\"); // \"printf\" is shortcut for \"tellraw @a\" but works with custom formatting\r\n        }\r\n    }\r\n}\r\nfunction folder.raycast() {\r\n    Raycast.simple(\r\n        onHit=()=>{\r\n            printf(\"i hit some block\");\r\n        },\r\n        onStep=()=>{\r\n            particle happy_villager ~ ~ ~;\r\n        }\r\n        interval=0.5,\r\n        maxIter=100,\r\n        stopAtBlock=true,\r\n    );\r\n}\r\n```\r\n\r\n**Documentation:** <https://jmc.wingedseal.com>\r\n\r\n**Trailer:** <https://www.youtube.com/watch?v=cFgvCScpirw&ab_channel=WingedSeal>\r\n\r\n---\r\n\r\n## Why use JMC?\r\n\r\n- Avoid repetitive tasks\r\n- Superior Syntax\r\n- Low learning curve\r\n- Many more features\r\n\r\nJMC allows you to write minecraft functions in a better language (.jmc) which is more readable and easier to write.\r\n\r\n## Documentation\r\n\r\nEverything you need to know about JMC can be found at <https://jmc.wingedseal.com>\r\n\r\n## Installation\r\n\r\n- **Executable**\r\n\r\nIn \"datapacks\" folder of your world file (Usually `.minecraft/saves/world_name/datapacks`). Create a new datapack folder. And put JMC.exe in that folder then run it.\r\n\r\n![Installation](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/installation/file_location.png?raw=true)\r\n\r\n- **Python 3.12+**\r\n\r\n```bash\r\npip install jmcfunction --pre\r\n```\r\n\r\n_Latest unreleased build:_\r\n\r\n```bash\r\npip install git+https://github.com/WingedSeal/jmc.git#subdirectory=src\r\n```\r\n\r\n## Build\r\n\r\n### Executable\r\n\r\nIf you would like to build the executable yourself (on Windows).\r\n\r\n1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)\r\n2. Install [GNU compiler](https://gcc.gnu.org)\r\n3. Open command prompt as administrator\r\n4. Go to repository directory using `cd`\r\n5. Run `pip install -r build_requirements.txt`\r\n6. Run `build`\r\n\r\n### Python\r\n\r\nIf you would like to use latest unreleased feature, you can install jmc directly from github repository.\r\n\r\n1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)\r\n2. Open a terminal (command prompt as administrator on Windows)\r\n3. Go to repository directory using `cd`\r\n4. Run `cd ./src`\r\n5. Run `pip install setuptools`\r\n6. Run `python setup.py install`\r\n\r\n## License\r\n\r\n[MIT](https://github.com/WingedSeal/jmc/blob/main/LICENSE)\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Compiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack.",
    "version": "1.2.19",
    "project_urls": {
        "Documentation": "https://jmc.wingedseal.com/",
        "Repository": "https://github.com/WingedSeal/jmc"
    },
    "split_keywords": [
        "python",
        " minecraft",
        " mcfunction",
        " datapack",
        " compiler"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8081d2d5b2c7a35feb15d7af9b0b345903df2c5511d3545210208e8b65f1c653",
                "md5": "fba7b8469c7c00a7210f01eda85aa30d",
                "sha256": "f5d1c56b47befb31b7585d25676b467b9fbf3c12276fc071cc0a0bfde1a0d142"
            },
            "downloads": -1,
            "filename": "jmcfunction-1.2.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fba7b8469c7c00a7210f01eda85aa30d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 136934,
            "upload_time": "2025-10-18T11:18:45",
            "upload_time_iso_8601": "2025-10-18T11:18:45.504106Z",
            "url": "https://files.pythonhosted.org/packages/80/81/d2d5b2c7a35feb15d7af9b0b345903df2c5511d3545210208e8b65f1c653/jmcfunction-1.2.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fad28b72ec37a34b05e13a11d427d816801d1788a2f41351cb85c108b46c516a",
                "md5": "59edf14aa904aee6fc5b2511cadb660c",
                "sha256": "e80836e41c5453914b60c4dafd028f016734662711af454ab916b3d09558023d"
            },
            "downloads": -1,
            "filename": "jmcfunction-1.2.19.tar.gz",
            "has_sig": false,
            "md5_digest": "59edf14aa904aee6fc5b2511cadb660c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 121654,
            "upload_time": "2025-10-18T11:18:47",
            "upload_time_iso_8601": "2025-10-18T11:18:47.042321Z",
            "url": "https://files.pythonhosted.org/packages/fa/d2/8b72ec37a34b05e13a11d427d816801d1788a2f41351cb85c108b46c516a/jmcfunction-1.2.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-18 11:18:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "WingedSeal",
    "github_project": "jmc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jmcfunction"
}
        
Elapsed time: 1.59209s