I do have modloader in the Bin files, and I'm using Java Eclipse to write new files. The problem is that the recipe for the new block only wants to recognize the obsidian. It reacts as if the diamond is some sort of random file.
Bartboy, I'll try your idea.Added coma. Still Errors.
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.
//declaring
public static final Block Shard = new BlockShard(200, 0).setBlockName("Shard").setHardness(2F).setResistance(3F).setLightValue(0.2F);
public void load(){
//tells minecraft that you are using a custom texture
Shard.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Shardstoneblock.png");
//adds the block into minecraft and creates all of its variables
ModLoader.registerBlock(Shard);
//sets the name of the block
ModLoader.addName(Shard, "Angel Stone");
//creates a crafting recipe for our block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[] {"###", "#X#", "###", '#', Block.obsidian, 'X', Block.diamond});
}
//sets the version number of our whole mod
public String getVersion(){
return "AngelStone mod v0.1";
}
}As of the time of posting, this is the full file. Cutter, stay calm. Go for a walk if you must.
//declaring
public static final Block Shard = new BlockShard(200, 0).setBlockName("Shard").setHardness(2F).setResistance(3F).setLightValue(0.2F);
public void load(){
//tells minecraft that you are using a custom texture
Shard.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Shardstoneblock.png");
//adds the block into minecraft and creates all of its variables
ModLoader.registerBlock(Shard);
//sets the name of the block
ModLoader.addName(Shard, "Angel Stone");
//creates a crafting recipe for our block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[] {"###", "#X#", "###", '#', Block.obsidian, 'X', Block.diamond});
}
//sets the version number of our whole mod
public String getVersion(){
return "AngelStone mod v0.1";
}
}
As of the time of posting, this is the full file. Cutter, stay calm. Go for a walk if you must.
Use code tags for code.
There is no Block.Shard, it should just be Shard. There is also no Block.diamond, it should be Item.diamond
Yes, yes yes...
The Block.diamond was an oversight on my part, and just for the record:
This is my first mod, and it isn't that bad for having learned to code in one night, at 3am.
public void load(){
//tells minecraft that you are using a custom texture
Shard.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Shardstoneblock.png");
//adds the block into minecraft and creates all of its variables
ModLoader.registerBlock(Shard);
//sets the name of the block
ModLoader.addName(Shard, "Angel Stone");
//creates a crafting recipe for our block
ModLoader.addRecipe(new ItemStack(mod_AngelStone.Shard, 1), new Object[] {"###", "#X#", "###", '#', Block.obsidian, 'X', Item.diamond});
Cutter, why don't you and Miller just duke it out? You're each saying something different. Basically contradicting each-other, and yet you insult my intelligence.
cannot find symbol symbol : variable Shard
location: class net.minecraft.src.Block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[]
{"###", "#X#", "###", '#', Block.obsidian, 'X' Item.diamond});
cannot find symbol symbol : variable diamond
location: class net.minecraft.src.Block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[]
{"###", "#X#", "###", '#', Block.obsidian, 'X' Item.diamond});
I'm not sure how to resolve this, without having to edit the crafting directory itself.
I'd appreciate it if anyone could help.
^
Comma here
Bartboy, I'll try your idea.Added coma. Still Errors.
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[]
{"###", "#X#", "###", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.diamond});
You should define your block in your mod_ class.
import java.util.Map;
import java.util.Random;
public class mod_AngelStone extends BaseMod{
//declaring
public static final Block Shard = new BlockShard(200, 0).setBlockName("Shard").setHardness(2F).setResistance(3F).setLightValue(0.2F);
public void load(){
//tells minecraft that you are using a custom texture
Shard.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Shardstoneblock.png");
//adds the block into minecraft and creates all of its variables
ModLoader.registerBlock(Shard);
//sets the name of the block
ModLoader.addName(Shard, "Angel Stone");
//creates a crafting recipe for our block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[] {"###", "#X#", "###", '#', Block.obsidian, 'X', Block.diamond});
}
//sets the version number of our whole mod
public String getVersion(){
return "AngelStone mod v0.1";
}
}As of the time of posting, this is the full file. Cutter, stay calm. Go for a walk if you must.
You only use Block. or Item. when calling for vanilla stuff, or things defined in the Block or Item file.
Use code tags for code.
There is no Block.Shard, it should just be Shard. There is also no Block.diamond, it should be Item.diamond
#1. Block.Diamond was changed to Item.diamond
#2. Only one error is found now when recompiling.
cannot find symbol symbol : variable Shard
location: class net.minecraft.src.Block
ModLoader.addRecipe(new ItemStack(Block.Shard, 1), new Object[]
{"###", "#X#", "###", '#', Block.obsidian, 'X', Item.diamond});
^
Did you even read what I posted?
The Block.diamond was an oversight on my part, and just for the record:
This is my first mod, and it isn't that bad for having learned to code in one night, at 3am.
ModLoader.addRecipe(new ItemStack(Shard, 1), new Object[] {"###", "#X#", "###", '#', Block.obsidian, 'X', Item.diamond});
This Recompiles Properly, with no errors.