Okay, so I am making a mod called Mo' everything and I came across a problem.
I am making a armor file but I cant seem to figure it out. Could somebody please make a example in a post on this page that has the stuff that i need to put in my main class marked as tutorial(Example: tutorialBlock), and show me what changes to make to my main class.
ALSO i am using the latest version of 1.7.2 (1.7.2-Forge-10.12.2.1147):steve_rage: (That means I am so confused that im angry!)
@Mod(modid = MoEverything.MODID, version = MoEverything.VERSION)
public class MoEverything
{
public static final String MODID = "MoEverything";
public static final String VERSION = "1.0.0 BETA";
public static CreativeTabs tabMoOres = new CreativeTabs("tabMoOres")
{
public Item getTabIconItem()
{
return Item.getItemFromBlock(MoEverything.vanillaOre);
}
};
public static CreativeTabs tabMoItems = new CreativeTabs("tabMoItems")
{
public Item getTabIconItem()
{
return MoEverything.vanilla;
}
};
public static CreativeTabs tabMoTools = new CreativeTabs("tabMoTools")
{
public Item getTabIconItem()
{
return MoEverything.budderPickaxe;
}
};
public static Block vanillaOre;
public static Item vanilla;
public static Block budderOre;
public static Item budder;
public static ToolMaterial budder2 = EnumHelper.addToolMaterial("budder2", 2, 6000, 10, 15, 30);
public static ToolMaterial gizzy2 = EnumHelper.addToolMaterial("gizzy2", 1, 2000, 10, 12, 30);
public static Item budderPickaxe;
public static Item helmetSky;
public static Item chestplateSky;
public static Item legsSky;
public static Item bootsSky;
public static ArmorMaterial enumArmorMaterialSky = EnumHelper.addArmorMaterial("SKY", 60000, new int[] {50, 50, 50, 50}, 64);
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
RenderingRegistry.addNewArmourRendererPrefix("5");
vanillaOre = new BlockvanillaOre().setBlockName("vanillaOre").setCreativeTab(tabMoOres);
GameRegistry.registerBlock(vanillaOre, "vanillaOre");
vanilla = new Item().setCreativeTab(tabMoItems).setUnlocalizedName("vanilla");
GameRegistry.registerItem(vanilla, "vanilla");
helmetSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("helmetSky").setCreativeTab(tabMoTools);
chestplateSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("chestplateSky").setCreativeTab(tabMoTools);
legsSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("legsSky").setCreativeTab(tabMoTools);
bootsSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("bootsSky").setCreativeTab(tabMoTools);
I am making a armor file but I cant seem to figure it out. Could somebody please make a example in a post on this page that has the stuff that i need to put in my main class marked as tutorial(Example: tutorialBlock), and show me what changes to make to my main class.
ALSO i am using the latest version of 1.7.2 (1.7.2-Forge-10.12.2.1147):steve_rage: (That means I am so confused that im angry!)
Here is my Armor File:
package com.vanminer.moeverything;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class SkyDoesMinecraftArmor extends ItemArmor{
private String [] armourTypes = new String [] {"helmetSky", "chestplateSky", "legsSky", "bootsSky"};
public SkyDoesMinecraftArmor(ArmorMaterial armorMaterial, int renderIndex, int armourType){
super(armorMaterial, renderIndex, armourType);
}
public String getArmorTexture(ItemStack stack, Entity entity, int renderIndex, armourType);{
if(stack.getItem().equals(MoEverything.helmetSky)) stack.getItem().equals(MoEverything.chestplateSky); stack.getItem().equals(MoEverything.bootsSky);{
return "moeverything:textures/armor/sky_1.png";
}
if(stack .equals(MoEverything.legsSky)){
return "moeverything:textures/armor/sky_2.png";
}
else return null;
}
@Override
public void registerIcons(IIconRegister reg){
String moeverything;
if(this == MoEverything.helmetSky)
this .itemIcon = reg.registerIcon(moeverything:"helmetSky");
if(this == MoEverything.chestplateSky)
this .itemIcon = reg.registerIcon(moeverything:"chestplateSky");
if(this == MoEverything.legsSky)
this .itemIcon = reg.registerIcon(moeverything:"legsSky");
if(this == MoEverything.bootsSky)
this .itemIcon = reg.registerIcon(moeverything:"bootsSky");
}
MAIN CLASS:
package com.vanminer.moeverything;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraftforge.common.util.EnumHelper;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@Mod(modid = MoEverything.MODID, version = MoEverything.VERSION)
public class MoEverything
{
public static final String MODID = "MoEverything";
public static final String VERSION = "1.0.0 BETA";
public static CreativeTabs tabMoOres = new CreativeTabs("tabMoOres")
{
public Item getTabIconItem()
{
return Item.getItemFromBlock(MoEverything.vanillaOre);
}
};
public static CreativeTabs tabMoItems = new CreativeTabs("tabMoItems")
{
public Item getTabIconItem()
{
return MoEverything.vanilla;
}
};
public static CreativeTabs tabMoTools = new CreativeTabs("tabMoTools")
{
public Item getTabIconItem()
{
return MoEverything.budderPickaxe;
}
};
public static Block vanillaOre;
public static Item vanilla;
public static Block budderOre;
public static Item budder;
public static ToolMaterial budder2 = EnumHelper.addToolMaterial("budder2", 2, 6000, 10, 15, 30);
public static ToolMaterial gizzy2 = EnumHelper.addToolMaterial("gizzy2", 1, 2000, 10, 12, 30);
public static Item budderPickaxe;
public static Item helmetSky;
public static Item chestplateSky;
public static Item legsSky;
public static Item bootsSky;
public static ArmorMaterial enumArmorMaterialSky = EnumHelper.addArmorMaterial("SKY", 60000, new int[] {50, 50, 50, 50}, 64);
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
RenderingRegistry.addNewArmourRendererPrefix("5");
vanillaOre = new BlockvanillaOre().setBlockName("vanillaOre").setCreativeTab(tabMoOres);
GameRegistry.registerBlock(vanillaOre, "vanillaOre");
vanilla = new Item().setCreativeTab(tabMoItems).setUnlocalizedName("vanilla");
GameRegistry.registerItem(vanilla, "vanilla");
helmetSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("helmetSky").setCreativeTab(tabMoTools);
chestplateSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("chestplateSky").setCreativeTab(tabMoTools);
legsSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("legsSky").setCreativeTab(tabMoTools);
bootsSky = new SkyDoesMinecraftArmor(MoEverything.enumArmorMaterialSky, 5, 0).setUnlocalizedName("bootsSky").setCreativeTab(tabMoTools);
GameRegistry.registerItem(helmetSky, "helmetSky");
GameRegistry.registerItem(chestplateSky, "chestplateSky");
GameRegistry.registerItem(legsSky, "legsSky");
GameRegistry.registerItem(bootsSky, "bootsSky");
}
@EventHandler
public void init(FMLInitializationEvent event)
{
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
@EventHandler
public void PreLoad(FMLPreInitializationEvent event)
{
VanillaWorld.mainRegistry();
((BlockvanillaOre) vanillaOre).mainRegistry();
}
}