How to make a block
Blocks are fundamental elements for most mods. This page describes how you can add custom blocks to your mod.
|In game name||This is what will be displayed in the game for this block's name.|
|Material||The material for this block. Materials help classify blocks.|
|Sound||The sound to be used for this block. Affects things like the noise the block makes when walked on.|
|Hardness||The hardness of a block determines how long it will take to break.|
|Explosion Resistance||How resistant the block is to explosions.|
|Jump Factor||A higher jump factor means that players can jump higher when standing on this block.|
|Friction||A measure of the block's friction.|
|Speed Factor||How 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.
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 are used to control the behavior of your block. Each event can have any number of nodes connected to form a blueprint.
This event is fired when this block is broken by the player (in survival mode).
This event is fired when a player steps on this block.
Blocks can be spawned in the world as ores using this configuration section.
|Ore Type||Whether this ore should replace stone or deepslate.|
|Veins per chunk||On 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 distribution||Uniform 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 vein||On average, how many ores to spawn per vein.|
|Distribution bottom Y level||The lowest Y level which this ore can be spawned at.|
|Distribution top Y level||The highest Y level which this ore can be spawned at.|
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.
As you can see in the image above, choosing log will automatically generate the log, wood, stripped log, stripped wood, and plank variants.