A first block
items/ores/ruby_ore.yml
/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.
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
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 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
#tag: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.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:- One texture
- Per face
- Model
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: likehorizontal, but it can also face up or down when you look steeply up or down, like an observer.
See-through and walk-through blocks
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
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:
- 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:ormodel:.
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.
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.
model, rotation or light.
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.
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 incache/blocks.json and cache/shaped_blocks.json. Keep those files.