Skip to content

Instantly share code, notes, and snippets.

@intsuc
intsuc / init.mcfunction
Created January 3, 2024 20:16
Approximate rigid motion by 2 approximate reflections
summon text_display ~ ~ ~ {text: '{"text": "a", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 10]}
summon text_display ~ ~ ~ {text: '{"text": "b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 11]}
summon text_display ~ ~ ~ {text: '{"text": "c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 12]}
summon text_display ~ ~ ~ {text: '{"text": "(b⋅a)b", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 0]}
summon text_display ~ ~ ~ {text: '{"text": "bab", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 1]}
summon text_display ~ ~ ~ {text: '{"text": "(c⋅bab)c", "color": "black"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 2]}
summon text_display ~ ~ ~ {text: '{"text": "c(bab)c", "color": "red"}', background: 0, billboard: "center", UUID: [I; 0, 0, 0, 3]}
@intsuc
intsuc / baseline.mcfunction
Last active May 21, 2023 08:05
1.20-pre1 vs 1.20-pre2
We couldn’t find that file to show.

1.20-pre1 vs 1.20-pre2

benchmark 1.20-pre1 1.20-pre2
baseline 263.479460184556 ± 55.44590623221055 [ns/op] 262.6772200457718 ± 55.05785493224197 [ns/op]
data_get_byte 433.98316762350913 ± 7.444825260824145 [ns/op] 391.87628185594724 ± 18.936628742014072 [ns/op]
data_get_byte_1 740.4393732769925 ± 20.93953249166631 [ns/op] 456.17101920010447 ± 8.630503299692144 [ns/op]
data_get_int 412.08435852317024 ± 4.056129450233465 [ns/op] 374.34500487014526 ± 2.435684193080521 [ns/op]
data_get_int_1 737.7503310023358 ± 13.85836437954026 [ns/op] 423.18244626398047 ± 1.329924149473285 [ns/op]
data_get_list_0 406.8077717359254 ± 13.273700931499596 [ns/op] 380.8705782109833 ± 18.39461975718555 [ns/op]
data remove storage _ _
data modify storage _ _[] set value 0
data remove storage _ a
data remove storage _ b
function ite
@intsuc
intsuc / .md
Created February 21, 2023 12:01

Benchmarks

  • mch/tags/functions/setup
{
  "values": [
    "setup"
  ]
}
@intsuc
intsuc / .md
Last active February 17, 2023 10:03

Benchmarks

  • mch/tags/functions/setup.trial
{
  "values": [
    "setup.trial"
  ]
}
@intsuc
intsuc / .md
Created February 14, 2023 15:11

Benchmarks

  • mch/tags/functions/setup.trial
{
  "values": [
    "setup.trial"
  ]
}
  • mch/tags/functions/teardown.trial
@intsuc
intsuc / .md
Created February 9, 2023 14:07

Benchmarks

  • summon-1.mcfunction
summon marker
kill @e
  • execute-1.mcfunction
execute summon marker run kill @e
@intsuc
intsuc / .snbt
Created January 15, 2023 12:38
Minimal structure file to embed arbitrary data
{
DataVersion: 3218,
size: [1, 1, 1],
blocks: [],
palette: [],
entities: [
{
nbt: {
id: "marker",
data: {