Skip to content

Instantly share code, notes, and snippets.

@jetkiwi
Created May 29, 2013 03:40
Show Gist options
  • Save jetkiwi/5667833 to your computer and use it in GitHub Desktop.
Save jetkiwi/5667833 to your computer and use it in GitHub Desktop.
package net.minecraft.src;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = "TESTMod", name = "TEST MOD", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Main {
@Mod.Instance("Main")
public static Main instance;
@Mod.Init
public void load(FMLInitializationEvent event) {
ItemStack stack = new ItemStack(Item.skull,1);
stack.setItemDamage(3);
NBTTagCompound cmp = new NBTTagCompound();
cmp.setString("SkullOwner", "syamn");
stack.setTagCompound(cmp);
GameRegistry.addRecipe(stack, new Object[] {
"DDD", " ", " ", Character.valueOf('D'), Block.dirt });
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment