Here is the client proxy:
package rotten_flesh_mod;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class ClientProxy extends CommonProxy{
@Override
public void registerRenderers() {
RenderingRegistry.registerEntityRenderingHandler(EntityRottenFleshGrenade.class, new RenderRottenFleshGrenade(RottenFleshMod.rottenFleshGrenade));
RenderingRegistry.registerEntityRenderingHandler(EntityRottenFleshNukePrimed.class, new RenderRottenFleshNukePrimed());
}
public int addArmor(String par1){
return RenderingRegistry.addNewArmourRendererPrefix(par1);
}
}
And heres the main mod file:
package rotten_flesh_mod;
import net.minecraft.block.Block;
import net.minecraft.block.StepSound;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemHoe;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemSoup;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid=RottenFleshMod.modid,name="Rotten Flesh Mod",version="1.3")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class RottenFleshMod {
@Instance(value = RottenFleshMod.modid)
public static RottenFleshMod instance;
@SidedProxy(clientSide="rotten_flesh_mod.ClientProxy", serverSide="rotten_flesh_mod.CommonProxy")
public static CommonProxy proxy;
public static final String modid ="rotten_flesh_mod";
//Items
//Tools
public static Item rottenFleshPickaxe;
public static Item rottenFleshAxe;
public static Item rottenFleshShovel;
public static Item rottenFleshSword;
public static Item rottenFleshHoe;
//Rings
public static Item rottenFleshRingFlyingOFF;
public static Item rottenFleshRingFlyingON;
public static Item rottenFleshRing;
public static Item rottenFleshRingInvisOFF;
public static Item rottenFleshRingInvisON;
//Wand
public static Item rottenFleshWandLightningTop;
public static Item rottenFleshWandLightning;
public static Item rottenFleshWandFireBall;
public static Item rottenFleshWandFireBallTop;
public static Item rottenFleshWandZombieTamer;
public static Item rottenFleshWandZombieTamerTop;
//Armor
public static Item rottenFleshSpeedBoots;
//Misc
public static Item rottenFleshStick;
public static Item cookedZombieFlesh;
public static Item rottenFleshGrenade;
public static Item cookedZombieFleshSoup;
public static Item goldenRottenFlesh;
//Blocks
public static Block rottenFleshBlock;
public static Block cookedZombieFleshBlock;
public static Block rottenFleshSpawner;
public static Block cookedZombieFleshSpawner;
public static Block rottenFleshRainMaker;
public static Block rottenFleshNuke;
//Enums
public static EnumToolMaterial rottenFleshMaterial;
@EventHandler
public void preInit(FMLPreInitializationEvent event){
}
@EventHandler
public void load(FMLInitializationEvent event){
proxy.registerServerTickHandler();
cookedZombieFlesh=(new ItemFood(4744,6 ,0.2F, false).setUnlocalizedName("cookedZombieFlesh").setCreativeTab(CreativeTabs.tabFood).setTextureName("rotten_flesh_mod:cooked_zombie_flesh"));
rottenFleshSpawner=(new RottenFleshSpawner(3002,Material.ground).setUnlocalizedName("rottenFleshSpawner").setCreativeTab(CreativeTabs.tabBlock).setTextureName("rotten_flesh_mod:rotten_flesh_spawner"));
cookedZombieFleshSpawner=(new CookedZombieFleshSpawner(3001,Material.ground).setUnlocalizedName("cookedZombieFleshSpawner").setCreativeTab(CreativeTabs.tabBlock).setTextureName("rotten_flesh_mod:cooked_zombie_flesh_spawner"));
rottenFleshMaterial=EnumHelper.addToolMaterial("rottenFleshMaterial", 0, 49, 1.5F, 0.0F, 15);
rottenFleshPickaxe =(new ItemPickaxe(4745,rottenFleshMaterial).setUnlocalizedName("rottenFleshPickaxe").setCreativeTab(CreativeTabs.tabTools).setTextureName("rotten_flesh_mod:rotten_flesh_pickaxe"));
rottenFleshAxe =(new ItemAxe(4746,rottenFleshMaterial).setUnlocalizedName("rottenFleshAxe").setCreativeTab(CreativeTabs.tabTools).setTextureName("rotten_flesh_mod:rotten_flesh_axe"));
rottenFleshShovel =(new ItemSpade(4747,rottenFleshMaterial).setUnlocalizedName("rottenFleshShovel").setCreativeTab(CreativeTabs.tabTools).setTextureName("rotten_flesh_mod:rotten_flesh_shovel"));
rottenFleshSword =(new ItemSword(4748,rottenFleshMaterial).setUnlocalizedName("rottenFleshSword").setCreativeTab(CreativeTabs.tabCombat).setTextureName("rotten_flesh_mod:rotten_flesh_sword"));
rottenFleshHoe=(new ItemHoe(4749,rottenFleshMaterial).setUnlocalizedName("rottenFleshHoe").setCreativeTab(CreativeTabs.tabTools).setTextureName("rotten_flesh_mod:rotten_flesh_hoe"));
rottenFleshRingFlyingOFF=(new RottenFleshRingFlyingOFF(4750).setUnlocalizedName("rottenFleshRingFlyingOFF").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshRingFlyingOFF").setMaxStackSize(1));
rottenFleshRingFlyingON=(new RottenFleshRingFlyingON(4751).setUnlocalizedName("rottenFleshRingFlyingON").setTextureName("rotten_flesh_mod:rottenFleshRingFlyingON").setMaxStackSize(1));
rottenFleshRing=(new Item(4752).setUnlocalizedName("rottenFleshRing").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshRing"));
rottenFleshRingInvisOFF=(new RottenFleshRingInvisOFF(4753).setUnlocalizedName("rottenFleshRingInvisOFF").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshRingInvisOFF"));
rottenFleshRingInvisON=(new RottenFleshRingInvisON(4754).setUnlocalizedName("rottenFleshRingInvisOn").setTextureName("rotten_flesh_mod:rottenFleshRingInvisON"));
rottenFleshStick=(new Item(4755).setUnlocalizedName("rottenFleshStick").setCreativeTab(CreativeTabs.tabMaterials).setTextureName("rotten_flesh_mod:rottenFleshStick"));
rottenFleshWandLightning=(new RottenFleshWandLightning(4756).setUnlocalizedName("rottenFleshWandLightning").setCreativeTab(CreativeTabs.tabCombat).setTextureName("rotten_flesh_mod:rottenFleshWandLightning"));
rottenFleshWandFireBall=(new RottenFleshWandFireBall(4757).setUnlocalizedName("rottenFleshWandFireBall").setCreativeTab(CreativeTabs.tabCombat).setTextureName("rotten_flesh_mod:rottenFleshFireBall"));
rottenFleshWandLightningTop=(new Item(4758).setUnlocalizedName("rottenFleshWandLightningTop").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshWandLightningTop"));
rottenFleshWandFireBallTop=(new Item(4759).setUnlocalizedName("rottenFleshWandFireBallTop").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshFireBallTop"));
rottenFleshBlock=(new Block(3003,Material.ground).setUnlocalizedName("rottenFleshBlock").setCreativeTab(CreativeTabs.tabBlock).setTextureName("rotten_flesh_mod:rottenFleshBlock"));
cookedZombieFleshBlock=(new Block(3004,Material.ground).setUnlocalizedName("cookedZombieFleshBlock").setCreativeTab(CreativeTabs.tabBlock).setTextureName("rotten_flesh_mod:cookedZombieFleshBlock"));
rottenFleshSpeedBoots = new SpeedBoots(4760,EnumArmorMaterial.CLOTH,proxy.addArmor("RottenFleshSpeedBoot"), 3).setUnlocalizedName("rottenFleshSpeedBoots").setCreativeTab(CreativeTabs.tabCombat).setMaxStackSize(1).setTextureName("rotten_flesh_mod:rottenFleshSpeedBoot");
rottenFleshGrenade= new RottenFleshGrenade(4761).setUnlocalizedName("rottenFleshGrenade").setMaxStackSize(1).setCreativeTab(CreativeTabs.tabCombat).setTextureName("rotten_flesh_mod:rottenfleshgrenade").setMaxStackSize(16);
cookedZombieFleshSoup=(new ItemSoup(4762,10).setUnlocalizedName("cookedZombieFleshSoup").setCreativeTab(CreativeTabs.tabFood).setTextureName("rotten_flesh_mod:cooked_zombie_flesh_stew"));
rottenFleshWandZombieTamer=(new RottenFleshWandZombieTamer(4763).setUnlocalizedName("rottenFleshWandZombieTamer").setCreativeTab(CreativeTabs.tabTools).setTextureName("rotten_flesh_mod:rottenFleshWandTaming"));
rottenFleshWandZombieTamerTop=(new Item(4764).setUnlocalizedName("rottenFleshWandZombieTamerTop").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshWandTamingTop"));
goldenRottenFlesh=(new GoldenRottenFlesh(4765, 3, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 5, 1, 1.0F).setUnlocalizedName("goldenRottenFlesh").setTextureName("rotten_flesh_mod:golden_rotten_flesh"));
rottenFleshRainMaker=(new RottenFleshRainMaker(3005,Material.ground).setUnlocalizedName("rottenFleshRainMaker").setCreativeTab(CreativeTabs.tabMisc).setTextureName("rotten_flesh_mod:rottenFleshRainMaker"));
rottenFleshNuke=(new RottenFleshNuke(3006).setHardness(0.0F).setStepSound(new StepSound("grass", 1.0F, 1.0F)).setUnlocalizedName("rottenFleshNuke").setTextureName("rotten_flesh_mod:rottenFleshNuke"));
proxy.registerRenderers();
EntityRegistry.registerModEntity(EntityRottenFleshGrenade.class, "Rotten Flesh Grenade", 1 ,this,64, 10, true);
EntityRegistry.registerModEntity(EntityRottenFleshNukePrimed.class, "Rotten Flesh Nuke Primed", 2, this, 64, 10, true);
GameRegistry.addRecipe(new ItemStack(rottenFleshSpawner,1),new Object[]{
"XXX","XRX","XXX",'X',new ItemStack(Block.blockGold,1),'R',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(cookedZombieFleshSpawner,1),new Object[]{
"XXX","XRX","XXX",'X',new ItemStack(Block.blockDiamond,1),'R',new ItemStack(cookedZombieFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshPickaxe,1),new Object[]{
"XXX"," S "," S ",'X',new ItemStack(Item.rottenFlesh,1),'S',new ItemStack(Item.stick,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshAxe,1),new Object[]{
"XX ","XS "," S ",'X',new ItemStack(Item.rottenFlesh,1),'S',new ItemStack(Item.stick,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshShovel,1),new Object[]{
" X "," S "," S ",'X',new ItemStack(Item.rottenFlesh,1),'S',new ItemStack(Item.stick,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshSword,1),new Object[]{
" X "," X "," S ",'X',new ItemStack(Item.rottenFlesh,1),'S',new ItemStack(Item.stick,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshHoe,1),new Object[]{
"XX "," S "," S ",'X',new ItemStack(Item.rottenFlesh,1),'S',new ItemStack(Item.stick,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshRing,1),new Object[]{
"XXX","X X","XXX",'X',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshRingFlyingOFF,1),new Object[]{
"XFX","XRX","XXX",'X',new ItemStack(Block.blockDiamond,1),'F',new ItemStack(Item.feather),'R',new ItemStack(rottenFleshRing)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshRingInvisOFF,1),new Object[]{
"XFX","XRX","XXX",'X',new ItemStack(Block.blockDiamond,1),'F',new ItemStack(Block.glass),'R',new ItemStack(rottenFleshRing)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshStick,4),new Object[]{
" "," X "," X ",'X',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandLightningTop,1),new Object[]{
"EDN","DRD","DDD",'D',new ItemStack(Block.blockDiamond,1),'R',new ItemStack(Block.blockRedstone),'E',new ItemStack(Item.emerald),'N',new ItemStack(Item.netherStar)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandLightning,1),new Object[]{
"DRD","GXG","IXI",'X',new ItemStack(rottenFleshStick,1),'R',new ItemStack(rottenFleshWandLightningTop,1),'D',new ItemStack(Item.diamond),'G',new ItemStack(Item.ingotGold),'I',new ItemStack(Item.ingotIron)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshBlock,1),new Object[]{
"XXX","XXX","XXX",'X',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(cookedZombieFleshBlock,1),new Object[]{
"XXX","XXX","XXX",'X',new ItemStack(cookedZombieFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandFireBallTop,1),new Object[]{
"EDN","DRD","DDD",'D',new ItemStack(Block.blockDiamond,1),'R',new ItemStack(Block.glowStone),'E',new ItemStack(Item.emerald),'N',new ItemStack(Item.netherStar)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandFireBall,1),new Object[]{
"DRD","GXG","IXI",'X',new ItemStack(rottenFleshStick,1),'R',new ItemStack(rottenFleshWandFireBallTop,1),'D',new ItemStack(Item.diamond),'G',new ItemStack(Item.ingotGold),'I',new ItemStack(Item.ingotIron)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshSpeedBoots,1),new Object[]{
"GIG","RLR","RLR",'R',new ItemStack(Item.rottenFlesh,1),'G',new ItemStack(Item.ingotGold,1),'I',new ItemStack(Item.ingotIron),'L',new ItemStack(Item.dyePowder,1,4)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshGrenade,1),new Object[]{
"GIG","IRI","GIG",'R',new ItemStack(Item.rottenFlesh,1),'G',new ItemStack(Item.gunpowder,1),'I',new ItemStack(Item.ingotIron)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandZombieTamerTop,1),new Object[]{
"EDN","DRD","DDD",'D',new ItemStack(Block.blockDiamond,1),'R',new ItemStack(Item.rottenFlesh),'E',new ItemStack(Item.emerald),'N',new ItemStack(Item.netherStar)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshWandZombieTamer,1),new Object[]{
"DRD","GXG","IXI",'X',new ItemStack(rottenFleshStick,1),'R',new ItemStack(rottenFleshWandZombieTamerTop,1),'D',new ItemStack(Item.diamond),'G',new ItemStack(Item.ingotGold),'I',new ItemStack(Item.ingotIron)
});
GameRegistry.addShapelessRecipe(new ItemStack(cookedZombieFleshSoup),new ItemStack(Item.bowlEmpty),new ItemStack(cookedZombieFlesh),new ItemStack(cookedZombieFlesh));
GameRegistry.addRecipe(new ItemStack(goldenRottenFlesh,1),new Object[]{
"GGG","GRG","GGG",'G',new ItemStack(Item.ingotGold,1),'R',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addRecipe(new ItemStack(rottenFleshRainMaker,1),new Object[]{
"WWW","WRW","WWW",'W',new ItemStack(Item.bucketWater,1),'R',new ItemStack(Item.rottenFlesh,1)
});
GameRegistry.addSmelting(Item.rottenFlesh.itemID,new ItemStack(cookedZombieFlesh),0.1F);
GameRegistry.registerItem(cookedZombieFlesh, "cookedZombieFlesh");
GameRegistry.registerItem(rottenFleshPickaxe, "rottenFleshPickaxe");
GameRegistry.registerItem(rottenFleshAxe, "rottenFleshAxe");
GameRegistry.registerItem(rottenFleshShovel, "rottenFleshShovel");
GameRegistry.registerItem(rottenFleshSword, "rottenFleshSword");
GameRegistry.registerItem(rottenFleshHoe, "rottenFleshHoe");
GameRegistry.registerItem(rottenFleshRingFlyingOFF, "rottenFleshRingFlyingOFF");
GameRegistry.registerItem(rottenFleshRingFlyingON, "rottenFleshRingFlyingON");
GameRegistry.registerItem(rottenFleshRing, "rottenFleshRing");
GameRegistry.registerItem(rottenFleshRingInvisOFF, "rottenFleshRingInvisOFF");
GameRegistry.registerItem(rottenFleshRingInvisON, "rottenFleshRingInvisON");
GameRegistry.registerItem(rottenFleshStick, "rottenFleshStick");
GameRegistry.registerItem(rottenFleshWandLightning, "rottenFleshWandLightning");
GameRegistry.registerItem(rottenFleshWandLightningTop, "rottenFleshWandLightningTop");
GameRegistry.registerItem(rottenFleshWandFireBall, "rottenFleshWandFireBall");
GameRegistry.registerItem(rottenFleshWandFireBallTop, "rottenFleshWandFireBallTop");
GameRegistry.registerItem(rottenFleshSpeedBoots, "rottenFleshSpeedBoots");
GameRegistry.registerItem(rottenFleshGrenade, "rottenFleshGrenade");
GameRegistry.registerItem(cookedZombieFleshSoup, "cookedZombieFleshSoup");
GameRegistry.registerItem(rottenFleshWandZombieTamer, "rottenFleshWandZombieTamer");
GameRegistry.registerItem(rottenFleshWandZombieTamerTop, "rottenFleshWandZombieTamerTop");
GameRegistry.registerItem(goldenRottenFlesh, "goldenRottenFlesh");
GameRegistry.registerBlock(cookedZombieFleshSpawner, modid+cookedZombieFleshSpawner.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(rottenFleshSpawner, modid+rottenFleshSpawner.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(rottenFleshBlock, modid+rottenFleshBlock.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(cookedZombieFleshBlock, modid+cookedZombieFleshBlock.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(rottenFleshRainMaker, modid+rottenFleshRainMaker.getUnlocalizedName().substring(5));
GameRegistry.registerBlock(rottenFleshNuke, modid+rottenFleshNuke.getUnlocalizedName().substring(5));
LanguageRegistry.addName(cookedZombieFlesh, "Cooked Zombie Flesh");
LanguageRegistry.addName(rottenFleshSpawner, "Rotten Flesh Spawner");
LanguageRegistry.addName(cookedZombieFleshSpawner, "Cooked Zombie Flesh Spawner");
LanguageRegistry.addName(rottenFleshPickaxe, "Rotten Flesh Pickaxe");
LanguageRegistry.addName(rottenFleshAxe, "Rotten Flesh Axe");
LanguageRegistry.addName(rottenFleshShovel, "Rotten Flesh Shovel");
LanguageRegistry.addName(rottenFleshSword, "Rotten Flesh Sword");
LanguageRegistry.addName(rottenFleshHoe, "Rotten Flesh Hoe");
LanguageRegistry.addName(rottenFleshRingFlyingOFF, "Rotten Flesh Ring Of Flying");
LanguageRegistry.addName(rottenFleshRingFlyingON, "Rotten Flesh Ring Of Flying");
LanguageRegistry.addName(rottenFleshRing, "Rotten Flesh Ring");
LanguageRegistry.addName(rottenFleshRingInvisOFF, "Rotten Flesh Ring Of Invisibility");
LanguageRegistry.addName(rottenFleshRingInvisON, "Rotten Flesh Ring Of Invisibility");
LanguageRegistry.addName(rottenFleshStick, "Rotten Flesh Stick");
LanguageRegistry.addName(rottenFleshWandLightning, "Rotten Flesh Wand Of Lightning");
LanguageRegistry.addName(rottenFleshWandLightningTop, "Rotten Flesh Wand Of Lightning Top");
LanguageRegistry.addName(rottenFleshWandFireBall, "Rotten Flesh Wand Of Fire");
LanguageRegistry.addName(rottenFleshWandFireBallTop, "Rotten Flesh Wand Of Fire Top");
LanguageRegistry.addName(rottenFleshBlock, "Block Of Rotten Flesh");
LanguageRegistry.addName(cookedZombieFleshBlock, "Block of Cooked Zombie Flesh");
LanguageRegistry.addName(rottenFleshSpeedBoots, "Rotten Flesh Speed Boots");
LanguageRegistry.addName(rottenFleshGrenade, "Rotten Flesh Grenade");
LanguageRegistry.addName(cookedZombieFleshSoup, "Cooked Zombie Flesh Soup");
LanguageRegistry.addName(rottenFleshWandZombieTamer, "Rotten Flesh Wand Of Zombie Taming");
LanguageRegistry.addName(rottenFleshWandZombieTamerTop, "Rotten Flesh Wand Of Zombie Taming Top");
LanguageRegistry.addName(goldenRottenFlesh, "Golden Rotten Flesh");
LanguageRegistry.addName(rottenFleshRainMaker, "Rotten Flesh Rain Maker");
LanguageRegistry.addName(rottenFleshNuke,"Rotten Flesh Nuke");
}
}