Everything works fine, but the armor is a white box.
It's weird. Armor files, changed name of the add armor thingy, Can you help?
Heres my code:
package net.minecraft.src;
import java.util.Random;
public class mod_EnderTool extends BaseMod
{
public static final Block EnderOre = new BlockEnderOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("EnderOre").setHardness(4.5F).setResistance(5F);
public static final Item EnderShard = new Item(5000).setItemName("EnderShard");
public static final Item yourPickaxe = (new ItemPickaxe(200, EnumToolMaterial.ENDER)).setItemName("yourPickaxe");
public static final Item yourAxe = (new ItemAxe(201, EnumToolMaterial.ENDER)).setItemName("yourAxe");
public static final Item yourShovel = (new ItemSpade(202, EnumToolMaterial.ENDER)).setItemName("yourShovel");
public static final Item yourSword = (new ItemSword(203, EnumToolMaterial.ENDER)).setItemName("yourSword");
public static final Item yourHoe = (new ItemHoe(204, EnumToolMaterial.ENDER)).setItemName("yourHoe");
public static final Item enderIngot = new Item(5002).setItemName("enderIngot");
public static final Item yourHelmet = new ItemArmor(5006, EnumArmorMaterial.ENDER, ModLoader.addArmor("ender_1"), 0).setItemName("yourHelmet");
public static final Item yourChestplate = new ItemArmor(5007, EnumArmorMaterial.ENDER, ModLoader.addArmor("ender_1"), 1).setItemName("yourChestplate");
public static final Item yourLeggings = new ItemArmor(5008, EnumArmorMaterial.ENDER, ModLoader.addArmor("ender_2"), 2).setItemName("yourLeggings");
public static final Item yourBoots = new ItemArmor(5009, EnumArmorMaterial.ENDER, ModLoader.addArmor("ender_2"), 3).setItemName("yourBoots");
public String getVersion()
{
return "EnderTools+ v0.1 [Minecraft 1.3.2]";
}
public void generateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 3; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(5 + 20);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(EnderOre.blockID, 17)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
}
It should be .addArmor("ender") not ender_1 and ender_2. Modloader will figure that out for you based on the numbers 0-3. And aren't you going to rename the yourPickaxe and stuff?
awesomeness just seen you've added custom potions to the to do list nice
Yea, but it might never be done because adding potions would require a lot of base classes to be edited, and it would mean writing up completely new code, and modloader doesn't have a function for this.
How do you add a dyepowder into a smelting recipe? I keep getting errors no matter how I try,
Rollback Post to RevisionRollBack
Check out my mods: Kinyoshi Mods (which includes Ancient Tree Root, Bone Ore, Chert Craft, Corn Nuts, Desert Cotton Plant, Desert Grund Plant, Desert Petrified Wood and misc tweaks).https://sites.google.com/site/kinyoshimods/
It should be the same, but I'll have to check up on that. Make sure you have two parameters for the item
this is how I have it,
ModLoader.addSmelting(new ItemStack(Item.dyePowder, 1, 3), new ItemStack(block), 0.0F);
All of the other smelting recipes work, but none of them have a dyepowder.
this is the crafting recipe that is similar (which works)
ModLoader.addRecipe(new ItemStack(Item.flint, 1), new Object[] {"S", 'S', Item.stick});
Rollback Post to RevisionRollBack
Check out my mods: Kinyoshi Mods (which includes Ancient Tree Root, Bone Ore, Chert Craft, Corn Nuts, Desert Cotton Plant, Desert Grund Plant, Desert Petrified Wood and misc tweaks).https://sites.google.com/site/kinyoshimods/
i have done that, but it will not work.
here is an image on how it looks when it's on...
here is the code:
package net.minecraft.src;
public class mod_Barmor extends BaseMod
{
public static final Item BHelmet = new ItemArmor(5001, EnumArmorMaterial.Block, ModLoader.addArmor("Block Helmet"), 0).setItemName("yourHelmet");
public static final Item BChestplate = new ItemArmor(5002, EnumArmorMaterial.Block, ModLoader.addArmor("Block Chestplate"), 1).setItemName("yourChestplate");
public static final Item BLeggings = new ItemArmor(5003, EnumArmorMaterial.Block, ModLoader.addArmor("Block Leggings"), 2).setItemName("yourLeggings");
public static final Item BBoots = new ItemArmor(5004, EnumArmorMaterial.Block, ModLoader.addArmor("Block Boots"), 3).setItemName("yourBoots");
public void load()
{
BHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B helm.png");
BChestplate.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B body.png");
BLeggings.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B legs.png");
BBoots.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B boots.png");
ModLoader.addRecipe(new ItemStack(BHelmet, 1), new Object [] {"###", "# #", '#', mod_blockblock.Blockblock});
ModLoader.addRecipe(new ItemStack(BChestplate, 1), new Object [] {"# #", "###", "###", '#', mod_blockblock.Blockblock});
ModLoader.addRecipe(new ItemStack(BLeggings, 1), new Object [] {"###", "# #", "# #", '#', mod_blockblock.Blockblock});
ModLoader.addRecipe(new ItemStack(BBoots, 1), new Object [] {"# #", "# #", '#', mod_blockblock.Blockblock});
ModLoader.addName(BHelmet, "Block Helmet");
ModLoader.addName(BChestplate, "Block Chestplate");
ModLoader.addName(BLeggings, "Block Leggings");
ModLoader.addName(BBoots, "Block Boots");
}
public String getVersion()
{
return "1.3.2";
}
}
Where it says ModLoader.addArmor() you need to use one word for the armor such as ModLoader.addArmor("BHelmet") And then you have to put two textures called BHelmet_1 and BHelmet_2 inside of the folder that you specified.
Where it says ModLoader.addArmor() you need to use one word for the armor such as ModLoader.addArmor("BHelmet") And then you have to put two textures called BHelmet_1 and BHelmet_2 inside of the folder that you specified.
What kind of texture? the one used in "BHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B helm.png");"? ore a new one?
public static final Item unobtainiumHelmet = new ItemArmor(5001, EnumArmorMaterial.UNOBTAINIUM, ModLoader.addArmor("unobtainium"), 0).setItemName("unobtainiumHelmet");
public static final Item unobtainiumChestplate = new ItemArmor(5002, EnumArmorMaterial.UNOBTAINIUM, ModLoader.addArmor("unobtainium"), 1).setItemName("unobtainiumChestplate");
public static final Item unobtainiumLeggings = new ItemArmor(5003, EnumArmorMaterial.UNOBTAINIUM, ModLoader.addArmor("unobtainium"), 2).setItemName("yourLeggings");
public static final Item unobtainiumBoots = new ItemArmor(5004, EnumArmorMaterial.UNOBTAINIUM, ModLoader.addArmor("unobtainium"), 3).setItemName("unobtainiumBoots");
This is where my armor coding currently sits. Its still appearing as white boxes...
How do you add a dyepowder into a smelting recipe? I keep getting errors no matter how I try,
Well I don't think it is possible to add a dye to a smelting recipe, from what I've read and have tried. I'll just get around it and add a crafting recipe to turn the dye into a new item that then can be furnaced. Only alternative I could think of.
Rollback Post to RevisionRollBack
Check out my mods: Kinyoshi Mods (which includes Ancient Tree Root, Bone Ore, Chert Craft, Corn Nuts, Desert Cotton Plant, Desert Grund Plant, Desert Petrified Wood and misc tweaks).https://sites.google.com/site/kinyoshimods/
public class mod_Agronyst extends BaseMod
{
public static final Item AgronystPickaxe = (new ItemPickaxe(200, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystPickaxe");
public static final Item AgronystAxe = (new ItemAxe(201, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystAxe");
public static final Item AgronystShovel = (new ItemSpade(202, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystShovel");
public static final Item AgronystSword = (new ItemSword(203, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystSword");
public static final Item AgronystHoe = (new ItemHoe(204, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystHoe");
public static final Block AgronystOre = new BlockAgronystOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("oreAgronyst").setHardness(4.5F).setResistance(5F).setCreativeTab(CreativeTabs.tabBlock);;
public static final Item Agronyst = new Agronyst(5000).setItemName("Agronyst");
public String getVersion()
{
return "1.3.2";
}
}
>
[Spoiler/]
This is the error i get when using the code above. This mod is supposed to make an agronyst ore with tools.
[Spoiler]
<
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\mcp\jars\.\crash-reports\crash-2012-09-10_17.03.02-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 797403af --------
Generated 10.09.12 17:03
- Minecraft Version: 1.3.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_04, Oracle Corporation
- Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 958279384 bytes (913 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
- JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_Agronyst 1.3.2
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:189)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:507)
at net.minecraft.src.mod_Agronyst.load(mod_Agronyst.java:23)
at net.minecraft.src.ModLoader.init(ModLoader.java:952)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
at net.minecraft.client.Minecraft.run(Minecraft.java:724)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 5977b2b6 ----------
>
public class mod_Agronyst extends BaseMod
{
public static final Item AgronystPickaxe = (new ItemPickaxe(200, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystPickaxe");
public static final Item AgronystAxe = (new ItemAxe(201, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystAxe");
public static final Item AgronystShovel = (new ItemSpade(202, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystShovel");
public static final Item AgronystSword = (new ItemSword(203, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystSword");
public static final Item AgronystHoe = (new ItemHoe(204, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystHoe");
public static final Block AgronystOre = new BlockAgronystOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("oreAgronyst").setHardness(4.5F).setResistance(5F).setCreativeTab(CreativeTabs.tabBlock);;
public static final Item Agronyst = new Agronyst(5000).setItemName("Agronyst");
public String getVersion()
{
return "1.3.2";
}
}
>
[Spoiler/]
This is the error i get when using the code above. This mod is supposed to make an agronyst ore with tools.
[Spoiler]
<
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\mcp\jars\.\crash-reports\crash-2012-09-10_17.03.02-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 797403af --------
Generated 10.09.12 17:03
- Minecraft Version: 1.3.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_04, Oracle Corporation
- Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 958279384 bytes (913 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
- JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_Agronyst 1.3.2
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:189)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:507)
at net.minecraft.src.mod_Agronyst.load(mod_Agronyst.java:23)
at net.minecraft.src.ModLoader.init(ModLoader.java:952)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
at net.minecraft.client.Minecraft.run(Minecraft.java:724)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 5977b2b6 ----------
>
[Spoiler/]
Hope you can help me JBond:)
PS:Sorry, i dont know how to make spoilers:(
i'm not sure if this will help but, i think it's something wrong with the crafting recipe, i think the " Agronyst" is supposed to be "mod_ Agronyst.nameofitem" or something, not sure but test it.
It should be .addArmor("ender") not ender_1 and ender_2. Modloader will figure that out for you based on the numbers 0-3. And aren't you going to rename the yourPickaxe and stuff?
Yea, but it might never be done because adding potions would require a lot of base classes to be edited, and it would mean writing up completely new code, and modloader doesn't have a function for this.
Check out my Minecraft Modding Tutorials!
You would need to make a new item first. Using bonemeal would require editing the ItemDyes.java class. Does the rest of the tutorial work, though?
Check out my Minecraft Modding Tutorials!
I have never used it, but I have heard that it has it's own benefits
It should be the same, but I'll have to check up on that. Make sure you have two parameters for the item
Check out my Minecraft Modding Tutorials!
this is how I have it,
ModLoader.addSmelting(new ItemStack(Item.dyePowder, 1, 3), new ItemStack(block), 0.0F);
All of the other smelting recipes work, but none of them have a dyepowder.
this is the crafting recipe that is similar (which works)
ModLoader.addRecipe(new ItemStack(Item.flint, 1), new Object[] {"S", 'S', Item.stick});
I'll check up on it, and I'll get back to you
Check out my Minecraft Modding Tutorials!
Check out my Minecraft Modding Tutorials!
i have done that, but it will not work.
here is an image on how it looks when it's on...
here is the code:
Where it says ModLoader.addArmor() you need to use one word for the armor such as ModLoader.addArmor("BHelmet") And then you have to put two textures called BHelmet_1 and BHelmet_2 inside of the folder that you specified.
Check out my Minecraft Modding Tutorials!
What kind of texture? the one used in "BHelmet.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/B helm.png");"? ore a new one?
You need a texture overlay. Look in the armor folder in minecraft.jar
Check out my Minecraft Modding Tutorials!
i can't get it to work, might you go more indepth? sorry if i have spelled anything wrong.
This is where my armor coding currently sits. Its still appearing as white boxes...
it says the system cannot find the path specified
Well I don't think it is possible to add a dye to a smelting recipe, from what I've read and have tried. I'll just get around it and add a crafting recipe to turn the dye into a new item that then can be furnaced. Only alternative I could think of.
<
package net.minecraft.src;
import java.util.Random;
public class mod_Agronyst extends BaseMod
{
public static final Item AgronystPickaxe = (new ItemPickaxe(200, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystPickaxe");
public static final Item AgronystAxe = (new ItemAxe(201, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystAxe");
public static final Item AgronystShovel = (new ItemSpade(202, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystShovel");
public static final Item AgronystSword = (new ItemSword(203, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystSword");
public static final Item AgronystHoe = (new ItemHoe(204, EnumToolMaterial.MATERIALAgronyst)).setItemName("AgronystHoe");
public static final Block AgronystOre = new BlockAgronystOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("oreAgronyst").setHardness(4.5F).setResistance(5F).setCreativeTab(CreativeTabs.tabBlock);;
public static final Item Agronyst = new Agronyst(5000).setItemName("Agronyst");
public void load()
{
AgronystPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/AgronystPickaxe.png");
AgronystAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/AgronystAxe.png");
AgronystShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/AgronystShovel.png");
AgronystSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/AgronystSword.png");
AgronystHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/AgronystHoe.png");
ModLoader.addRecipe(new ItemStack(AgronystPickaxe, 1), new Object [] {"###", " X ", " X ", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystShovel, 1), new Object [] {"#", "X", "X", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystSword, 1), new Object [] {"#", "#", "X", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystAxe, 1), new Object [] {"##", "#X ", " X", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystAxe, 1), new Object [] {"##", "X#", "X ", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystHoe, 1), new Object [] {"##", " X", " X", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addRecipe(new ItemStack(AgronystHoe, 1), new Object [] {"##", "X ", "X ", ('#'), Agronyst, ('X'), Item.stick});
ModLoader.addName(AgronystPickaxe, "Agronyst Pickaxe");
ModLoader.addName(AgronystAxe, "Agronyst Axe");
ModLoader.addName(AgronystShovel, "Agronyst Shovel");
ModLoader.addName(AgronystSword, "Agronyst Sword");
ModLoader.addName(AgronystHoe, "Agronyst Hoe");
AgronystOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/textures/AgronystOre.png");
ModLoader.registerBlock(AgronystOre);
ModLoader.addName(AgronystOre, "AgronystOre");
Agronyst.iconIndex = ModLoader.addOverride("/gui/items.png", "/textures/Agronyst.png");
ModLoader.addName(Agronyst, "Agronyst");
Agronyst.setTabToDisplayOn(CreativeTabs.tabMaterials);
}
public String getVersion()
{
return "1.3.2";
}
}
>
[Spoiler/]
This is the error i get when using the code above. This mod is supposed to make an agronyst ore with tools.
[Spoiler]
<
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\mcp\jars\.\crash-reports\crash-2012-09-10_17.03.02-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 797403af --------
Generated 10.09.12 17:03
- Minecraft Version: 1.3.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_04, Oracle Corporation
- Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 958279384 bytes (913 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
- JVM Flags: 3 total; -Xincgc -Xms1024M -Xmx1024M
- ModLoader: Mods loaded: 2
ModLoader 1.3.2
mod_Agronyst 1.3.2
java.lang.NullPointerException
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:189)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:507)
at net.minecraft.src.mod_Agronyst.load(mod_Agronyst.java:23)
at net.minecraft.src.ModLoader.init(ModLoader.java:952)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:186)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:86)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:404)
at net.minecraft.client.Minecraft.run(Minecraft.java:724)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT 5977b2b6 ----------
>
[Spoiler/]
Hope you can help me JBond:)
PS:Sorry, i dont know how to make spoilers:(
i'm not sure if this will help but, i think it's something wrong with the crafting recipe, i think the " Agronyst" is supposed to be "mod_ Agronyst.nameofitem" or something, not sure but test it.