jmcfunction


Namejmcfunction JSON
Version 1.2.17 PyPI version JSON
download
home_pageNone
SummaryCompiler for JMC (JavaScript-like Minecraft Function), a mcfunction extension language for making Minecraft Datapack.
upload_time2024-03-22 06:49:44
maintainerNone
docs_urlNone
authorWingedSeal
requires_python>=3.10
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.17/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
    $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");
        } else {
            printf("other cases"); // "printf" is shortcut for "tellraw @a"
        }
    }
}
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.10+**

```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.10",
    "maintainer_email": null,
    "keywords": "python, minecraft, mcfunction, datapack, compiler",
    "author": "WingedSeal",
    "author_email": "firm09719@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/00/e2/5c9328ea1ed20f899721cab8d82daea763165e740246b6c3b2b55d19513a/jmcfunction-1.2.17.tar.gz",
    "platform": null,
    "description": "\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.17/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)\n\n## (JavaScript-like Minecraft Function)\n\nJMC (JavaScript-like Minecraft Function) is a mcfunction extension language for making Minecraft Datapack.\n\n![JMC-icon](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/jmc_icon192.png?raw=true)\n\n### Code example:\n\n```js\nText.tellraw(@a, \"everything outside the function\");\nsay \"just goes into the load function\";\n\nfunction myFunc() { // function\n    execute as @a at @s run {\n        Text.tellraw(@a, \"&<green,bold> this text is green and bold\");\n        say \"this is a function executed through execute as @a\";\n    }\n}\nfunction varOperations() {\n    // this variable x is equal to the number of items in hand ;\n    $x = data get entity @s SelectedItem.Count;\n    $y = 100; // this is the second variable\n    $random_int = Math.random($x, $y);\n    Text.tellraw(@a, \"random number from &<$x> to 100: &<$random_int>\");\n}\nclass folder {\n    function funcInFolder() {\n        if ($x < $y && $random_int <= 50) {\n            printf(\"X is less than Y and random number is less than or equal to 50\");\n        } else if ($y > $x || $x == 69) {\n            printf(\"X is greater than Y or X is equal to 69\");\n        } else {\n            printf(\"other cases\"); // \"printf\" is shortcut for \"tellraw @a\"\n        }\n    }\n}\nfunction folder.raycast() {\n    Raycast.simple(\n        onHit=()=>{\n            printf(\"i hit some block\");\n        },\n        onStep=()=>{\n            particle happy_villager ~ ~ ~;\n        }\n        interval=0.5,\n        maxIter=100,\n        stopAtBlock=true,\n    );\n}\n```\n\n**Documentation:** <https://jmc.wingedseal.com>\n\n**Trailer:** <https://www.youtube.com/watch?v=cFgvCScpirw&ab_channel=WingedSeal>\n\n---\n\n## Why use JMC?\n\n-   Avoid repetitive tasks\n-   Superior Syntax\n-   Low learning curve\n-   Many more features\n\nJMC allows you to write minecraft functions in a better language (.jmc) which is more readable and easier to write.\n\n## Documentation\n\nEverything you need to know about JMC can be found at <https://jmc.wingedseal.com>\n\n## Installation\n\n-   **Executable**\n\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.\n\n![Installation](https://github.com/WingedSeal/jmc/blob/webpage/src/assets/image/installation/file_location.png?raw=true)\n\n-   **Python 3.10+**\n\n```bash\npip install jmcfunction --pre\n```\n\n*Latest unreleased build:*\n\n```bash\npip install git+https://github.com/WingedSeal/jmc.git#subdirectory=src\n```\n\n## Build\n\n### Executable\n\nIf you would like to build the executable yourself (on Windows).\n\n1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)\n2. Install [GNU compiler](https://gcc.gnu.org)\n3. Open command prompt as administrator\n4. Go to repository directory using `cd`\n5. Run `pip install -r build_requirements.txt`\n6. Run `build`\n\n### Python\n\nIf you would like to use latest unreleased feature, you can install jmc directly from github repository.\n\n1. Install [Python 3.10](https://www.python.org/downloads/release/python-3108/)\n2. Open a terminal (command prompt as administrator on Windows)\n3. Go to repository directory using `cd`\n4. Run `cd ./src`\n5. Run `pip install setuptools`\n6. Run `python setup.py install`\n\n## License\n\n[MIT](https://github.com/WingedSeal/jmc/blob/main/LICENSE)\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.17",
    "project_urls": {
        "Documentation": "https://jmc.wingedseal.com/",
        "Repository": "https://github.com/WingedSeal/jmc"
    },
    "split_keywords": [
        "python",
        " minecraft",
        " mcfunction",
        " datapack",
        " compiler"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb3205bbe72256ba341e49e841137bd1772e8450e3b605721c17deae9f34b2da",
                "md5": "02ef0d67d097cf54041012041ca8bab1",
                "sha256": "72dc9e67a3315eef4dc9d2a3d5e36130ef92697f361be7f04ff16d082f3123c4"
            },
            "downloads": -1,
            "filename": "jmcfunction-1.2.17-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "02ef0d67d097cf54041012041ca8bab1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 117075,
            "upload_time": "2024-03-22T06:49:41",
            "upload_time_iso_8601": "2024-03-22T06:49:41.531030Z",
            "url": "https://files.pythonhosted.org/packages/fb/32/05bbe72256ba341e49e841137bd1772e8450e3b605721c17deae9f34b2da/jmcfunction-1.2.17-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00e25c9328ea1ed20f899721cab8d82daea763165e740246b6c3b2b55d19513a",
                "md5": "a5b19477f4d670ba2ff3b3ae732163b8",
                "sha256": "5f0679ef8fa8d600afe9f686ed5da09f086477822e4fcff0907a015f5132eac7"
            },
            "downloads": -1,
            "filename": "jmcfunction-1.2.17.tar.gz",
            "has_sig": false,
            "md5_digest": "a5b19477f4d670ba2ff3b3ae732163b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 101706,
            "upload_time": "2024-03-22T06:49:44",
            "upload_time_iso_8601": "2024-03-22T06:49:44.348379Z",
            "url": "https://files.pythonhosted.org/packages/00/e2/5c9328ea1ed20f899721cab8d82daea763165e740246b6c3b2b55d19513a/jmcfunction-1.2.17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-22 06:49:44",
    "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: 0.21706s