If this is what you mean, I get the same errors :-\
EDIT I just modified the code. I took out the smelting recipe and put a crafting one in. Why would that effect it. Did I code the Smelting wrong :-/
EDIT 2 Ok something is really weird. Because I tried doing the smelting again (the code above is what i have) But the Light Ingot is still craftable.
Where are you compiling it? Were you able to run a successful compile before? I notice your path is, "src\minecraft\\net\minecraft\src\mod_*.java"
I marked in red what I think may be the problem. If that isn't it...
Is your ItemLightIngot class under the same path?
I notice that you didn't define the '#' character as dirt in your crafting recipe. Try that!
And sorry, I'm still new at programming in Java, but I want to help others to get my knowledge a bit more up there. Hope this fixes it!
Where are you compiling it? Were you able to run a successful compile before? I notice your path is, "src\minecraft\\net\minecraft\src\mod_*.java"
I marked in red what I think may be the problem. If that isn't it...
Is your ItemLightIngot class under the same path?
I have had Successful recompiles before and they are both under the same path I belive. :-\
I have had Successful recompiles before and they are both under the same path I belive. :-\
At this point, I don't know what else to go off of. (Noob to Java, long time programmer in .NET though. So I'm not new on how to code.) I've compared the errors with the samples, and I see no mis-typing. The only thing I can give you, is double check where your mod_*.java is, and where ItemLightIngot class is. That "src\minecraft\\net\" thing really throws me off.
Okay, gotcha on the first part.
Oooh, I think I get it. So, you shouldn't have two mod_Block classes. But you can have a mod_Block and a mod_Item class. Right? It took me a while, by my inner programmer finally kicked in.
Okay, here's an explanation.
You define all of your blocks, tools, items, etc. in your mod_ class. If you want to make an item, you make an ItemWhatever class, and if you want to make a block, make a BlockWhatever class. And in your mod_ class, you'd make it like this
public static final Block yourBlock = new BlockWhatever(200)
and it would read from the BlockWhatever class. Don't use more than one mod_ file with a single mod, this way is much more effective.
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.
You define all of your blocks, tools, items, etc. in your mod_ class. If you want to make an item, you make an ItemWhatever class, and if you want to make a block, make a BlockWhatever class. And in your mod_ class, you'd make it like this
public static final Block yourBlock = new BlockWhatever(200)
and it would read from the BlockWhatever class. Don't use more than one mod_ file with a single mod, this way is much more effective.
Yeah, I got it just a while back. I was supplied an example and have been on my way since. Thank you though.
Make a tutorial on how to make custom world types (default, superflat, large biomes) and select the biomes able to generate in the world type, along with vanilla structures (to disable strongholds, for example). I dont know if its too much but only the world type for custom biomes would be enough.
Make a tutorial on how to make custom world types (default, superflat, large biomes) and select the biomes able to generate in the world type, along with vanilla structures (to disable strongholds, for example). I dont know if its too much but only the world type for custom biomes would be enough.
Yeah, I got it just a while back. I was supplied an example and have been on my way since. Thank you though.
Shoulda read more, huh? Sorry. Haha.
Thanks for helping people on this thread.
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.
package net.minecraft.src;
import java.util.Random;
public class mod_Lightdirt extends BaseMod
{
//Lightdirt//
public static final Block Lightdirt = new BlockLightdirt (160, 0)
.setBlockName("Lightdirt").setHardness(0.5F).setLightValue(1.0F)
.setCreativeTab(CreativeTabs.tabBlock);
//Lightdirt
//Light Ingot//
public static final Item LightIngot=new ItemLightIngot(5000).setItemName("Light Ingot");
//Light Ingot//
//Lightonium Ore//
public static final Block LightOre = new BlockLightOre (161, 0)
.setBlockName("LightOre").setHardness(3.0F).setResistance(5.0F).setLightValue(0.8F)
.setCreativeTab(CreativeTabs.tabBlock);
//Lightonium Ore//
public void load()
{
//Light Ingot//
LightIngot.iconIndex=ModLoader.addOverride("/gui/items.png", "/LightIngot.png");
ModLoader.addName(LightIngot, "Light Ingot");
ModLoader.addSmelting(Block.dirt.blockID, new ItemStack ( LightIngot, 1), 0.1F);
//Light Ingot//
//Lightdirt//
Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightdirt.png");
ModLoader.registerBlock(Lightdirt);
ModLoader.addName(Lightdirt, "Lightdirt");
ModLoader.addRecipe(new ItemStack(Lightdirt, 2), new Object [] {"###", "#$#", "###",
Character.valueOf('#'), Block.dirt, Character.valueOf('$'), LightIngot});
//Lightdirt//
//Lightonium Ore//
LightOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightore.png");
ModLoader.registerBlock(LightOre);
ModLoader.addName(LightOre, "Lightonium Ore");
//Lightonium Ore//
}
//Lightonium Ore//
public void generateSurface (World world, Random random, int chunkX, int chunkZ)
{
for (int i=0; i < 2; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(LightOre.blockID, 10)).generate (world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
{
return "1.3.2";
}
}
Error:
src\minecraft\net\minecraft\src\mod_Lightdirt.java:16: error: cannot find symbol
public static final Block LightOre = new BlockLightOre (161, 0)
Check your capitalization for your BlockLightOre class maybe. Check for any spelling errors as well with anything related to LightOre or BlockLightOre.
I notice that you didn't define the '#' character as dirt in your crafting recipe. Try that!
And sorry, I'm still new at programming in Java, but I want to help others to get my knowledge a bit more up there. Hope this fixes it!
Thanks! Finally i can test 1 block and 2 items :D! Thanks!
1: You dont need a space after declaring your block a new Block
2: I dont see a semicolon
So it should be this:
public static final Block LightOre = new BlockLightOre(161, 0).setLightValue(0.8F).setHardness(3F).setResistance(5F).setBlockName("LightOre");
You realize his code already matches what you gave him? However, a few things are ordered first.
Were you basing your response off of his error output?
Grr... mcp's client keeps crashing on me with the error "Image not found: /geology/granite.png"
I've tried putting the "geology" folder in mcp/bin/minecraft; it doesn't work. Where should I put geology then?
So are you saying like this?
public void load() { LightIngot.iconIndex=ModLoader.addOverride("/gui/items.png", "/LightIngot.png"); ModLoader.addName(LightIngot, "Light Ingot"); ModLoader.addSmelting(Block.dirt.blockID, new ItemStack(Item.LightIngot, 1), 1.0F); //........... Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightdirt.png"); ModLoader.registerBlock(Lightdirt); ModLoader.addName(Lightdirt, "Lightdirt"); ModLoader.addRecipe(new ItemStack(Lightdirt, 2), new Object [] {"###", "#$#", "###", Character.valueOf('#'), Block.dirt, Character.valueOf('$'), Item.LightIngot}); } public String getVersion() { return "1.3.2"; } }EDIT I just modified the code. I took out the smelting recipe and put a crafting one in. Why would that effect it. Did I code the Smelting wrong :-/
EDIT 2 Ok something is really weird. Because I tried doing the smelting again (the code above is what i have) But the Light Ingot is still craftable.
Where are you compiling it? Were you able to run a successful compile before? I notice your path is, "src\minecraft\\net\minecraft\src\mod_*.java"
I marked in red what I think may be the problem. If that isn't it...
Is your ItemLightIngot class under the same path?
I notice that you didn't define the '#' character as dirt in your crafting recipe. Try that!
And sorry, I'm still new at programming in Java, but I want to help others to get my knowledge a bit more up there. Hope this fixes it!
I have had Successful recompiles before and they are both under the same path I belive. :-\
At this point, I don't know what else to go off of. (Noob to Java, long time programmer in .NET though. So I'm not new on how to code.) I've compared the errors with the samples, and I see no mis-typing. The only thing I can give you, is double check where your mod_*.java is, and where ItemLightIngot class is. That "src\minecraft\\net\" thing really throws me off.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffOkay, here's an explanation.
You define all of your blocks, tools, items, etc. in your mod_ class. If you want to make an item, you make an ItemWhatever class, and if you want to make a block, make a BlockWhatever class. And in your mod_ class, you'd make it like this
and it would read from the BlockWhatever class. Don't use more than one mod_ file with a single mod, this way is much more effective.
Yeah, I got it just a while back. I was supplied an example and have been on my way since. Thank you though.
Code:
package net.minecraft.src; import java.util.Random; public class mod_Lightdirt extends BaseMod { //Lightdirt// public static final Block Lightdirt = new BlockLightdirt (160, 0) .setBlockName("Lightdirt").setHardness(0.5F).setLightValue(1.0F) .setCreativeTab(CreativeTabs.tabBlock); //Lightdirt //Light Ingot// public static final Item LightIngot=new ItemLightIngot(5000).setItemName("Light Ingot"); //Light Ingot// //Lightonium Ore// public static final BlockLightOre = new BlockLightOre (161, 0) .setBlockName("LightOre").setHardness(3.0F).setResistance(5.0F).setLightValue(0.8F) .setCreativeTab(CreativeTabs.tabBlock); //Lightonium Ore// public void load() { //Light Ingot// LightIngot.iconIndex=ModLoader.addOverride("/gui/items.png", "/LightIngot.png"); ModLoader.addName(LightIngot, "Light Ingot"); ModLoader.addSmelting(Block.dirt.blockID, new ItemStack ( LightIngot, 1), 0.1F); //Light Ingot// //Lightdirt// Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightdirt.png"); ModLoader.registerBlock(Lightdirt); ModLoader.addName(Lightdirt, "Lightdirt"); ModLoader.addRecipe(new ItemStack(Lightdirt, 2), new Object [] {"###", "#$#", "###", Character.valueOf('#'), Block.dirt, Character.valueOf('$'), LightIngot}); //Lightdirt// //Lightonium Ore// LightOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightore.png"); ModLoader.registerBlock(LightOre); ModLoader.addName(LightOre, "Lightonium Ore"); //Lightonium Ore// } //Lightonium Ore// public void generateSurface (World world, Random random, int chunkX, int chunkZ) { for (int i=0; i < 2; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(LightOre.blockID, 10)).generate (world, random, randPosX, randPosY, randPosZ); } } public String getVersion() { return "1.3.2"; } }Error:
Google is your best friend.
You never declared it as a block or an item after public static final.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffShoulda read more, huh? Sorry. Haha.
Thanks for helping people on this thread.
Code:
package net.minecraft.src; import java.util.Random; public class mod_Lightdirt extends BaseMod { //Lightdirt// public static final Block Lightdirt = new BlockLightdirt (160, 0) .setBlockName("Lightdirt").setHardness(0.5F).setLightValue(1.0F) .setCreativeTab(CreativeTabs.tabBlock); //Lightdirt //Light Ingot// public static final Item LightIngot=new ItemLightIngot(5000).setItemName("Light Ingot"); //Light Ingot// //Lightonium Ore// public static final Block LightOre = new BlockLightOre (161, 0) .setBlockName("LightOre").setHardness(3.0F).setResistance(5.0F).setLightValue(0.8F) .setCreativeTab(CreativeTabs.tabBlock); //Lightonium Ore// public void load() { //Light Ingot// LightIngot.iconIndex=ModLoader.addOverride("/gui/items.png", "/LightIngot.png"); ModLoader.addName(LightIngot, "Light Ingot"); ModLoader.addSmelting(Block.dirt.blockID, new ItemStack ( LightIngot, 1), 0.1F); //Light Ingot// //Lightdirt// Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightdirt.png"); ModLoader.registerBlock(Lightdirt); ModLoader.addName(Lightdirt, "Lightdirt"); ModLoader.addRecipe(new ItemStack(Lightdirt, 2), new Object [] {"###", "#$#", "###", Character.valueOf('#'), Block.dirt, Character.valueOf('$'), LightIngot}); //Lightdirt// //Lightonium Ore// LightOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/lightore.png"); ModLoader.registerBlock(LightOre); ModLoader.addName(LightOre, "Lightonium Ore"); //Lightonium Ore// } //Lightonium Ore// public void generateSurface (World world, Random random, int chunkX, int chunkZ) { for (int i=0; i < 2; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(LightOre.blockID, 10)).generate (world, random, randPosX, randPosY, randPosZ); } } public String getVersion() { return "1.3.2"; } }Error:
Check your capitalization for your BlockLightOre class maybe. Check for any spelling errors as well with anything related to LightOre or BlockLightOre.
Haha probably a bit more
And sure, what's a community if there's no help, right?
Thanks! Finally i can test 1 block and 2 items :D! Thanks!
First off, there are 2 errors:
1: You dont need a space after declaring your block a new Block
2: I dont see a semicolon
So it should be this:
public static final Block LightOre = new BlockLightOre(161, 0).setLightValue(0.8F).setHardness(3F).setResistance(5F).setBlockName("LightOre");Sure! Glad I could help!
You realize his code already matches what you gave him? However, a few things are ordered first.
Were you basing your response off of his error output?
Did you misspell the class BlockLightOre? The names are case sensitive
I've tried putting the "geology" folder in mcp/bin/minecraft; it doesn't work. Where should I put geology then?
nope