Skip to main content

How to make a block

Blocks are fundamental elements for most mods. This page describes how you can add custom blocks to your mod.

Pink Glass

General properties

PropertyDescription
In game nameThis is what will be displayed in the game for this block's name.
MaterialThe material for this block. Materials help classify blocks.
SoundThe sound to be used for this block. Affects things like the noise the block makes when walked on.
HardnessThe hardness of a block determines how long it will take to break.
Explosion ResistanceHow resistant the block is to explosions.
Jump FactorA higher jump factor means that players can jump higher when standing on this block.
FrictionA measure of the block's friction.
Speed FactorHow much the player's speed is multiplied when moving on this block.

Textures and Model

Texture and model determine how your block will look in the game. Textures are the images that will be displayed on blocks. A block model determines how the texture(s) will be mapped onto the block. The simplest model displays the same texture on all six sides of a cubic block.

Loot

A loot table is used to determine what will drop when your block is broken. Any loot table element that has been added to your mod can be selected here and associated with the block.

Events (blueprints)

Events are used to control the behavior of your block. Each event can have any number of nodes connected to form a blueprint.

onDestroyedByPlayer

This event is fired when this block is broken by the player (in survival mode).

stepOn

This event is fired when a player steps on this block.

Ore Generation

Blocks can be spawned in the world as ores using this configuration section.

PropertyDescription
Ore TypeWhether this ore should replace stone or deepslate.
Veins per chunkOn average, how many veins of this ore should spawn per chunk. The ore's distribution will be affected by this parameter and the height range.
Height distributionUniform or Triangular. In 1.18 certain ores have triangular distributions, meaning that they are most common at the midpoint of the depths they can be found at, and less prevalent at the top and bottom of the range.
Ores per veinOn average, how many ores to spawn per vein.
Distribution bottom Y levelThe lowest Y level which this ore can be spawned at.
Distribution top Y levelThe highest Y level which this ore can be spawned at.

Example Ore Generation

Log and leaf block

To create a block that can be used as logs or leaves, choose that option from the "Block type" dropdown at the top of the form. This will change the available parameters to be specific to a log or leaf block.

Log block

As you can see in the image above, choosing log will automatically generate the log, wood, stripped log, stripped wood, and plank variants.