My First Block

Creating your first custom block

Resourcepack hosting

Configuration file

For example I created a file which will contain all my custom blocks. I created it in the folder: contents/myitems/configs/

I start creating a simple block called red_block in the file blocks.yml.

ItemsAdder/contents/myitems/configs/blocks.yml
info:
  namespace: myitems
items:
  red_block:
    display_name: Red Block
    permission: red_block
    resource:
      material: PAPER

Creating the textures files

To do that you have to put the .png textures file inside the correct folder.

In this case your namespace is myitems so you have to put them in this folder: contents/myitems/textures/block/

Alternative textures location

Alternatively you can put them in this folder too: contents/myitems/resourcepack/assets/myitems/textures/block/

Read more here: folders structure

Applying the textures files to your item

Now open blocks.yml file again and add the resource part as I did. As you can see I set generate: true and I set the textures for the item. This tells the plugin to generate the 3D model automatically using your texture.

Using different texture for each face

Using the same texture for each face

Adding the block placing functionality

You have to add the specific_properties attribute.

Getting the block ingame

Run /iaget red_block to get the item.

Download the complete example

Block loot

Last updated

Was this helpful?