Skip to content

Instantly share code, notes, and snippets.

ambient.cave
ambient.underwater.loop
ambient.underwater.loop.additions
ambient.underwater.loop.additions.rare
ambient.underwater.loop.additions.ultrarare
ambient.underwater.enter
ambient.underwater.exit
block.anvil.break
block.anvil.destroy
block.anvil.fall
{
"tag": "LootTableSeed",
"type": "long",
"optional": true,
"summary": "Seed to generate the loot table.",
"details": [
"A set seed that can be used to produce consistent results from the given "
{ "text": "loot table", "reference": "Entity.LootTable" },
", if any. The same seed will result in the same loot, every time."
],

Direct

Source Flags
anvil
cactus
cramming bypasses_armor
dragonBreath bypasses_armor
drown bypasses_armor
fall bypasses_armor
fallingBlock

Minecraft command generation

This is a proposition on using Python to dynamically generate commands, which is useful for things like function trees, repetitive code, and/or any large-scale projects.

Preface

Most of the code blocks presented are just snippets that don't do anything useful on their own. The idea is that the commented line is the command you'd expect to see by printing the object that follows.

Here's a classic example:

# say hi
commands.say(message='hi')
{
HurtByTimestamp: 0,
Tame: 0b,
Attributes: [{
Base: 17.0 d,
Name: "generic.maxHealth"
}, {
Base: 0.0 d,
Name: "generic.knockbackResistance"
}, {
{
Items: [{
Slot: 0b,
id: "minecraft:gunpowder",
Count: 6 b
}, {
Slot: 4 b,
id: "minecraft:bucket",
Count: 1 b
}, {
import json
import math
import sys
import os
infile = os.path.abspath(sys.argv[1])
outdir = os.path.abspath(sys.argv[2] if len(sys.argv) > 2 else '.')
factor = int(sys.argv[3]) if len(sys.argv) > 3 else 2
bundle exec bin/github-linguist language-mcfunction/ --breakdown
88.58% mcfunction
11.42% TypeScript
TypeScript:
build/build.ts
mcfunction:
tests/block_predicate.mcfunction
tests/coordinate.mcfunction
@Arcensoth
Arcensoth / README.md
Last active April 8, 2019 17:29
vscode

VSCode preferences

Extensions

General

  • Gruvbox Themes: tomphilbin.gruvbox-themes
  • File Utils: sleistner.vscode-fileutils
  • Todo Tree: gruntfuggly.todo-tree

Web dev

  • Debugger for Chrome: msjsdiag.debugger-for-chrome
  • Prettier - Code formatter: esbenp.prettier-vscode
{
"achievement": {
"usage": "<give|take> <name|*> [player]"
},
"advancement": {
"see": [
"http://minecraft.gamepedia.com/Commands#advancement",
"http://minecraft.gamepedia.com/Advancements"
],
"usage": [