JMC ·

(JavaScript-like Minecraft Function)
JMC (JavaScript-like Minecraft Function) is a mcfunction extension language for making Minecraft Datapack.
Code example:
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.
- Python 3.12+
pip install jmcfunction --pre
Latest unreleased build:
pip install git+https://github.com/WingedSeal/jmc.git#subdirectory=src
Build
Executable
If you would like to build the executable yourself (on Windows).
- Install Python 3.10
- Install GNU compiler
- Open command prompt as administrator
- Go to repository directory using
cd - Run
pip install -r build_requirements.txt - Run
build
Python
If you would like to use latest unreleased feature, you can install jmc directly from github repository.
- Install Python 3.10
- Open a terminal (command prompt as administrator on Windows)
- Go to repository directory using
cd - Run
cd ./src - Run
pip install setuptools - Run
python setup.py install
License
Metadata
Release files for jmcfunction 1.2.19
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jmcfunction-1.2.19.tar.gz | 121.7 kB | Without provenance | Details for jmcfunction-1.2.19.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jmcfunction-1.2.19-py3-none-any.whl | Python 3 | none | any | Details for jmcfunction-1.2.19-py3-none-any.whl |
Total release size: 258.6 kB
Release files / jmcfunction-1.2.19.tar.gz
| Download URL | jmcfunction-1.2.19.tar.gz |
|---|---|
| Size | 121.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e80836e41c5453914b60c4dafd028f016734662711af454ab916b3d09558023d
|
|
BLAKE2b-256 checksum How to use checksums |
fad28b72ec37a34b05e13a11d427d816801d1788a2f41351cb85c108b46c516a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / jmcfunction-1.2.19-py3-none-any.whl
| Download URL | jmcfunction-1.2.19-py3-none-any.whl |
|---|---|
| Size | 136.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f5d1c56b47befb31b7585d25676b467b9fbf3c12276fc071cc0a0bfde1a0d142
|
|
BLAKE2b-256 checksum How to use checksums |
8081d2d5b2c7a35feb15d7af9b0b345903df2c5511d3545210208e8b65f1c653
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for jmcfunction 1.2.19
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.