Jump to content

How to make a block


Recommended Posts

I've been searching, on and off, for DAYS for a tutorial on how to make a block.

I've searched this forum and also google, with no luck.

I'm looking for a tutorial for 1.9 using blockstates and not using deprecated methods like registerBlock() or setBlockTextureName().


I'm sure there's a tutorial somewhere, right? Anyone know?

Link to comment
Share on other sites



May the luck was not on your side, but within two seconds of googling I found this:




Happy coding

Sincerely -pick


Great, thanks! :D

It might help me with stuff, however looking at the block tutorial, I've already done what's in the tutorial and it's not working. The block is not ingame, neither as /give or in the creative menu (which I have put it in).


I do have an item working so I have the basics done and working.


My code (simplified) is like:


The main class calls proxy stuff. CommonProxy.preInit() calls BlockManager.createBlocks() which does:


GameRegistry.register(clinkerBrickBlock = new ClinkerBricks());


and the block class is:


[snip imports...]


public class ClinkerBricks extends Block{

    public ClinkerBricks() {

        this("clinker_bricks", Material.rock);



    public ClinkerBricks(String name, Material material) {









That's the correct chain of events to register a block, right?

Registering it twice crashes with "already registered that name" error, so the registering goes through, but it doesn't show up ingame. I don't even care about textures right now, I just wanna see that sweet, sweet black/magenta checker pattern  ;)

This is so basic that I'm embarrased, but I'm not getting it to work  :-[


Any thoughts?

Link to comment
Share on other sites

Did you register an ItemBlock? Because if you don't, your Block can only exist placed down in the world.


Ah! I did not do that. Didn't know it was a thing. Looking for tutorials about the relation of blocks and ItemBlock: can't find any xD My google-fu must suck, or are there generally not many detailed tutorials available?


I took a shot in the dark: saw something about registering ItemBlock(this) so I threw

GameRegistry.register(new ItemBlock(this), getRegistryName());

into the constructor of my block and it works! :D


Textures next! It's going slow but I'm making progress! :D


Thansk again!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.