Skip to content

Commit

Permalink
Have to use GameRegistry.registerBlock(Block block)
Browse files Browse the repository at this point in the history
  • Loading branch information
Havvy committed Sep 9, 2012
1 parent 9876c13 commit 22874d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/tutorial/generic/Generic.java
Expand Up @@ -35,7 +35,7 @@ public class Generic {
// Begin Basic Blocks
public final static Block genericDirt = new GenericBlock(500, 0, Material.ground)
.setHardness(0.5F).setStepSound(Block.soundGravelFootstep)
.setBlockName("genericDirt").setCreativeTab(CreativeTabs.tabDeco);
.setBlockName("genericDirt").setCreativeTab(CreativeTabs.tabBlock);
public final static Block genericOre = new GenericOre(501, 1);

// The instance of your mod that Forge uses.
Expand Down Expand Up @@ -84,11 +84,14 @@ public void load(FMLInitializationEvent event) {
// End Basic Items

// Basic Blocks
GameRegistry.registerBlock(genericDirt);
LanguageRegistry.addName(genericDirt, "Generic Dirt");
MinecraftForge.setBlockHarvestLevel(genericDirt, "shovel", 0);

GameRegistry.registerBlock(genericOre);
LanguageRegistry.addName(genericOre, "Genreric Ore");
MinecraftForge.setBlockHarvestLevel(genericOre, "pickaxe", 3);
// End Basic Blocks

proxy.registerRenderers();
}
Expand Down
Binary file added minecraft/tutorial/generic/block.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 22874d2

Please sign in to comment.