Skip to main content

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 Distribution

radonmc-0.0.4.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

radonmc-0.0.4-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file radonmc-0.0.4.tar.gz.

File metadata

  • Download URL: radonmc-0.0.4.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for radonmc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c9ea212056879c14d915c5129ea1acc0e2a48b40c2c07089510fea18dc430ed6
MD5 bce1cfbc5a6379b64127c05c0e9a3ca7
BLAKE2b-256 fc1018ed7ce956aa2e21a4e0675058af10d526afbfe86980c568753f9f391ee1

See more details on using hashes here.

File details

Details for the file radonmc-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: radonmc-0.0.4-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

Hashes for radonmc-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 baa67b3b58d618a0556aa3b623e849a455e61cfb6a6a198f9d1c2684fa605bca
MD5 5b88ab2fe5a79f69bfad6b7905c400a9
BLAKE2b-256 d072afd58294ef5c5ec15efb959d664c88e3bc04628127cb7ccece488f4b1591

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page