Radon is a programming language that gets compiled to Minecraft: Java Edition's mcfunction files.
Project description
Radon
Radon is a programming language that gets compiled to Minecraft: Java Edition's mcfunction files.
Usage
First install the package using:
pip install radon-cli
Now run radon
while being inside your datapack's folder and that's it!
Syntax
a = 10
a += 10
a -= 10
a *= 10
a /= 10
a++
a--
// To run commands just type them:
say hi
// Multi line commands are available, you can break the new line character with backslash:
execute \
as @a \
at @s \
run say hi
define int b // If you don't want to initialize a variable, you can use this
a += c - (b * 10) / (b + 7) // Supports mathematical expressions
a = 10.5
a += 5.23
a:@s = 10 // sets it for @s
a:@s // gets it from @s
function my_func(float x, float y, float z): float {
tp @a $(x) $(y) $(z)
return x + y + z
}
my_func(1, 2, 3)
function tick {
// This will run every tick
}
as @p at @s {
}
if (a == 1) {
} else if (a == 2) {
} else {
}
unless (a == 1) { // This is a shortcut for: if (a == 1) {} else { say hi }
say hi
}
schedule 1t {
}
loop {
}
for (i = 0; i < 10; i++) {
}
while (a == 1) {
}
until (a == 1) {
}
do {
} while (a == 1)
do {
} until (a == 1)
loop 1t {
}
for 1t (i = 0; i < 10; i++) {
}
while 1t (a == 1) {
}
until 1t (a == 1) {
}
do {
} while 1t (a == 1)
do {
} until 1t (a == 1)
// break and continue can be used in any loop like this:
loop {
if (a == 1) break // Exits the loop
if (a == 2) continue // Stops the loop and restarts from the first line of the loop
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
radonmc-0.0.3-py3-none-any.whl
(27.3 kB
view details)
File details
Details for the file radonmc-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: radonmc-0.0.3-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc478ee3fa773888ebbf43c1f5bce96378c3140a3032e31d8c74c15191d2104c |
|
MD5 | ac45f8bf494dd00f2502a2026c89c1f7 |
|
BLAKE2b-256 | e93022f1ebc27a031844d0e9f1252bb222b4236f9a7f90731680c2eaf98fc52f |