Skip to content

Instantly share code, notes, and snippets.

@jstockdi
Created July 12, 2014 22:12
Show Gist options
  • Save jstockdi/5f73ca974624a63f6e25 to your computer and use it in GitHub Desktop.
Save jstockdi/5f73ca974624a63f6e25 to your computer and use it in GitHub Desktop.
Minecraft making recipes
/*****
* In your preInit event, declare your recipes
*
*
* /
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
//Recipe one: 9 sticks
GameRegistry.addRecipe(new ItemStack(Blocks.diamond_block), new Object[]{
"AAA",
"AAA",
"AAA",
'A', Items.stick
});
//Recipe two: 6 sticks, 3 apples
GameRegistry.addRecipe(new ItemStack(Blocks.diamond_block), new Object[]{
"AAA",
"AAA",
"BBB",
'A', Items.stick,
'B', Items.apple
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment