Skip to content

Instantly share code, notes, and snippets.

import os
commands = 0
for root, dirs, files in os.walk("."):
for filename in [f for f in files if f.endswith(".mcfunction")]:
with open(os.path.join(root, filename)) as f:
commands += len([l for l in f.readlines() if l[0].isalpha()])
print(commands)
import os
for dir in os.walk("."):
if not dir[0].startswith(r".\gm4_"):
continue
if not dir[0].endswith(r"\data"):
continue
for namespace in dir[1]:
if namespace in ["load", "minecraft"]:
continue

Minecraft commands benchmarks

Each test ranks a list of possible commands from best (most efficient) to worst (least efficient). Lower percentages are better. You can only compare the percentages between the commands in the same test.

These tests were done in a superflat world with no entities except for the player. The only commands running are the ones from the test.

1 Running commands for every player

1.1 All players

{
"advancement": {
"type": "object",
"properties": {
"display": {
"type": "object",
"optional": true,
"properties": {
"icon": {
"type": "object",
{
"type": "decorated",
"config": {
"decorator": {
"type": "chance",
"config": {
"chance": 48
}
},
"feature": {
// count: CountDecorator
// - UniformInt count (min: -10, max: 128, maxSpread: 128)
return IntStream.range(0, count.sample(random))
.mapToObj((e) -> pos);
// count_noise: CountNoiseDecorator
// - double noise_level
// - int below_noise
// - int above_noise

Multi Noise Configuration

1.16.2-pre2

Table of Contents
firstOctave
amplitudes

firstOctave

"amplitudes": [1,1]

{
"bonus_chest": false,
"dimensions": {
"minecraft:overworld": {
"generator": {
"biome_source": {
"seed": -1464245863,
"large_biomes": false,
"type": "minecraft:vanilla_layered"
},