Skip to main content

The Block Lookup System

What is the Block Lookup System?

The block lookup system is how blocks are loaded from configs. It's designed to be extremely flexible and intuitive, allowing you to use custom blocks, block states, modifiers, etc. wherever you want, without having to worry about what plugin they're from.

Anywhere you need to use blocks, you can use this system. To look up a block, you need a key, and optional modifiers.

Keys Explained

In each string is the key for a block. A key looks one of a few ways

  • A vanilla minecraft material ID: (e.g. stone)
  • A block from an external plugin: (e.g. nexo:ruby_ore), See External Integrations for more info
  • A block tag: (e.g. #logs or #wool)

Extra syntax

  • ? between two blocks means 'try to use the first block, but if it doesn't exist, use the second block'. You can chain these together.
  • || groups two blocks, allowing either one of them to be used. You can chain these together.

Vanilla Materials

By default, a vanilla material (e.g. oak_log) will not accept custom blocks with the same material. For example, if you have a Nexo block with oak_log as its base material, then that block will not be recognised as an oak_log.

If you want custom blocks to be accepted, place a * at the start, so "oak_log" becomes "*oak_log".

Block Tags

Block tags are groups of blocks. A list of vanilla tags can be found here, and you can use them with #tag, e.g. #logs. These are especially useful in filters and conditions where you may use the same lists of blocks in different places.

You can create your own tags in tags.yml too, use #libreforge:<tag_id> to reference these.

Using blocks from third-party plugins

PluginBlock Lookup Key
CraftEnginecraftengine:<id>
ItemsAdderitemsadder:<id>
Nexonexo:<id>
Oraxenoraxen:<id>

Modifiers

Blocks can have modifiers applied to them to match or set specific block states. Add modifiers after the block key, separated by spaces.

The same modifier name can sometimes mean different things depending on the block, such as face, shape, and mode.

Orientation and placement

ModifierApplies toAllowed values / notesExample
direction:<face>Directional blocks such as furnaces and dispensersnorth, south, east, west, up, downfurnace direction:north
axis:<axis>Orientable blocks such as logs and pillarsx, y, zoak_log axis:x
bisected:<half>Tall blocks such as doors and tall grasstop, bottomtall_grass bisected:top
slab:<type>Slabstop, bottom, doubleoak_slab slab:top
hinge:<side>Doorsleft, rightoak_door hinge:left
rotation:<face>Rotatable blocks such as signs and skullsBlock face valueoak_sign rotation:south
face:<face>Multi-facing blocks such as vines and mushroom blocksnorth, south, east, west, up, down; can be chained multiple timesvine face:north face:east
face:<type>Face-attached blocks such as buttons and leversfloor, wall, ceilinglever face:ceiling
shape:<type>Stairsstraight, inner_left, inner_right, outer_left, outer_rightoak_stairs shape:inner_left
shape:<type>RailsValues such as north_south, east_west, ascending_northrail shape:north_south
type:<type>Chestssingle, left, rightchest type:left
vertical_direction:<type>Pointed dripstoneup, downpointed_dripstone vertical_direction:down

Toggle states

ModifierApplies toAllowed values / notesExample
waterloggedWaterloggable blocksMakes the block waterloggedoak_slab waterlogged
litLightable blocks such as furnaces, candles, and campfiresSets the block as litcampfire lit
poweredPowerable blocks such as buttons and pressure platesSets the block as poweredstone_button powered
openOpenable blocks such as doors, trapdoors, and fence gatesSets the block as openoak_door open
eyeEnd portal framesAdds an eye of enderend_portal_frame eye
hangingHangable blocks such as lanternsSets the block as hanginglantern hanging
snowySnowable blocks such as grass blocksSets the block as snowygrass_block snowy
in_wallFence gatesMarks the gate as being in a walloak_fence_gate in_wall
dragBubble columnsEnables drag modebubble_column drag
berriesCave vinesAdds berriescave_vines_plant berries
unstableTNTSets TNT as unstabletnt unstable

Numeric values and counts

ModifierApplies toAllowed values / notesExample
age:<value>Ageable blocks such as crops and saplings0 to the maximum agewheat age:7
level:<value>Levelled blocks such as water, cauldrons, and compostersBlock-specific level valuewater level:3
layers:<count>SnowNumber of snow layerssnow layers:4
quantity:<count>Candles, sea pickles, and turtle eggsNumber of items in the blockcandle quantity:3
bites:<count>Cakes0-6cake bites:3
power:<level>Analogue-powerable blocks such as daylight detectors and sculk sensors0-15daylight_detector power:10
delay:<ticks>Repeaters1-4repeater delay:3
charges:<count>Respawn anchors0-4respawn_anchor charges:3
moisture:<level>Farmland0-7farmland moisture:7
distance:<value>ScaffoldingScaffolding distance valuescaffolding distance:3

Block-specific variants

ModifierApplies toAllowed values / notesExample
leaves:<type>Bamboonone, small, largebamboo leaves:large
mode:<type>Comparatorscompare, subtractcomparator mode:subtract
instrument:<type>Note blocksValues such as harp, basedrum, snare, sticksnote_block instrument:harp
mode:<type>Structure blockssave, load, corner, datastructure_block mode:save

Examples

Here are some practical examples combining keys and modifiers:

  • oak_stairs direction:north shape:straight waterlogged — north-facing straight oak stairs, waterlogged
  • oak_door direction:east hinge:left open bisected:bottom — open oak door, east-facing, left hinge, bottom half
  • wheat age:7 — fully grown wheat
  • oak_log axis:x — sideways oak log
  • oak_slab slab:double waterlogged — double oak slab, waterlogged
  • nexo:ruby_ore — a custom Nexo block
  • candle lit quantity:4 — four lit candles
  • vine face:north face:west — vine attached to north and west faces