O'Reilly logo

Minecraft™ Mod Development in 24 Hours, Sams Teach Yourself by Jimmy Koene

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Crafting a Recipe

In this section, you finally start actually modding the game. Recipes might not be that big of a change, but several combined recipes can change the way the game is played—especially in combination with custom items, which are explained in Hour 4, “Making Your First Item.”

You must add recipe code in the mod file. Listing 3.1 is the mod file from Hour 2, “Creating the Basics for Forge,” without the System.out.println lines.

LISTING 3.1 Clean Mod File

package com.wuppy.samsmod;import net.minecraft.init.Blocks;import cpw.mods.fml.common.Mod;import cpw.mods.fml.common.Mod.EventHandler;import cpw.mods.fml.common.event.FMLInitializationEvent;@Mod(modid= SamsMod.MODID, version = SamsMod.VERSION)public ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required