Jump to content

FloatingGrapefruit

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by FloatingGrapefruit

  1. What do you mean by this? Can you show me how? BTW, all the items and armor are working just like they should be in game. Thanks for the reply!
  2. Guys, I don't know if I'm just derping or what, but nothing said here is working. The strange part is that if I change baconiteChestplate to any vanilla item, or even a mod item that is not armor or a tool, the recipe works fine. I will post all of my classes so you can maybe further see what my error is. I'm fustrated that I'm having trouble with what is supposed to be the easy part! Main Class (with things suggested here) package mods.crystalia.common; import java.lang.reflect.Proxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = "Crystalia", name = "Crystalia", version = "Pre-Alpha 0.0.3") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class Crystalia { @SidedProxy(clientSide = "mods.crystalia.common.ClientProxy", serverSide = "mods.crystalia.common.ServerProxy") public static ServerProxy proxy; //Blocks start here public static Block baconiteOre; int baconiteOreID = 3000; public static Block sapphireOre; int sapphireOreID = 3001; //Items start here public static Item baconiteIngot; public static Item cloth; public static Item blueCloth; public static Item greenCloth; public static Item redCloth; public static Item yellowCloth; public static Item brownCloth; public static Item blackCloth; public static Item sapphire; public static Item ruby; //tools start here public static Item baconiteBow; public static Item pickBaconite; public static Item axeBaconite; public static Item swordBaconite; public static Item hoeBaconite; public static Item shovelBaconite; //armor starts here public static Item baconiteHelmet; public static Item baconiteChestplate; public static Item baconiteLeggings; public static Item baconiteBoots; @Init public void load(FMLInitializationEvent event){ proxy.registerRenderThings(); baconiteOre = new BlockBaconiteOre(baconiteOreID, Material.iron).setUnlocalizedName("tilebaconiteore").setHardness(3.0F); sapphireOre = new BlockSapphireOre(sapphireOreID, Material.iron).setUnlocalizedName("tilesapphireore").setHardness(3.0F); GameRegistry.registerWorldGenerator(new WorldGeneratorCrystalia()); GameRegistry.registerBlock(baconiteOre, "baconiteore"); GameRegistry.registerBlock(sapphireOre, "sapphireore"); GameRegistry.registerItem(baconiteIngot, "baconiteingot"); GameRegistry.registerItem(baconiteChestplate, "baconitechestplate"); LanguageRegistry.addName(baconiteOre, "Baconite Ore"); LanguageRegistry.addName(sapphireOre, "Sapphire Ore"); baconiteIngot = new ItemBaconiteIngot(5000).setUnlocalizedName("baconiteIngot"); LanguageRegistry.addName(baconiteIngot, "Baconite Ingot"); sapphire = new ItemSapphire(5008).setUnlocalizedName("sapphire"); LanguageRegistry.addName(sapphire, "Sapphire"); ruby = new ItemRuby(5016).setUnlocalizedName("ruby"); LanguageRegistry.addName(ruby, "Ruby"); //cloth starts here. SO MUCH CLOTH!!! redCloth = new ItemRedCloth(5004).setUnlocalizedName("redCloth"); cloth = new ItemCloth(5001).setUnlocalizedName("cloth"); greenCloth = new ItemGreenCloth(5003).setUnlocalizedName("greenCloth"); blueCloth = new ItemBlueCloth(5002).setUnlocalizedName("blueCloth"); yellowCloth = new ItemYellowCloth(5005).setUnlocalizedName("yellowCloth"); blackCloth = new ItemBlackCloth(5006).setUnlocalizedName("blackCloth"); brownCloth = new ItemBrownCloth(5007).setUnlocalizedName("brownCloth"); LanguageRegistry.addName(cloth, "Cloth"); LanguageRegistry.addName(blueCloth, "Blue Cloth"); LanguageRegistry.addName(greenCloth, "Green Cloth"); LanguageRegistry.addName(redCloth, "Red Cloth"); LanguageRegistry.addName(yellowCloth, "Yellow Cloth"); LanguageRegistry.addName(blackCloth, "Black Cloth"); LanguageRegistry.addName(brownCloth, "Brown Cloth"); //Smelting!! GameRegistry.addSmelting(baconiteOreID, new ItemStack (baconiteIngot), 0.1f); //Crafting /*GameRegistry.addRecipe(new ItemStack(baconiteChestplate, 1), new Object[] { "T T", "TTT", "TTT", 'T', baconiteIngot }); */ GameRegistry.addShapelessRecipe(new ItemStack(Item.silk, 4), new Object[] { Block.cloth }); GameRegistry.addRecipe(new ItemStack(baconiteChestplate), new Object[] { "T T", "TTT", "TTT", 'T', Crystalia.baconiteIngot, }); //tools baconiteBow = new BaconiteBow(5010).setUnlocalizedName("Crystalia:baconiteBow"); LanguageRegistry.addName(baconiteBow, "Baconite Bow"); EnumToolMaterial BACONITE = EnumHelper.addToolMaterial("Baconite Enum", 3, 2000, 7.0F, 4, 15); EnumArmorMaterial BACONITEA = EnumHelper.addArmorMaterial("Baconite Armor", 40, new int[]{3, 8, 6, 3}, 15); pickBaconite = new PickaxeBaconite(5011, BACONITE).setUnlocalizedName("crystalia:pickaxeBaconite"); LanguageRegistry.addName(pickBaconite, "Baconite Pickaxe"); axeBaconite = new AxeBaconite(5012, BACONITE).setUnlocalizedName("crystalia:hatchetBaconite"); LanguageRegistry.addName(axeBaconite, "Baconite Axe"); hoeBaconite = new HoeBaconite(5013, BACONITE).setUnlocalizedName("crystalia:hoeBaconite"); LanguageRegistry.addName(hoeBaconite, "Baconite Hoe"); shovelBaconite = new ShovelBaconite(5014, BACONITE).setUnlocalizedName("crystalia:shovelBaconite"); LanguageRegistry.addName(shovelBaconite, "Baconite Shovel"); swordBaconite = new SwordBaconite(5015, BACONITE).setUnlocalizedName("crystalia:Baconite Sword"); LanguageRegistry.addName(swordBaconite, "Baconite Sword"); //armor baconiteHelmet = new BaconiteArmor(6000, BACONITEA, proxy.addArmor("Baconite"), 0).setUnlocalizedName("BaconiteHelmet"); LanguageRegistry.addName(baconiteHelmet, "Baconite Helmet"); baconiteChestplate = new BaconiteArmor(6001, BACONITEA, proxy.addArmor("Baconite"), 1).setUnlocalizedName("BaconiteChestplate"); LanguageRegistry.addName(baconiteChestplate, "Baconite Chestplate"); baconiteLeggings = new BaconiteArmor(6002, BACONITEA, proxy.addArmor("Baconite"), 2).setUnlocalizedName("BaconiteLeggings"); LanguageRegistry.addName(baconiteLeggings, "Baconite Leggings"); baconiteBoots = new BaconiteArmor(6003, BACONITEA, proxy.addArmor("Baconite"), 3).setUnlocalizedName("BaconiteBoots"); LanguageRegistry.addName(baconiteBoots, "Baconite Boots"); } } BaconiteArmor Class: package mods.crystalia.common; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; public class BaconiteArmor extends ItemArmor implements IArmorTextureProvider{ public BaconiteArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); // TODO Auto-generated constructor stub } @Override public String getArmorTextureFile(ItemStack itemstack) { if(itemstack.itemID == Crystalia.baconiteHelmet.itemID || itemstack.itemID == Crystalia.baconiteChestplate.itemID || itemstack.itemID == Crystalia.baconiteBoots.itemID){ return "/mods/crystalia/textures/armor/baconite_1.png"; } if(itemstack.itemID == Crystalia.baconiteLeggings.itemID){ return "/mods/crystalia/textures/armor/baconite_2.png"; } else return null; } @Override public void updateIcons(IconRegister iconRegister) { if(this == Crystalia.baconiteHelmet) this.iconIndex = iconRegister.registerIcon("crystalia:helmetBaconite"); { if(this == Crystalia.baconiteChestplate) this.iconIndex = iconRegister.registerIcon("crystalia:chestplateBaconite"); } { if(this == Crystalia.baconiteLeggings) this.iconIndex = iconRegister.registerIcon("crystalia:leggingsBaconite"); } { if(this == Crystalia.baconiteBoots) this.iconIndex = iconRegister.registerIcon("crystalia:bootsBaconite"); } } } Baconite Axe(I did the same code for evey tool using the appropriate extends): package mods.crystalia.common; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemAxe; public class AxeBaconite extends ItemAxe { public AxeBaconite(int par1, EnumToolMaterial par2EnumToolMaterial) { super(par1, par2EnumToolMaterial); // TODO Auto-generated constructor stub } } If you want to see anything else, please ask! I'm really desperate to get the crafting recipes working! [glow=red,2,300]Please Help!![/glow]
  3. Guys, I don't know if I'm just derping or what, but nothing said here is working. The strange part is that if I change baconiteChestplate to any vanilla item, or even a mod item that is not armor or a tool, the recipe works fine. I will post all of my classes so you can maybe further see what my error is. I'm fustrated that I'm having trouble with what is supposed to be the easy part! Main Class (with things suggested here) package mods.crystalia.common; import java.lang.reflect.Proxy; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; @Mod(modid = "Crystalia", name = "Crystalia", version = "Pre-Alpha 0.0.3") @NetworkMod(clientSideRequired = true, serverSideRequired = false) public class Crystalia { @SidedProxy(clientSide = "mods.crystalia.common.ClientProxy", serverSide = "mods.crystalia.common.ServerProxy") public static ServerProxy proxy; //Blocks start here public static Block baconiteOre; int baconiteOreID = 3000; public static Block sapphireOre; int sapphireOreID = 3001; //Items start here public static Item baconiteIngot; public static Item cloth; public static Item blueCloth; public static Item greenCloth; public static Item redCloth; public static Item yellowCloth; public static Item brownCloth; public static Item blackCloth; public static Item sapphire; public static Item ruby; //tools start here public static Item baconiteBow; public static Item pickBaconite; public static Item axeBaconite; public static Item swordBaconite; public static Item hoeBaconite; public static Item shovelBaconite; //armor starts here public static Item baconiteHelmet; public static Item baconiteChestplate; public static Item baconiteLeggings; public static Item baconiteBoots; @Init public void load(FMLInitializationEvent event){ proxy.registerRenderThings(); baconiteOre = new BlockBaconiteOre(baconiteOreID, Material.iron).setUnlocalizedName("tilebaconiteore").setHardness(3.0F); sapphireOre = new BlockSapphireOre(sapphireOreID, Material.iron).setUnlocalizedName("tilesapphireore").setHardness(3.0F); GameRegistry.registerWorldGenerator(new WorldGeneratorCrystalia()); GameRegistry.registerBlock(baconiteOre, "baconiteore"); GameRegistry.registerBlock(sapphireOre, "sapphireore"); GameRegistry.registerItem(baconiteIngot, "baconiteingot"); GameRegistry.registerItem(baconiteChestplate, "baconitechestplate"); LanguageRegistry.addName(baconiteOre, "Baconite Ore"); LanguageRegistry.addName(sapphireOre, "Sapphire Ore"); baconiteIngot = new ItemBaconiteIngot(5000).setUnlocalizedName("baconiteIngot"); LanguageRegistry.addName(baconiteIngot, "Baconite Ingot"); sapphire = new ItemSapphire(5008).setUnlocalizedName("sapphire"); LanguageRegistry.addName(sapphire, "Sapphire"); ruby = new ItemRuby(5016).setUnlocalizedName("ruby"); LanguageRegistry.addName(ruby, "Ruby"); //cloth starts here. SO MUCH CLOTH!!! redCloth = new ItemRedCloth(5004).setUnlocalizedName("redCloth"); cloth = new ItemCloth(5001).setUnlocalizedName("cloth"); greenCloth = new ItemGreenCloth(5003).setUnlocalizedName("greenCloth"); blueCloth = new ItemBlueCloth(5002).setUnlocalizedName("blueCloth"); yellowCloth = new ItemYellowCloth(5005).setUnlocalizedName("yellowCloth"); blackCloth = new ItemBlackCloth(5006).setUnlocalizedName("blackCloth"); brownCloth = new ItemBrownCloth(5007).setUnlocalizedName("brownCloth"); LanguageRegistry.addName(cloth, "Cloth"); LanguageRegistry.addName(blueCloth, "Blue Cloth"); LanguageRegistry.addName(greenCloth, "Green Cloth"); LanguageRegistry.addName(redCloth, "Red Cloth"); LanguageRegistry.addName(yellowCloth, "Yellow Cloth"); LanguageRegistry.addName(blackCloth, "Black Cloth"); LanguageRegistry.addName(brownCloth, "Brown Cloth"); //Smelting!! GameRegistry.addSmelting(baconiteOreID, new ItemStack (baconiteIngot), 0.1f); //Crafting /*GameRegistry.addRecipe(new ItemStack(baconiteChestplate, 1), new Object[] { "T T", "TTT", "TTT", 'T', baconiteIngot }); */ GameRegistry.addShapelessRecipe(new ItemStack(Item.silk, 4), new Object[] { Block.cloth }); GameRegistry.addRecipe(new ItemStack(baconiteChestplate), new Object[] { "T T", "TTT", "TTT", 'T', Crystalia.baconiteIngot, }); //tools baconiteBow = new BaconiteBow(5010).setUnlocalizedName("Crystalia:baconiteBow"); LanguageRegistry.addName(baconiteBow, "Baconite Bow"); EnumToolMaterial BACONITE = EnumHelper.addToolMaterial("Baconite Enum", 3, 2000, 7.0F, 4, 15); EnumArmorMaterial BACONITEA = EnumHelper.addArmorMaterial("Baconite Armor", 40, new int[]{3, 8, 6, 3}, 15); pickBaconite = new PickaxeBaconite(5011, BACONITE).setUnlocalizedName("crystalia:pickaxeBaconite"); LanguageRegistry.addName(pickBaconite, "Baconite Pickaxe"); axeBaconite = new AxeBaconite(5012, BACONITE).setUnlocalizedName("crystalia:hatchetBaconite"); LanguageRegistry.addName(axeBaconite, "Baconite Axe"); hoeBaconite = new HoeBaconite(5013, BACONITE).setUnlocalizedName("crystalia:hoeBaconite"); LanguageRegistry.addName(hoeBaconite, "Baconite Hoe"); shovelBaconite = new ShovelBaconite(5014, BACONITE).setUnlocalizedName("crystalia:shovelBaconite"); LanguageRegistry.addName(shovelBaconite, "Baconite Shovel"); swordBaconite = new SwordBaconite(5015, BACONITE).setUnlocalizedName("crystalia:Baconite Sword"); LanguageRegistry.addName(swordBaconite, "Baconite Sword"); //armor baconiteHelmet = new BaconiteArmor(6000, BACONITEA, proxy.addArmor("Baconite"), 0).setUnlocalizedName("BaconiteHelmet"); LanguageRegistry.addName(baconiteHelmet, "Baconite Helmet"); baconiteChestplate = new BaconiteArmor(6001, BACONITEA, proxy.addArmor("Baconite"), 1).setUnlocalizedName("BaconiteChestplate"); LanguageRegistry.addName(baconiteChestplate, "Baconite Chestplate"); baconiteLeggings = new BaconiteArmor(6002, BACONITEA, proxy.addArmor("Baconite"), 2).setUnlocalizedName("BaconiteLeggings"); LanguageRegistry.addName(baconiteLeggings, "Baconite Leggings"); baconiteBoots = new BaconiteArmor(6003, BACONITEA, proxy.addArmor("Baconite"), 3).setUnlocalizedName("BaconiteBoots"); LanguageRegistry.addName(baconiteBoots, "Baconite Boots"); } } BaconiteArmor Class: package mods.crystalia.common; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumArmorMaterial; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemStack; import net.minecraftforge.common.IArmorTextureProvider; public class BaconiteArmor extends ItemArmor implements IArmorTextureProvider{ public BaconiteArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) { super(par1, par2EnumArmorMaterial, par3, par4); // TODO Auto-generated constructor stub } @Override public String getArmorTextureFile(ItemStack itemstack) { if(itemstack.itemID == Crystalia.baconiteHelmet.itemID || itemstack.itemID == Crystalia.baconiteChestplate.itemID || itemstack.itemID == Crystalia.baconiteBoots.itemID){ return "/mods/crystalia/textures/armor/baconite_1.png"; } if(itemstack.itemID == Crystalia.baconiteLeggings.itemID){ return "/mods/crystalia/textures/armor/baconite_2.png"; } else return null; } @Override public void updateIcons(IconRegister iconRegister) { if(this == Crystalia.baconiteHelmet) this.iconIndex = iconRegister.registerIcon("crystalia:helmetBaconite"); { if(this == Crystalia.baconiteChestplate) this.iconIndex = iconRegister.registerIcon("crystalia:chestplateBaconite"); } { if(this == Crystalia.baconiteLeggings) this.iconIndex = iconRegister.registerIcon("crystalia:leggingsBaconite"); } { if(this == Crystalia.baconiteBoots) this.iconIndex = iconRegister.registerIcon("crystalia:bootsBaconite"); } } } Baconite Axe(I did the same code for evey tool using the appropriate extends): package mods.crystalia.common; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.ItemAxe; public class AxeBaconite extends ItemAxe { public AxeBaconite(int par1, EnumToolMaterial par2EnumToolMaterial) { super(par1, par2EnumToolMaterial); // TODO Auto-generated constructor stub } } If you want to see anything else, please ask! I'm really desperate to get the crafting recipes working! [glow=red,2,300]Please Help!![/glow]
  4. Well than what do I do? The code Takoto gave me works for ordinary items, but not armor/tools. I'm so confused.
  5. Well than what do I do? The code Takoto gave me works for ordinary items, but not armor/tools. I'm so confused.
  6. No that does not work. What do you mean by correctly registered? The tools and armor work fine in the game. Is there something extra I have to do to register them?
  7. No that does not work. What do you mean by correctly registered? The tools and armor work fine in the game. Is there something extra I have to do to register them?
  8. I'm pretty sure that's exactly what I tried in my code that didn't work...
  9. I'm pretty sure that's exactly what I tried in my code that didn't work...
  10. What do you mean by that? Am I supposed to have a special class for registering tool/armor recipies specifically? If I am, please tell me how because I had no idea that you were supposed to do that. Thanks for the reply!
  11. What do you mean by that? Am I supposed to have a special class for registering tool/armor recipies specifically? If I am, please tell me how because I had no idea that you were supposed to do that. Thanks for the reply!
  12. Hello everyone! How would you add a crafting recipe for armor and tools? The way I am trying worked for normal items, but when I tried to use it for my armor or tools my game crashed before startup. The armor and tools works ingame when you put it on and use it and stuff, so it is not a problem with the armor or tools coding. Also, how would you add a recipe with dyes? I want the recipe for green cloth to be cactus green and cloth, but I cant find cactus green or any other dyes, only Item.dyePowder. Any help would be much appreciated! My Mod Code:http://pastebin.com/W9pV8Xv0
  13. Hello everyone! How would you add a crafting recipe for armor and tools? The way I am trying worked for normal items, but when I tried to use it for my armor or tools my game crashed before startup. The armor and tools works ingame when you put it on and use it and stuff, so it is not a problem with the armor or tools coding. Also, how would you add a recipe with dyes? I want the recipe for green cloth to be cactus green and cloth, but I cant find cactus green or any other dyes, only Item.dyePowder. Any help would be much appreciated! My Mod Code:http://pastebin.com/W9pV8Xv0
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.