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 radonmc
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 Distribution
radonmc-0.0.5.tar.gz
(25.3 kB
view details)
Built Distribution
radonmc-0.0.5-py3-none-any.whl
(27.3 kB
view details)
File details
Details for the file radonmc-0.0.5.tar.gz
.
File metadata
- Download URL: radonmc-0.0.5.tar.gz
- Upload date:
- Size: 25.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b74bd18b5f991657ece7e3b38cfb5a3f4fea33369aa7105bcf065010c1c2bcb |
|
MD5 | e8ec7408ae69bf829bfaebfdd99239ed |
|
BLAKE2b-256 | 691396bb6dcad341f9b5daee81cec211a07a153955c752bc178d97d2b8bee1bc |
File details
Details for the file radonmc-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: radonmc-0.0.5-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 | 667c638e7006f74595cf04d29d29ad638fedf1277611b0f77724808994e7ec26 |
|
MD5 | c09001ee1b6b5e78152521d7205ca525 |
|
BLAKE2b-256 | cc789a9dbdf1f84b00c9012ec20be7b96de2c805d902a33c7594b6cadbed8bbf |