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 September 12, 2023 19:53
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 / gist:3736487
Created September 17, 2012 09:49
New Minecraft target selector syntax!

Syntax

All target selectors start with @. The following character is the selector type. For example, @p means 'closest player'.

Target selectors may have additional, optional arguments. You can specify these in [ ], using the syntax a=0. For example, @p[a=0,b=5,c=-500].

There is a special short syntax for just specifying x, y, z and r arguments; simply list their values separated by a comma, without x=. For example: @p[100,64,-100,5] for 5 range, x=100, y=64 and z=-100. Each of these are optional and skippable by leaving them empty. For example, to just specify y coordinate: @p[,64].

Global Arguments:

  • x - X coordinate for search center. Default is senders coordinate, or 0.
  • y - Y coordinate for search center. Default is senders coordinate, or 0.
@Dinnerbone
Dinnerbone / Since 1.2.3
Created March 4, 2012 18:16
Bugs I've fixed since 1.2.3!
Fixed:
- Fixed godmode exploit (Thanks md_5)
- Limit framerate on menu screens, no longer uses 100% cpu and make my computer melt
- Fixed fatal crash for converted worlds to anvil, when there's blocks at max height
- Fixed an old bug with signs clearing text while you're editing them in SMP
- Fixed incorrectly swapped en_GB and en_CA language details
- Fixed crash when logging in while there are blocks at maxheight at spawn
- Fixed TNT ghosts in multiplayer
- Fixed storage minecarts dropping enchanted items
- Fixed crashes on invalid server addresses when joining a server
@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
}
@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",
/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",
package org.bukkit.types.block;
import java.util.HashMap;
import java.util.Map;
/**
* Represents the various types of blocks in a world.
*/
public abstract class BlockType {
public static final BlockType AIR = new BlockTypeWrapper(0);
@Dinnerbone
Dinnerbone / GreetingPlugin.java
Created February 1, 2012 01:59
Might we have made plugins a little too easy? :(
package com.dinnerbone.plugins.greetings;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
public class GreetingPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {