For our first block, we are going to make a Copper Ore to go along with our Copper Ingot.
### Base Block
We're going to do something similar to what we did for [Basic Items](/tutorials/forge-modding-111/basic-items/), create a base class for all of our blocks to extend to make our life a bit easier.
```java
package net.shadowfacts.tutorial.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemBlock;
import net.shadowfacts.tutorial.TutorialMod;
public class BlockBase extends Block {
protected String name;
public BlockBase(Material material, String name) {
super(material);
this.name = name;
setUnlocalizedName(name);
setRegistryName(name);
}
public void registerItemModel(ItemBlock itemBlock) {
public BlockBase setCreativeTab(CreativeTabs tab) {
super.setCreativeTab(tab);
return this;
}
}
```
This is almost exactly the same as our `ItemBase` class except it extends `Block` instead of `Item`. It sets the unlocalized and registry names, has a method to register the item model, and has an overriden version of `Block#setCreativeTab` that returns a `BlockBase`.
We'll also create a `BlockOre` class which extends `BlockBase` to make adding ore's a little easier.
```java
package net.shadowfacts.tutorial.block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
public class BlockOre extends BlockBase {
public BlockOre(String name) {
super(Material.ROCK, name);
setHardness(3f);
setResistance(5f);
}
@Override
public BlockOre setCreativeTab(CreativeTabs tab) {
super.setCreativeTab(tab);
return this;
}
}
```
### `ModBlocks`
Now let's create a `ModBlocks` class similar to `ModItems` to assist us when registering blocks.
This class is slightly different than our `ModItems` class due to the way blocks work in 1.9. In 1.9, we register the block and the `ItemBlock` separately whereas previously Forge would register the default `ItemBlock` automatically.
**Brief aside about how `ItemBlock`s work:** The `ItemBlock` for a given block is what is used as the inventory form of a given block. In the game, when you have a piece of Cobblestone in your inventory, you don't actually have on of the Cobblestone blocks in your inventory, you have one of the Cobblestone _`ItemBlock`s_ in your inventory.
Once again, we'll need to update our `preInit` method to call the `init` method of our `ModBlocks` class:
```java
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
ModItems.init();
ModBlocks.init();
}
```
### Copper Ore
Now, because we have our `BlockBase` and `ModBlocks` classes in place, we can quickly add a new block: