If you mean the mod_blah then no. I have separate ones for each thing.
mod_CrystalOre:
package net.minecraft.src;
import java.util.Random;
public class mod_CrystalOre extends BaseMod
{
public static final Block CrystalOre = new BlockCrystalOre(160, 0).setBlockName("crystalore").setHardness(3F).setResistance(5F).setLightValue(0.5F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep);
public void load()
{
CrystalOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crystalore.png");
ModLoader.registerBlock(CrystalOre);
ModLoader.addName(CrystalOre, "Crystal Ore");
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 5; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(CrystalOre.blockID, 5)).generate(world, random, randPosX, randPosY, randPosZ);}
}
public String getVersion()
{
return "1.3.2";
}
}
mod_CrystalFragment:
package net.minecraft.src;
public class mod_CrystalFragment extends BaseMod
{
public static final Item CrystalFragment = new ItemCrystalFragment(4000).setItemName("CrystalFragment");
public void load()
{
CrystalFragment.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalfragment.png");
ModLoader.addName(CrystalFragment, "Crystal Fragment");
}
public String getVersion()
{
return "1.3.2";
}
}
mod_CrystalPowder:
package net.minecraft.src;
public class mod_CrystalPowder extends BaseMod
{
public static final Item CrystalPowder = new ItemCrystalPowder(4001).setItemName("CrystalPowder");
private static final Object CrystalFragment = null;
public void load()
{
CrystalPowder.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalpowder.png");
ModLoader.addName(CrystalPowder, "Crystal Powder");
ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {CrystalFragment});
}
public String getVersion()
{
return "1.3.2";
}
}
Those are all I have right now. If you need the class codes for them let me know.
I really have no idea what I'm suppose to do as I'm very new to this. If I am doing something wrong and I do look like a jack ass please let me know so I can correct my mistakes.
You're not supposed to have more than one mod_file. Define them all in one mod_ file (per mod) or they will be treated as different mods. I'll do it for you.
Your fixed mod_CrystalMod file:
package net.minecraft.src;
import java.util.Random;
public class mod_CrystalMod extends BaseMod {
public static final Item CrystalPowder = new ItemCrystalPowder(4001).setItemName("CrystalPowder");
private static final Item CrystalFragment = new Item(4002).setItemName("CrystalFragment");
public static final Block CrystalOre = new BlockCrystalOre(160, 0).setBlockName("crystalore").setHardness(3F).setResistance(5F).setLightValue(0.5F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep);
public void load() {
CrystalPowder.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalpowder.png");
CrystalFragment.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalfragment.png");
CrystalOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crystalore.png");
ModLoader.addName(CrystalPowder, "Crystal Powder");
ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {CrystalFragment});
ModLoader.registerBlock(CrystalOre);
ModLoader.addName(CrystalOre, "Crystal Ore");
ModLoader.addName(CrystalFragment, "Crystal Fragment");
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 5; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(CrystalOre.blockID, 5)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
}
You actually defined the same item three different times. I may have forgotten some things, but that's the basic fixed file.
I also recommend you put your textures in a folder of their own. Say you put them in a folder; your directories would be
"/CrystalMod/textureNameHere.png"
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Oh my god x.x I would have never figured that out. I really appreciate the help, believe me. Chances are I'll be needing more help in the future though xD Thank you a lot for this though I'm sure a lot of other users appreciate this too.
No problem, (and good job other people) that is what most of us come back here for.
Oh my god x.x I would have never figured that out. I really appreciate the help, believe me. Chances are I'll be needing more help in the future though xD Thank you a lot for this though I'm sure a lot of other users appreciate this too.
Don't worry, I used to make multiple mod files when I was starting out, too. I made a mod_ file for everything but the ore at one time, because I thought the generating method couldn't be in the same class.
I have since improved. Like, a lot. My mod was actually started in December 2011, but I completely rewrote it. Three times. Third time's the charm.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Haha wow. Well I'm glad I'm not the only one who has made these kinds of mistakes. Hopefully I can get the hang of this stuff soon so I won't have to keep bugging you guys about it x)
Everyone needs help once in a while. That's why this thread is here.
Trust me, even if it takes a while, you'll get used to it. But I'll warn you of this: you may get tunnel vision and not venture out to try new things (GUIs, bows, anything else that's particularly advanced), but trust me; it's worth it. Trying things like that may also teach you new ways of doing other things.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Well I really appreciate the advice The crystal mod I'm working on actually has a crystal bow and crystal tools in there. I looked at the tools code on the main post and I'm really questioning whether I should even try or not xD
Tools: Definitely, I'm actually looking forward to this mod, I like the idea.
Bow: Maybe a bit later, when all the major features are added (i.e. tools, bug fixes, and you're just looking to add more features)
Suggestions: dyed crystals or maybe several crystals of different color, strength, and ability. That'd be awesome.
Look in to ForgeModLoader. I love ModLoader's simplicity, but this makes your life easier (your tools will be able to be enchanted, you can directly port from ModLoader to FML [FML has a ModLoader.java that has all the ModLoader methods, but are actually just pointing to methods defined elsewhere], and it has a nice API for spritesheets and adding new EnumToolMaterial/Armor constants). There are a few things that will need to be changed but I'll be glad to help if you set it up; you'll have to put all of your item/block textures in a spritesheet (this allows for infinite sprite/block indices) and your ore generation will have to be modified (not the method itself, but it will have to be in a different class). I could go on, but that's only if you use Forge. I don't want to get too in to it, or I'll end up making a tutorial myself.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Haha I'll definitely look into How Forge works and try to work with that.
And I plan on making this mod with a lot of features (armor, tools, a glowstone like block, maybe being able to drop glowing powder like redstone wire). I didn't think about dyed crystals, but that sounds like a really great idea I wanted to go the whole 9 yards with this. I know there are about a hundred crystal mods already, but I figured this would be a good starting ground for getting the hang of how codes work and the structure of it all.
Well, I think of it like this: if there are mods that do some or all of the same things mine does, I try to make mine do it better. Just because it isn't original doesn't mean it's not different. Plus, if you thought of it, it'll probably stand out from all of the other ones. For example, mine adds tools, a paxel, some blocks, and a bunch of other stuff; all with a few special features, too.
For example, the compressed ore block, if special conditions are met, enchants an item with some specified enchantments.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
How do I make a helmet that lights up and torches? I was scanning through the tutorials and didn't find anything on custom torches...
Minecraft's lighting engine doesn't support mobile light sources at the moment.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
With the potion effects for foods, can it be set for blocks too
For example, the method onEntityCollidedWithBlock in the Block file, can I somehow make it when you enter my block (It is a fluid), it will give you a potion effect, How do you do this? It would be a great help if you can help me here
Oh my god x.x I would have never figured that out. I really appreciate the help, believe me. Chances are I'll be needing more help in the future though xD Thank you a lot for this though I'm sure a lot of other users appreciate this too.
If I did this with My CreeperBerry and CreeperBerrySeed Files, Would Minecraft work?
CreepeBerrySeed:
package net.minecraft.src;
public class mod_CreeperBerrySeed extends BaseMod
{
public static final Item CreeperBerrySeed = new ItemCreeperBerrySeed(2013).setItemName("CreeperBerrySeed");
public void load()
{
CreeperBerrySeed.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerryseed.png");
ModLoader.addName(CreeperBerrySeed, "CreeperBerrySeed");
}
public String getVersion()
{
return "1.3.2";
}
}
CreeperBerry:
package net.minecraft.src;
public class mod_CreeperBerry extends BaseMod
{
public static final Item CreeperBerry = (new ItemFood(2012, 4, 1F, false).setItemName("CreeperBerry"));
public void load()
{
CreeperBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerry.png");
ModLoader.addName(CreeperBerry, "CreeperBerry");
}
public String getVersion()
{
return "1.3.2";
}
}
Problem is, how would I merge these two together? I've already tried, But Minecraft crashed
package net.minecraft.src;
import java.util.Random;
public class mod_CreeperBerryPlant extends BaseMod {
public static final Item CreeperBerrySeed = new ItemCreeperBerrySeed(2013).setItemName("CreeperBerrySeed");
public static final Item CreeperBerry = (new ItemFood(2012, 4, 1F, false).setItemName("CreeperBerry"));
public void load() {
CreeperBerrySeed.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerryseed.png");
CreeperBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerry.png");
ModLoader.addName(CreeperBerrySeed, "CreeperBerrySeed");
ModLoader.addShapelessRecipe(new ItemStack(CreeperBerrySeed, 1), new Object [] {CreeperBerry});
ModLoader.addName(CreeperBerry, "CreeperBerry");
)
)
)
(Man, I didn't think it would be this difficult to create a simple shapeless crafting recipe )
To get to the src files from the game in Eclipse, on the left, click 'Client', 'src', 'net.minecraft.src'.
Huh? What?
That doesn't make any sense. Are you trying to tell me to get the source files from Minecraft, I have to go into the Package Explorer, click on Client, then src, and then hope for a 'net.minecraft.src' to be there? The 'src' file on my Java project is empty.
Do I import the files myself? I right-clicked 'src', clicked Import, and imported the src folder MCP decompiled for me. I wound up with roughly 5,000 'cannot be resolved' errors. You wanted me to put the errors in spoilers, but I'll just put a sample or two here:
ARBMultiTexture cannot be resolved (Resource: Cryptmanager.java, Path:/Client/src, Location: line 182, Type: Java Problem)
Though I doubt this was the kind of error you had in mind, as it doesn't show up in code.
Can you clarify what your sentence meant for me?
Rollback Post to RevisionRollBack
Check out Boats Evolved; the fancy huge customizable boats Notch tweeted about brought to life!
That doesn't make any sense. Are you trying to tell me to get the source files from Minecraft, I have to go into the Package Explorer, click on Client, then src, and then hope for a 'net.minecraft.src' to be there? The 'src' file on my Java project is empty.
Do I import the files myself? I right-clicked 'src', clicked Import, and imported the src folder MCP decompiled for me. I wound up with roughly 5,000 'cannot be resolved' errors. You wanted me to put the errors in spoilers, but I'll just put a sample or two here:
Did you set your workspace in Eclipse to be *\mcp\eclipse?
I can't quite seem to implement this myself. Maybe it's far too early in the morning for me,
but it can't seem to find my actual block. It will find its ingots, and pickaxe...but not the block itself.
And would this go into the pre-existing ItemPickaxe, or one I made?
Suggestions?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou're not supposed to have more than one mod_file. Define them all in one mod_ file (per mod) or they will be treated as different mods. I'll do it for you.
Your fixed mod_CrystalMod file:
package net.minecraft.src; import java.util.Random; public class mod_CrystalMod extends BaseMod { public static final Item CrystalPowder = new ItemCrystalPowder(4001).setItemName("CrystalPowder"); private static final Item CrystalFragment = new Item(4002).setItemName("CrystalFragment"); public static final Block CrystalOre = new BlockCrystalOre(160, 0).setBlockName("crystalore").setHardness(3F).setResistance(5F).setLightValue(0.5F).setCreativeTab(CreativeTabs.tabBlock).setStepSound(Block.soundStoneFootstep); public void load() { CrystalPowder.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalpowder.png"); CrystalFragment.iconIndex = ModLoader.addOverride("/gui/items.png", "/crystalfragment.png"); CrystalOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crystalore.png"); ModLoader.addName(CrystalPowder, "Crystal Powder"); ModLoader.addShapelessRecipe(new ItemStack(CrystalPowder, 4), new Object [] {CrystalFragment}); ModLoader.registerBlock(CrystalOre); ModLoader.addName(CrystalOre, "Crystal Ore"); ModLoader.addName(CrystalFragment, "Crystal Fragment"); } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { for(int i = 0; i < 5; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(CrystalOre.blockID, 5)).generate(world, random, randPosX, randPosY, randPosZ); } } }You actually defined the same item three different times. I may have forgotten some things, but that's the basic fixed file.
I also recommend you put your textures in a folder of their own. Say you put them in a folder; your directories would be
"/CrystalMod/textureNameHere.png"
And it would be way more organized.
Check what b0mbshell posted.
*Persocom
But I love you anyways. I guess I should lay off on using mine.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNo problem, (and good job other people) that is what most of us come back here for.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffDon't worry, I used to make multiple mod files when I was starting out, too. I made a mod_ file for everything but the ore at one time, because I thought the generating method couldn't be in the same class.
I have since improved. Like, a lot. My mod was actually started in December 2011, but I completely rewrote it. Three times. Third time's the charm.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffEveryone needs help once in a while. That's why this thread is here.
Trust me, even if it takes a while, you'll get used to it. But I'll warn you of this: you may get tunnel vision and not venture out to try new things (GUIs, bows, anything else that's particularly advanced), but trust me; it's worth it. Trying things like that may also teach you new ways of doing other things.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffTools: Definitely, I'm actually looking forward to this mod, I like the idea.
Bow: Maybe a bit later, when all the major features are added (i.e. tools, bug fixes, and you're just looking to add more features)
Suggestions: dyed crystals or maybe several crystals of different color, strength, and ability. That'd be awesome.
Look in to ForgeModLoader. I love ModLoader's simplicity, but this makes your life easier (your tools will be able to be enchanted, you can directly port from ModLoader to FML [FML has a ModLoader.java that has all the ModLoader methods, but are actually just pointing to methods defined elsewhere], and it has a nice API for spritesheets and adding new EnumToolMaterial/Armor constants). There are a few things that will need to be changed but I'll be glad to help if you set it up; you'll have to put all of your item/block textures in a spritesheet (this allows for infinite sprite/block indices) and your ore generation will have to be modified (not the method itself, but it will have to be in a different class). I could go on, but that's only if you use Forge. I don't want to get too in to it, or I'll end up making a tutorial myself.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffWell, I think of it like this: if there are mods that do some or all of the same things mine does, I try to make mine do it better. Just because it isn't original doesn't mean it's not different. Plus, if you thought of it, it'll probably stand out from all of the other ones. For example, mine adds tools, a paxel, some blocks, and a bunch of other stuff; all with a few special features, too.
For example, the compressed ore block, if special conditions are met, enchants an item with some specified enchantments.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffMinecraft's lighting engine doesn't support mobile light sources at the moment.
What about custom torches? Like colored?
For example, the method onEntityCollidedWithBlock in the Block file, can I somehow make it when you enter my block (It is a fluid), it will give you a potion effect, How do you do this? It would be a great help if you can help me here
Thanks
If I did this with My CreeperBerry and CreeperBerrySeed Files, Would Minecraft work?
CreepeBerrySeed:
package net.minecraft.src; public class mod_CreeperBerrySeed extends BaseMod { public static final Item CreeperBerrySeed = new ItemCreeperBerrySeed(2013).setItemName("CreeperBerrySeed"); public void load() { CreeperBerrySeed.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerryseed.png"); ModLoader.addName(CreeperBerrySeed, "CreeperBerrySeed"); } public String getVersion() { return "1.3.2"; } }CreeperBerry:
package net.minecraft.src; public class mod_CreeperBerry extends BaseMod { public static final Item CreeperBerry = (new ItemFood(2012, 4, 1F, false).setItemName("CreeperBerry")); public void load() { CreeperBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerry.png"); ModLoader.addName(CreeperBerry, "CreeperBerry"); } public String getVersion() { return "1.3.2"; } }Problem is, how would I merge these two together? I've already tried, But Minecraft crashed
package net.minecraft.src; import java.util.Random; public class mod_CreeperBerryPlant extends BaseMod { public static final Item CreeperBerrySeed = new ItemCreeperBerrySeed(2013).setItemName("CreeperBerrySeed"); public static final Item CreeperBerry = (new ItemFood(2012, 4, 1F, false).setItemName("CreeperBerry")); public void load() { CreeperBerrySeed.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerryseed.png"); CreeperBerry.iconIndex = ModLoader.addOverride("/gui/items.png", "/CreeperBerry.png"); ModLoader.addName(CreeperBerrySeed, "CreeperBerrySeed"); ModLoader.addShapelessRecipe(new ItemStack(CreeperBerrySeed, 1), new Object [] {CreeperBerry}); ModLoader.addName(CreeperBerry, "CreeperBerry"); ) ) )(Man, I didn't think it would be this difficult to create a simple shapeless crafting recipe
Huh? What?
That doesn't make any sense. Are you trying to tell me to get the source files from Minecraft, I have to go into the Package Explorer, click on Client, then src, and then hope for a 'net.minecraft.src' to be there? The 'src' file on my Java project is empty.
Do I import the files myself? I right-clicked 'src', clicked Import, and imported the src folder MCP decompiled for me. I wound up with roughly 5,000 'cannot be resolved' errors. You wanted me to put the errors in spoilers, but I'll just put a sample or two here:
Can you clarify what your sentence meant for me?
Thank You!
Since I now know how to add Recipe's I'm one step closer to releasing my mod.
Did you set your workspace in Eclipse to be *\mcp\eclipse?
I can't quite seem to implement this myself. Maybe it's far too early in the morning for me,
but it can't seem to find my actual block. It will find its ingots, and pickaxe...but not the block itself.
And would this go into the pre-existing ItemPickaxe, or one I made?
Suggestions?
For the love of all things derp...I should have known.
Thanks.
No, I had to find that out in a separate thread. All these tutorials either leave something out or word something oddly :\