Skip to main content

A first block

items/ores/ruby_ore.yml
Reload, run /lodeitems give ruby_ore, and place it like any other block. You never choose how the block is shown to players (note blocks, mushroom blocks and so on). LodeItems picks that for you and remembers it, so placed blocks stay the same across reloads and restarts. Custom blocks are real blocks on the server. They cost the same as vanilla blocks to store and to load, so they’re fine for building whole areas and for pasting with WorldEdit.

Mining

number
default:"1.5"
How long it takes to mine, on vanilla’s scale: dirt is 0.5, stone 1.5, iron ore 3, obsidian 50. 0 breaks instantly and -1 makes it unbreakable.
text
default:"pickaxe"
The tool that mines it quickly: pickaxe, axe, shovel, hoe or none. Better tiers and Efficiency mine faster, just like vanilla. It only changes speed, not whether the block drops (see Drops).

Drops

A custom block always drops one of itself, the same item that places it, whatever it is broken with: by hand, with any tool, with an explosion or by a piston. There is nothing to set. Players in creative mode get no drops, like vanilla.
Blocks don’t have a drops: option yet. You can’t make a block drop other items (an ore dropping gems), need the right tool to drop, react to Silk Touch or Fortune, or give experience. To give extra items now, use a break event with a give action. Props already have a full drops: option.

World generation

generate: makes a block appear in veins in newly generated chunks, like vanilla ores. The veins are placed by vanilla’s own ore code, so they’re shaped exactly like iron or coal veins.
items/ores/ruby_ore.yml
Only new chunks get veins. Chunks that were already generated are left as they are, so explore new land or start a new world to find the ore.
range
default:"-64..64"
The lowest and highest Y a vein can start at, like -64..16 (-64 to 16 works too). Veins are spread evenly across the range. The default is 10..117 in the nether and 0..128 in the end. Parts of the range outside the world are ignored.
number
default:"4"
How many veins each chunk tries to place, from 0 to 256. Fractions work: 0.5 is a vein in about every other chunk, 2.3 is 2 per chunk plus a third one 30% of the time. For comparison, vanilla iron is around 10 and diamonds around 7 below Y 16.
number
default:"8"
How many blocks a vein tries to place, from 1 to 64. Vanilla coal is 17, iron 9, diamond 4 to 12. Only blocks it can replace (see replace) become ore, so real veins are often smaller.
block id
Another LodeItems block to use where the vein runs through deepslate and tuff, like vanilla’s deepslate ores. Without it, the block itself is used there too. Overworld only.
list
The blocks a vein may replace, by id or #tag:
Without it, a vein replaces what vanilla ores replace: stone, granite, diorite, andesite, deepslate and tuff in the overworld, netherrack, basalt and blackstone in the nether, and end stone in the end. If you set replace, deepslate is only replaced when deepslate: is given too.
text
default:"overworld"
overworld, nether or end. Each rule generates in worlds of that kind only.
list
Only these worlds, by name: worlds: [world, mining]. Without it, every world of the right dimension, including ones loaded later.
list
Only in these biomes, by id or #tag: biomes: [desert, "#minecraft:is_badlands"]. The biome is checked where each vein starts.
0 to 1
default:"0"
The chance to skip each block that would touch air, so less ore shows in cave walls. Vanilla diamonds use 0.5, ancient debris 1.

Several rules

Give a list to generate a block in more than one way, for example common small veins high up and rare big ones deep down, or once in the overworld and once in the nether:

Good to know

  • Generated ore is a normal custom block. It costs the same as stone to store, and it drops and mines like a placed one.
  • Changes to generate: apply on /lodeitems reload, but only to chunks generated after that.
  • A mistake in one rule (an unknown biome, a deepslate: that isn’t a LodeItems block) skips that rule and says why. The block itself still loads.

Looks

Use one of these:

Rotation

text
  • axis: turns like a log, along the axis of the face you clicked.
  • horizontal: the front faces the player, like a furnace.
  • facing: like horizontal, but it can also face up or down when you look steeply up or down, like an observer.

See-through and walk-through blocks

Blocks you walk through always break instantly, so they can’t have a hardness.

Connected textures

Blocks of the same kind next to each other can join up, so a wall of glass looks like one big window and a floor of tiles like one surface.
items/blocks/glass/framed_glass.yml
You only draw two textures, whichever mode you use: Both must be PNGs of the same size. LodeItems works out how wide the border is and makes every tile itself: the border stays on each edge that doesn’t touch the same block. One pair covers all six faces.
text
Which neighbours it joins. Each combination of neighbours is its own look, so the modes cost differently:
Looks are limited (see How many blocks). Solid blocks have plenty, but there are only 143 see-through looks, so at most 2 see-through blocks can use connect: all. The Framed Glass that comes with LodeItems is one of them. Use vertical or horizontal where they’re enough.
  • Faces between two joined blocks aren’t drawn, so connected glass shows no inner edges.
  • Corners where two joined edges meet stay seamless. Proper inner-corner notches would need the diagonal neighbours too, which is far too many looks.
  • A connected block uses one texture pair for every face, and can’t also use rotation, textures: or model:.
LodeItems comes with two connected blocks in items/blocks/: Lodestone Tiles (solid) and Framed Glass (see-through).

Other options

0 to 15
Light level the block gives off.
text or section
A vanilla sound family for everything: sounds: metal (also stone, wood, glass, wool…). Or set single sounds:
list
Vanilla block tags it belongs to, so the game treats it like those blocks. For example [beacon_base_blocks] lets it build beacon pyramids, and [dragon_immune, wither_immune] keeps those bosses from breaking it. Mining speed comes from tool, not from tags.
block id
Right-clicking with an axe turns it into this other custom block, keeping its direction. Like stripping logs.
Blocks also take every item option (lore, enchantments, events…) for the item that places them, and events like place, break and interact.

Stairs, slabs, trapdoors and doors

shape: makes a block that works exactly like that vanilla kind: stairs connect, slabs stack into double slabs, doors and trapdoors open by hand and with redstone.
Doors and trapdoors can have holes in their texture but no half-transparent pixels. Stairs and slabs are always drawn solid. Shaped blocks can’t have model, rotation or light.
Shaped blocks have a hard limit, because each design has to borrow a whole set of vanilla states: 3 stairs, 3 slabs, 24 trapdoors and 25 doors. Past that, loading tells you the shape is full.

How many blocks

Each direction of a rotating block uses its own slot and look: an axis block uses 3, a horizontal one 4 and a facing one 6.
  • Looks are how many different-looking blocks the game can show. That is a limit of Minecraft itself.
  • Slots are reserved when the server starts. New blocks need no restart as long as slots are free. Changing the number needs a restart.
Never lower a slot count below what you use. Placed blocks in the slots you remove would disappear.
A block keeps the kind it was first given. Changing a placed block from solid to transparent gives a warning and has no effect, because placed blocks can’t move to another pool.

Deleting a block

When you delete a block’s config, its placed copies stay in the world and show as stone. Its slot stays reserved, so if you add the config back, they come back as they were. The assignments are saved in cache/blocks.json and cache/shaped_blocks.json. Keep those files.