Minecraftmodcustomstuff Wiki
Register
Advertisement

Welcome to the wide world of Custom Stuff. If you're here it's probably because you're trying to get your creation off the ground. Maybe you're having problems, maybe you're just new. No matter what, this wiki is here to help you out!

Custom Stuff 2[]

Installation[]

Installing Minecraft Forge[]

The first step is to install Minecraft Forge, a programming API that Custom Stuff runs on. This API serves as a bridge, if you will, between Custom Stuff and Minecraft allowing for this mod and many others to function in harmonious synchronicity.

You will need to download this from the official Forge Website. Generally, it is a good idea to install the latest recommended build. If this causes crashes or problems, refer to CubeX2's Forum Thread for the Forge build recommended for use with Custom Stuff 2.

There are two ways to install Minecraft Forge. There's the easy way, and the traditional way. If you're having difficulties with the easy way, try the traditional way.

Easy Install Method[]

Important: This method assumes that you have not yet added any mods to Minecraft (that you have a 'clean' jar) and is aimed entirely at new users. If you're already familiar with the process of installing mods, skip this method entirely.

Navigate to this thread on minecraftforum.net and download the latest version of the program called MCPatcher. Yes, I know this comes with the HD Texture fix. That part is optional. For now, download it and run it.

ForgeMCPatcherInstall

An illustrated guide to installing Minecraft Forge using MCPatcher.

When you run MCPatcher, you'll get a window with a set of mods listed. If you were using this to install the texture pack tools, you'd simply click the 'Patch' button at the bottom and be done with it. For our example, we're going to be doing something a bit more advanced.

Click on the + button right above the huge 'patch' button. Navigate the the folder where you saved the .zip file you downloaded from the Minecraft Forge site. Open Forge's .zip file. If it prompts you to choose a directory. Select the root directory and click OK. It will now show you a list of files. Just click OK again.

Minecraft Forge should now appear in the list above the mods that were already loaded into MCPatcher. If necessary, use the ▲ button to move Forge to the top of the list. You can also use this method to install any other mods that require that they be installed into minecraft.jar.

Note that Custom Stuff itself does NOT use this method, and your game will crash if you attempt it. Read each mod's install instructions CAREFULLY before attempting this. Installing the Custom Stuff mod itself will be covered in a later section.

When you have all of the mods you wish to install into minecraft.jar listed and in the proper order, and all of the texture pack options you desire selected, click the "Patch" button. It may show you which class files are being overwritten if you're using more than one mod. As long as Forge is at the top of the list, you should accept what it tells you it's doing.

After a moment MCPatcher will finish its work and you'll be ready to install Custom Stuff. If everything has worked well for you up to this point, you can skip to the Installing Custom Stuff 2 section below. If this didn't work or you don't want to use MCPatcher for some reason, try the traditional installation method below.

Traditional Installation Method[]

Windows:[1]

ForgeManualInstall

A visual representation of Steps 3 - 5.

1) Open up %appdata%, if you don't know how to do this, start>run, then type in %appdata%
2) Browse to .minecraft/bin
3) Open up minecraft.jar with WinRAR or 7zip.
4) Drag and drop the necessary files into the jar.
5) Delete the META-INF folder in the jar.
6) Run Minecraft, enjoy!


Macintosh:[1]

1) Go to Applications>Utilities and open terminal.
2) Type in the following, line by line:

cd ~
mkdir mctmp
cd mctmp
jar xf ~/Library/Application\ Support/minecraft/bin/minecraft.jar

3) Outside of terminal, copy all the files and folders into the mctmp directory.
4) Back inside terminal, type in the following:

rm META-INF/MOJANG_C.*
jar uf ~/Library/Application\ Support/minecraft/bin/minecraft.jar ./
cd ..
rm -rf mctmp

5) Run Minecraft, enjoy!

Installing Custom Stuff[]

First, download the Custom Stuff client from CubeX2's thread on Minecraftforum.net. Save it to any directory you can easily locate later.

Navigate to your Minecraft mods directory. On Windows, click on "Run" in your start menu and type "%appdata%/.minecraft/mods" without quotes. On a Mac, the directory is "~/Library/Application\ Support/minecraft/mods/", again, without quotes.

Copy the Custom Stuff Client zip file into that "mods" folder. DO NOT EXTRACT THE .zip FILE.

Run Minecraft and you're done. ^_^

Making Your First Block[]

Setting Up Your Folders[]

To begin a project, you must create a project folder. Before you begin, run Minecraft once after installing Custom Stuff. This will set up some basic folders and directories for you.

Navigate to your Minecraft mods directory. On Windows, click on "Run" in your start menu and type "%appdata%/.minecraft" without quotes. On a Mac, the directory is "~/Library/Application\ Support/minecraft", again, without quotes.

Within the minecraft directory, navigate to config > CustomStuff > mods.

Within this folder, create a folder with the name of your project. It can be named anything. Once you have done this, run Minecraft again and it will generate a series of sub-folders and files within your newly created directory.

Creating a Block File[]

After completing the last step, you'll notice that your project's folder now how sub-folders like "blocks", "items", and so forth. For this tutorial, we'll be concentrating primarily on the blocks folder.

Open your /blocks/ folder, and create a new .txt document. You can use any program to do this, though I recommend simpler programs like Notepad, or Notepad++ that have Plain Text as their native format. Any program that adds text formatting may change the format of the file, and cause it to be undreadable by Minecraft. Try to avoid more elaborate programs like Microsoft Word or Apache Open Office Writer for this reason.

Rename your new text document with the extension ".js" to make it a javascript file. The exact name of the file doesn't matter as long as it's descriptive of the block, and thus easy for you to remember. For this tutorial, I'll be using a file called "tutorialBlock.js" as my block's file.

If you're using Windows, make sure that you have file extensions enabled for all file formats. (Windows Explorer > Tools > Folder options > View (tab) > Uncheck "Hide extensions for known file types") This prevents mistakes where Windows will display your file as being "ExampleBlock.js", when it's really "ExampleBlock.js.txt", making it unreadable to Minecraft.

Adding Block Attributes[]

Now that you have your block's file created, it's time to tell Custom Stuff how your block should look and function.

For this example, I'm going to be making a Normal-type block since it is the most basic and easy for most people to understand.

The simplest way to exmpalin how to create a block in Custom Stuff is that you have a series of attributes, and that you decide their value. These are the underlying mechanics of Minecraft that you probably think about all the time. Things like which tool will break a block quickly, how long it takes to mine, what drops when you break it, and so forth. Each attribute and value you add to a block's .js file sets these values to your liking.

The basic format for any attribute is:

<attribute> = <value>;

For some block attributes, this is complicated slightly.

<attribute>[<metadata>] = <value>;

[Metadata] is covered in its own atricle. Until you understand it, use "0" for all metadata values.

Here is a basic, simple, example block file:

tutorialBlock.js

id = config.getBlockId("tutorialBlockID");
name = "tutorialBlock";
material = "rock";
creativeTab = "buildingBlocks";
stepSound = "stone";

displayName[0] = "Tutorial Block";
hardness[0] = 1.0;
resistance[0] = 10.0;
drop[0] = config.getBlockId("tutorialBlockID");
addToCreative[0] = true;
textureFileXP[0] = "tutorialTexture.png";
textureFileXN[0] = "tutorialTexture.png";
textureFileYP[0] = "tutorialTexture.png";
textureFileYN[0] = "tutorialTexture.png";
textureFileZP[0] = "tutorialTexture.png";
textureFileZN[0] = "tutorialTexture.png";
harvestLevel[0] = 0;
toolClass[0] = "pickaxe";

Don't worry, it looks more intimidating than it is.

Let's walk through what these attributes actually do one at a time. You can click on the title to go to the cooresponding page in the Wiki that has more in-depth information if you want to learn more.

id - ID is the Identification number given to every block in Minecraft. It's just a number. Now, you're probably wondering what's up with that code that makes up it's value. This is a more complex feature, and will be explained in a later section. For now, change "tutorialBlockID" to a name you choose. It is recommended that you use the name of your block, followed by "ID" for this value, just because it's easy to remember.

name - This is a unique name given to the block that Minecraft uses to identify it. This is not the name that's displayed when you hover over a block in your inventory. This value isn't seen in-game at all, in fact, but is still used by Minecraft so it is important that it be set correctly.

material - What minecraft thinks this block is made of. This attribute has a limited number of valid values, listed in its article. You must use one of these values. You cannot just make one up, and expect Minecraft to accept it. Your game will crash, and you will get an error if you don't set this correctly.

creativeTab - Where the block goes in the creative menu. As with [material], this must be a value that Minecraft recognizes. You cannot make one up without creating it first. This is more advanced knowledge, though, so for now stick to the values that Minecraft recognizes.

stepSound - The sound the block makes when you walk on it. As with the previous attributes, you must use a value designated for this attribute. Minecraft only has so many sounds, and you must choose one of them.

All of the following attributes are array attributes. Do NOT forget to put the metadata identifier next to the attribute name.

displayName - This is the name of the block in-game. It must be in quotes, and it can be anything that you like.

[hardness] - How difficult it is to mine this block with tools or by hand. This can be any positive number.

resistance - How much explosive force it takes to destroy the block. Again, this can be any positve number.

drop - What the block drops when it is destroyed. You can put the [id|ID] number of any block (including normal Minecraft blocks, or blocks introduced by another mod). In the above example, we're using code to refer this block to itself in a dynamic way. As with the code for the [id|ID] attribute, this will be explained in a later section. For now, change "tutorialBlockID" to the same value that you chose for the same change made to the ID attribute.

addToCreative - This is an attribute that can be set to either true or false. If you want your block to be availabe in Creative Mode, set it to "true". Otherwise, set it to "false". If you set it to false, you can omit the creativeTab attribute entirely.

textureFile - These are six attributes that define the texture to be placed on each of six sides of the block. This will be discussed more in depth in a later section. For now, choose a name for a texture file, making sure to include the file extension ".png" at the end.

harvestLevel - This attribute dictates what strength of tool that you need to harvest a block. That is, make a block drop something upon being broken. A harvestLevel of 0 will drop an item even when broken with bare hands, while 3 requires diamond tools.

Texturing Blocks[]

Texturing for Minecraft is much the same as texturing for Minecraft in general. Each tile must be a perfectly square image, saved in the .png format.

By default, Minecraft uses images that are 16 x 16 pixels width and height. This is not a hard restriction, however, and any resolution will work as long as it remains perfectly square. Keep in mind, though, that larger images will burden your game and may cause crashes if you run out of memory to hold them. Widths and Heights that are powers of two (16, 32, 64, etc.) are also easier for the game to work with. As a recommendation, don't go over 64 x 64 for an image size unless you're sure that every computer running it can handle that size. If you're planning to post it on this Wiki, keep your textures to the default 16 x 16 and make higher-resolution versions for yourself if you desire. Textures in Minecraft are no longer in sheets as of Minecraft 1.5.0. If you're a vetran of CS1, you may remember this method. If you have a tile sheet from this era, you'll need to cut it apart into individual tiles in order to get it to work with the most recent versions of Custom Stuff 2.

Texture files can have any name, but must be .png images. All of your images will go in the appropriate sub-folder of the /textures/ folder of your project's directory. i.e. "/Tutorial/assets/tutorial/textures/blocks/tutorialTexture.png" for the block texture used in this tutorial. If you're making an item texture, it will go in /items/ and so forth.

Also keep in mind that this is only for items and most blocks. Chests have their own texture format, and GUIs will also be different. Read up on how to set out a texture for those things before attempting them.

For now, create a 16 x 16 PNG image that you want to use as your texture. Give it the same file name that is mentioned in your block's .js file, and save it to assets/(Project name)/textures/blocks/ in your project's directory. If you need a free image editor, both GIMP and Paint.net are fully functional and have all the tools you will require to texture anything for Minecraft. Do NOT use Microsoft Paint. It will NOT work even though it supposedly supports the PNG format.

Adding a Block to Minecraft[]

Now that you've settled on the attributes that you want your block to have, you'll need to actually add it to Minecraft. If you look in your project's directory, you'll see a file called "mod.js". This is the "master" file of a Custom Stuff project. It's the file that actually adds things to the game. While all of the other files decide what a block, item, or what-have-you is, this file takes that and actually puts it into the game.

When Editing this file, I recommend trying to do things in small parts. Add one line and run Minecraft. if it doesn't crash, move onto the next line. If it does crash, look at your crash log and try to figure out what went wrong. See debugging for more information on how to look at your crash log, and track down common errors.

The code to add a block to Minecraft will look something like this:

config.addBlockIdProperty("tutorialBlockID", 777);
var stainedPlanksID = config.getBlockId("tutorialBlockID");
mod.addBlock("tutorialBlock.js", "normal");

For your block, you will change "tutorialBlockID" in the first and second lines to the name you gave to your block's ID. In the third line, "tutorialBlock.js" should be changed to the name of the file, the one in the /blocks/ folder, that you created for your block in the last series of steps.

The number 777 in the first line should be change to any number between 0 and 4095 that does not already have a block assigned to it. Because each block must have a unique ID number, Custom Stuff itself will reassign this number if you accidentally use one that's already assigned by another mod. In general, it's a good idea to keep this number greater than 512 for blocks.

In the last line, note the word "normal" near the end. This is the type of block that you're trying to add to Minecraft. See Type for a valid list of Block Types. Changing this to another type in this line changes what sort of block it is in-game. For example, if you change "normal" to "stairs", it will be a stairs block. Know that not every block attribute works for every block type, so it's possible to create a block file that's valid as one type of block, but will crash the game when used as a different type. For example, anything that uses a metadata value above 0 will not work for stair-type blocks, causing an out of bounds error.

Finally, note that every line has a bit of code that uses the word "Block" in it. config.addBlockIdProperty, for example. If you're adding something that isn't a block, you'll use the proper name for that object instead. For example, config.addItemIdProperty for items.

Understanding Cascading IDs[]

CascadingIDs

An image showing the flow of ID information within your files.

Before we continue, it's essential to understand what is going on with those lines of code that take the place of block IDs in all of these files. The ones that you have, thus far, been told would be explained to you later. Well, now is the time to have those lines explained.

Effectively, this system is set up to make a block or item ID that can be used anywhere in the mod, for any purpose, and be set by the user in a config file rather than having it hard-coded in the files. This make it easier for you to alter your block's and item's IDs to prevent conflicts with other mods, as well as making them simpler for anyone else who would be using your files to adapt them to their own setup.

Here's how it works: It starts in the mod.js file with the line "config.addBlockIdProperty". This does exactly what it says it does - it ads a block ID property to the config file, and gives it a value.

If, after you've created a mod, you look in the root of your /config/ folder, you'll likely see a .cfg file with the same name as your mod. If you open it, you'll see a series of lines that show names and numbers. This is file is generated by Custom Stuff, but can be edited by the end user.

For example, let's say you assign your block the ID number 777 like in this example. Later, you download another mod that uses that number. This will cause a block ID conflict since you can't have two blocks that share the same number. If the other mod is well made, you'll change the block ID number in it's config. Otherwise, you'll have to change it in your project's config.

Anywhere you have the line "config.getBlockIdProperty" it's referencing the config file, looking for the line that's named the same as as the value you ask it to get. It check the file and goes "Oh, this block is this number. I'll use that number then."

This is where this system makes things easy for you. Rather than having to hunt down every instance of "777" in all of your files, you can change the one instance in your .cfg file, and everything else will just adapt to that. You don't even need to change the line above, since it sets the default when the file is created, but will not change what you set manually.

This extends down the line. You can set a variable, which gets it's value from the config file's ID. This then allows you to give your block a unique alias which checks that variable which in turn checks the config file's information. From there you use the alias in crafting recipes which, though several steps, get the correct ID number from the config file.

It may seem like a needlessly complicated system, but this is where some of the power of Custom Stuff flows from: The ability to do things dynamicaly and have information flow freely from one area to the next. It's a lot of work to get everything working, but this same system will also save you loads of problems down the road as well.

Adding a Crafting Recipe[]

If you've done everything correctly, your block should now be accessible in-game from the creative menu of your choice. That's fine if all you want is a new building block in Creative Mode, but what about making it appear in survival? Well, the most common way to do this is the have your block crafted from materials already in the game.

Before you set up a crafting recipe, it's best to set up an Alias for each block you create. The reason for this is explained in the previous section about Understanding Cascading IDs. Because best practice dictates assigning block IDs in a way that flows from the config file, rather than being hard-coded, we need to continue that practice here.

To set up an alias, you must first get the block's ID number from the config file, and make it a variable. This is fairly strait-forward and works by adding a line like this to your mod.js:

var tutorialBlockVar = config.getBlockId("tutorialBlockID");

This is telling Custom Stuff to create a variable called "tutorialBlockVar", which is always equal to the value for "tutorialBlockID" in the .config file for this mod. If that value changes, this also changes "tutorialBlockVar".

To add the alias proper, you can use the following:

mod.addAlias(tutorialBlockVar, "tutorialBlock");

Just as with the previous line, this moves the ID number from the config down another level. In this way, "tutorialBlock" = "tutorialBlockVar" = "tutorialBlockID". Changing your ID number in the .config file changes all three in a single stroke, so no matter what kind of data the mod wants in a particular slot you can keep it all together without having to change loads of code if you want to change a single number. A little cumbersome to set up, but far more utilitarian to use!

Now when you want to refer to this block in a recipe, you don't have to use it's ID number (which you shouldn't be using anyway), or type any 'get' code into the recipe (which won't work anyway). You just use it's new Alias.

To set up an actual crafting recipe, open your mod.js file. You'll be using the mod.addCraftingRecipe function. For more information, check out the Crafting Recipes.

This is where structure is important. For this function, there are four main variables: the Result, Width, Height, and Ingredients.

The genreal layout looks like this:

mod.addRecipe("[result]", [width], [height], "[ingredient 1]", "[ingredient 2]", ...);

The result can be be a block or item ID, an alias, an ID + Metadata combination. It can also be any of the above with a quantity added after the ingredient. Here are some examples:

"264" //The Item ID of a diamond.
"264 2" //The Item ID of a diamond with the qualtity of "2". ie. "2 diamonds"
"tutorialBlock" //The Alias that was added for the block created in this tutorial
"tutorialBlock 2" //Two of our tutorial blocks
"351:10" //The Item ID and Metadata of Lime Dye
"351:10 2" //Two lime Dyes

Width and height are pretty self-explanatory. They are the number of items in each row or column of your recipe. For example, ever vanilla slab recipe has a height of 1, and a width of 3. A door has a height of 3 and a width of 2. So why does Custom Stuff need to know this? All of the ingredients are listed in one big line, so CS wouldn't otherwise know where you want one line to end and the next to begin. If it helps, think of it a a table:

Ingredient 1 Ingredient 2 Ingredient 3
Ingredient 4 Ingredient 5 Ingredient 6
Ingredient 7 Ingredient 8

Ingredient 9

A nine-ingredient, 3 x 3 table looks a lot like your crafting grid, doesn't it?

But how about if you only want to use six blocks instead of nine? This is where the width and height come into play. By specifying different dimensions for your table, you reduce the number of ingredients. A 2 x 3 table will only have six ingredients, for example.

Finally, the ingredients themselves. You can use an ID, an ID-metadata combination, an alias, or an Ore Dictionary Class. The first three work exactly the same as they did for the Result, except that they cannot contain a quantity like the result can. The Ore Dictinary thing is a bit more advanced, so it's not going to be covered here.

Each ingredient should be listed in order from Left to Right, and from Top to Bottom. To put it another way, fill in the top row from left to right, followed by the second row, and then the third. Adapt this same method based on the number of rows and columns you've specified. Each ingredient must be in quotes, and have a comma separating them. Make sure you have exactly the number of ingredients you need given the space you've specified, no more, no less.

Making your Second Block, and Beyond.[]

- To Be Written -



CS1
Older Examples and Information for Custom Stuff 1.

Custom Stuff 1[]

Installation[]

Installing Modloader, ModloaderMP, and Forge[]

The first step is to install the three basic components used by mods of this type. You must download each of these three mods from their respective forum pages. Modloader can be found here, ModloaderMP is found in this thread, and the Forge Api is located over here. All three must be installed properly for Custom Stuff to work. There are two ways to install these mods, the easy way and the traditional way. If you're having difficulties with the easy way, try the traditional way.

Important: Modloader MP is not necessary to run Custom Stuff in Minecraft 1.2.5 and higher. Forge now takes over the functionality once held by MLMP, rendering it largely redundant.

Easy Installation Method[]

Important: This method assumes that you have not yet added any mods to Minecraft (that you have a 'clean' jar) and is aimed entirely at new users. If you're already familiar with the process of installing mods, skip this method entirely. Navigate to this thread on minecraftforum.net and download the latest version of the program called MCPatcher. Yes, I know this comes with the HD Texture fix. That part is optional. For now, download it and run it.

When you run MCPatcher, you'll get a window that looks a lot like this:

MCPatcher1

MCPatcher as it appears fresh out of the box

If you were using this to install the texture pack tools, you'd simply click the 'Patch' button at the bottom and be done with it. For our example, we're going to be doing something a bit more advanced.

Click on the + button right above the huge 'patch' button. Navigate the the folder where you saved the three mods that you downloaded above. Open Modloader. If it prompts you to choose a directory. Select the root directory and click OK. It will now show you a list of files. Just click OK again.

Modloader should now appear in the list above the mods that were already loaded into MCPatcher. Now click the + again and follow the same steps for ModloaderMP, Forge, and any other mods you want to add during this installation. Be aware, though, that this method will not install every mod 100% correctly, but it works well enough for the ones you require to install Custom Stuff.

Now MCPatcher should look like this:

MCPatcher2

MCPatcher with mods added to it.

If you would like to, you can un-check the boxes beside the mods that came with MCPatcher if you don't desire the improved texture capabilities. (As of the time of this writing Custom Colors appears to conflict with Forge, so it's recommended that you not install that one at the least)

After making sure that only the mods you actually want installed are selected, hit the large 'Patch' button at the bottom. It will bring up a warning screen informing you that some of the mods conflict. Fortunately, it will choose the correct versions for you automatically so it's safe to hit the 'patch anyway' button and continue.

After a moment MCPatcher will finish its work and you'll be ready to install Custom Stuff. If everything has worked well for you up to this point, you can skip to the Installing Custom Stuff section below. If this didn't work or you don't want to use MCPatcher for some reason, try the traditional installation method below.

Traditional Installation Method[]

Windows:[1]

1) Open up %appdata%, if you don't know how to do this, start>run, then type in %appdata%
2) Browse to .minecraft/bin
3) Open up minecraft.jar with WinRAR or 7zip.
4) Drag and drop the necessary files into the jar.
5) Delete the META-INF folder in the jar.
6) Run Minecraft, enjoy!


Macintosh:[1]

1) Go to Applications>Utilities and open terminal.
2) Type in the following, line by line:

cd ~
mkdir mctmp
cd mctmp
jar xf ~/Library/Application\ Support/minecraft/bin/minecraft.jar

3) Outside of terminal, copy all the files and folders into the mctmp directory.
4) Back inside terminal, type in the following:

rm META-INF/MOJANG_C.*
jar uf ~/Library/Application\ Support/minecraft/bin/minecraft.jar ./
cd ..
rm -rf mctmp

5) Run Minecraft, enjoy!

Installing Custom Stuff[]

First, download the Custom Stuff client from CubeX2's thread on Minecraftforum.net. Save it to any directory you can easily locate later.

Navigate to your Minecraft directory. If you're having trouble locating it, check the steps in the traditional installation above. It's the folder that the /bin/ folder is in.

Find another folder within the minecraft folder called "mods". Copy the Custom Stuff Client zip file into that folder.

You're done. ^_^

Making your First Block[]

Now that you've installed Custom Stuff, you'll probably want to start making stuff. Otherwise, why would you have installed it? Well, you could just download one of the Released Projects that our wiki members have created and install it, of course, but what fun is that? (Lots, actually)

Before you dig into the mechanics of creating a block, you'll need to create some art for your new block. This will need to be in a 256x256 .png image with all of the textures you want to use lined up in rows of 16 tiles per row. See Icon and Texture Files for more details and a good example of what this image needs to look like. (If you're lazy or don't want to create anything, you can also just save that example image.)

Once you've created a look that's to your liking, save the image as customstuff.png and add it to minecraft.jar. (See Traditional Installation Method above if you need help locating this file) You can name your image file something else, but you'll have to remember to change it in the example below.

Run minecraft at least once before continuing. You don't have to play or even create a world, just log in so that you can access the Singleplayer/Multiplayer/Texture Pack menus. After you've done that, you can close Minecraft.

Navigate back to your minecraft folder. Find a folder called "config". When you open it, you'll find several folders:

  • customBlocks
  • customFuels
  • customItems
  • customOreGeneration
  • customRecipes
  • customSmeltingRecipes
  • customStuffFunctions
  • customStuffStartup

For the moment, we'll be dealing with the customBlocks folder. Open it and you'll find it to be totally empty. This is why we're here: to fill it with custom stuff.

Create a .txt file and give it a name. Depending on your operating system's settings, you may need to change the configuration so that you can see the file extensions. (You'll need to be able to see that the file is called "MyBlock.txt" and not just "MyBlock") It's important to remember that it MUST end in .block. For example 'MyBlock.block.txt' will NOT function.

Rename the txt file that you just created so that the extension is now .block. Your OS will probably ask you if you really want to change the file extension and warn you of file corruption and so forth. Ignore it and change the extension anyway. Now open the new .block file with notepad (or an equivalent).

Add the following lines to the file and save it:

name="SampleBlock";
id=217;
texturefile="customstuff.png";
textureindex=0;
material="rock";
stepsound="stone";
hardness=1;
resistance=50;

The block will now be in the game. Ta Da!

Except that you won't be able to access it! OK, so you'll need a recipe to craft your block. Go back to the config folder and look for the customRecipes folder. Open it and, just like you did with the .block file you just finished editing, create another .txt file. This time, though, you'll give it the extension ".recipe". And again, open this file with notepad and add the following line:

recipes.addRecipe("217 1 1 1 3", "", "vanilla");

And save the file.

Now go into the game and put a single block of dirt on the crafting table. If you did everything correctly this should now turn into a block called SampleBlock with the first texture in the texture sheet you created. If this doesn't work, you probably did something wrong.

If Minecraft crashes the most likely problem is that the block ID used conflicts with another mod you have installed. Change "id=217;" to another number between 123 and 255 (including either) that's not used by any of your other mods (you should be able to find this information on the download pages for those mods). If you don't have any mods that add blocks to the game, this isn't your problem and you've done something else wrong.

Making your Second Block and Beyond[]

Now that you have a basic grasp of what goes where you should be ready to explore a little bit on your own. Try making another block on your own, starting with the template shown above. Change some values and see how they work. Click on the links provided to learn more about what the attribute does and how you can alter it to suit your desires. When you're ready, check out the entry for Normal (block type) to find more attributes you can add and play with. You should also check the Recipes entry so that you can make more exciting and complex recipes for you custom blocks.

When you're comfortable with making basic blocks, look up the various Block Types and try making some of them. You can also add Items by creating .item files in the customItems folder, again much like you did with blocks.

If you run into problems, explore the wiki or post on the forum thread to get help. Don't be afraid to pester the Wiki admins and regulars either. They thrive on the attention. You can also post questions on the Talk pages for any entry you have questions about. Your inquires help the wiki by pointing out where our articles are lacking.

Most importantly, try to have fun. Remember, this is still a game and the purpose of it is to be enjoyed. ^_^


Advertisement