A powerful compiler for Minecraft functions.
With 1.13 on its way, a version where pretty much every command has changed, I thought it would make a good opportunity to redesign some features of Minefunk, and perhaps make better use of some of the upcoming features with the new execute command. A complete rewrite is on its way.
namespace my_mod {
void install() {
std::print("Installing a test mod");
std::echo(false);
std::removeCommandChainLimit();
std::print("Installed a test mod");
}
void tick() {
killAllInRange("creeper");
keepAllAtOneDiamond();
}
const int RANGE_TO_KILL = 20;
inline void killAllInRange(const string mobType) {
$execute @a ~ ~ ~ kill @e[type=%mobType%,r=%RANGE_TO_KILL%]
}
void keepAllAtOneDiamond() {
$clear @a diamond
$give @a diamond
}
}
tellraw @a Installing a test mod
gamerule commandBlockOutput false
gamerule logAdminCommands false
gamerule maxCommandChainLength 2147483647
tellraw @a Installed a test mod
execute @a ~ ~ ~ kill @e[type=creeper,r=20]
function my_mod:keepAllAtOneDiamond
clear @a diamond
give @a diamond
Downloads can be found at the bintray page. More detailed download instructions can be found on the wiki page.
The Minefunk compiler is meant for use on the command line. Again, details are to be found on the wiki