Skip to content

Instantly share code, notes, and snippets.

A "node" is an element that looks like this:

{
    "type": "root|literal|argument",
    "parser": "", // only applicable if type is argument
    "properties": {}, // only applicable if type is argument, defaults to empty object
    "executable": true, // default if not specified is false, meaning it isn't a runnable command by itself
    "children": {}, // default if not specified is {}, meaning no children
    "redirect": [] // default if not specified is null, meaning no redirect
}
@Dinnerbone
Dinnerbone / minecraft_commands.txt
Last active August 29, 2024 17:22
Minecraft Java Edition 1.13 changes
advancement grant <targets> everything
advancement grant <targets> from <advancement>
advancement grant <targets> only <advancement>
advancement grant <targets> only <advancement> <criterion>
advancement grant <targets> through <advancement>
advancement grant <targets> until <advancement>
advancement revoke <targets> everything
advancement revoke <targets> from <advancement>
advancement revoke <targets> only <advancement>
advancement revoke <targets> only <advancement> <criterion>
@Dinnerbone
Dinnerbone / guess_for_app.py
Last active September 6, 2017 06:54
Save all files (app list credit to xPaw). Run the solver with: `python guess_for_password.py xpaws_app_list.txt PASSWORD_TO_TRY` or `python guess_for_app.py APP_ID list_of_passwords_in_a_file.txt`
from twisted.internet import reactor, defer, threads
from twisted.logger import Logger, textFileLogObserver, globalLogPublisher
import time, sys, requests, random
log = Logger()
reactor.suggestThreadPoolSize(20)
def try_password(password, app, real):
try:
r = requests.get(
{
"rolls": {
"min": 2,
"max": 6
},
"items": [
{
"item": "minecraft:diamond",
"weight": 5,
"functions": [
@Dinnerbone
Dinnerbone / spawn_bonus_chest.json
Created October 19, 2015 16:59
This is an example of the current spawn bonus chest loot table in Minecraft, in the (possibly) new loot table data format.
[
{
"item": "minecraft:stick",
"weight": 10,
"functions": [
{
"function": "minecraft:set_count",
"min": 1,
"max": 3
}

Keybase proof

I hereby claim:

  • I am Dinnerbone on github.
  • I am dinnerbone (https://keybase.io/dinnerbone) on keybase.
  • I have a public key whose fingerprint is 7FB0 57F8 7FA7 9A66 E8F3 A8DF 667C 41E9 8BC6 478A

To claim this, I am signing this object:

public class Foo {
public static void main(String[] args) {
String x = "This is weird: \u0022\u003B\u0069\u006E\u0074\u0020\u0079\u003D\u0031\u002F\u0030\u003B\u0078\u003D\u0022???";
System.out.println("x = " + x);
}
}
/sayraw {"text":"Want to reset the current minigame? ", "extra": [{"text":"Click here!", "clickEvent":{"action":"run_command", "value":"/scoreboard players set minigame_resetting 1"}}]}
{
"text": "Want to reset the current minigame? ",
"extra": [
{
"text": "Click here!",
"clickEvent": {
"action": "run_command",
@Dinnerbone
Dinnerbone / gist:5662824
Created May 28, 2013 13:38
As an essential step towards the Minecraft modding API, and also for sanity's sake in our own code, we're removing Texture Packs and replacing them with a new Resource Pack system. Ultimately, every mod/plugin will be its own resource pack, vanilla will be a resource pack by itself, and users will be able to apply multiple resource packs at once…
{
"//comment": "All metainfo files will be ORIGINAL_FILE.mcmeta. For example, textures/blocks/portal.png.mcmeta. The format is, of course, JSON.",
"animation": {
"//comment": "This block will be required for animated textures. It can be an empty block, but it will be needed to detect an animation.",
"frames": [
1,
{"index": 2, "time": 4},
3,
4
],
@Dinnerbone
Dinnerbone / gist:5631634
Last active May 14, 2020 12:41
New chat system for Minecraft. The server won't translate any text for the client, and there'll be a proper stack based colouring/formatting system, so no more leaking colours, english-only messages, or out of date translations.
{
"color": "yellow",
"translate": "multiplayer.player.joined",
"using": [
"Dinnerbone"
]
}
{
"color": "gray",