Skip to content

Instantly share code, notes, and snippets.

@ryantheleach
Last active December 21, 2015 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryantheleach/811a4bc27ad42a68935b to your computer and use it in GitHub Desktop.
Save ryantheleach/811a4bc27ad42a68935b to your computer and use it in GitHub Desktop.
Types
Traits[]
Data{}
Properties<>
Types
minecraft:leaves //Matches original vanilla leaves.
minecraft:leaves,minecraft:leaves2 //Matches new leaves or old leaves.
minecraft: //matches any vanilla block
buildcraft: // matches any block with buildcraft as the prefix.
Any //Matches any blocktype.
*leaves //matches any block, with leaves in the blockid.
BlockState = BlockType+Trait
minecraft:leaves[check_decay=false,decayable=true,variant=birch] //specific example of a single blockstate.
Traits
[check_decay=false] //Matches only check_decay doesn't care about BlockType.
minecraft:leaves,minecraft:leaves2[variant=oak] // Matches either leave type, as long as it's oak.
minecraft:leaves[variant=oak|birch] //Matches any original leaves, as long as it's oak or birch.
Data.
minecraft:redstone_dust{power=0} //matches redstone that power equals 0.
Properties
minecraft:*<solid=true> //matches any block from vanilla, with the property of being solid.
Logical operands.
minecraft:redstone_dust{power>2} //matches only where power > 2.
minecraft:redstone_dust{power=0|1|2|3|4} //matches if power is 0 or 1 or 2 or 3 or 4.
minecraft:redstone_dust{power=0}|minecraft:redstone_dust{west=up} //matches if power is 0 or west is up
But what about data... it can have sets or lists.. shit.
minecraft:redstone_dust{ConnectedDirections=(north,south,east,west)} //Matches only ConnectedDirections with a Set of (north,south,east,west) no more elements, no less.
ConnectedDirection.any(north,south,east,west)
ConnectedDirection.all(north,south,east,west)
ConnectedDirection.none(up,down)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment