Tutorial 5. Texture and Names

Before you read, make sure you have seen the previous tutorial

Code is on github

Since we already made a backbone, it is really easy to add a texture and names for our block.
First thing you have to do, is create a texture. It needs to be 16×16.

Next thing to do, is create a set of folders.
So, remember you had your BaseFolder, with a src/main inside?
Now, in main, create a new folder called resources
Then follow this setup:
so, /resources/assets/[MODID (lowercase)]/lang
and /resources/assets/[MODID (lowercase)]/textures/blocks

Inside the blocks folder, place your texture. It should also appear in IntelliJ now.
For the names, create a new file in /lang, called en_US.lang
MAKE SURE YOU CHANGE THE EXTENTION TO .lang instead of .txt!!!
Now, inside the en_US.lang, add the names that you want to add:

So: tile.[modid]:[blockname].name = [ingame name]
Save the file, and done.

The block now has a texture and a name!

Back to List
Next tutorial

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">