hey, i create a sword, but now i would add if i kill a Mob, thats the mob drops something random. So 5% chance to drop a Gold Sword. If i add a Random Function to hitEntity ingame it dont work.
i dont know how to put it strait into the sword but you can put it in the mobs entity file;
you can look in EntityZombie for this line
protected void dropRareDrop(int par1)
{
switch (rand.nextInt(4))
{
case 0:
dropItem(Item.swordSteel.shiftedIndex, 1);
break;
case 1:
dropItem(Item.helmetSteel.shiftedIndex, 1);
break;
case 2:
dropItem(Item.ingotIron.shiftedIndex, 1);
break;
case 3:
dropItem(Item.shovelSteel.shiftedIndex, 1);
break;
}
}
I just installed JDK and MCP, decompiled MCP, but when i try to read any of the .java files, Windows says it doesn't know what program to use. I looked at the list of programs, and JDK didn't appear there (and more than just the "recomended programs").
I tried telling it to install JDK again, but my computer said it was already installed (thus I didn't go through with it.)
I'm probably missing something big and obvious that's glaring me right in the face, but I just don't see it.
I just installed JDK and MCP, decompiled MCP, but when i try to read any of the .java files, Windows says it doesn't know what program to use. I looked at the list of programs, and JDK didn't appear there (and more than just the "recomended programs").
I tried telling it to install JDK again, but my computer said it was already installed (thus I didn't go through with it.)
I'm probably missing something big and obvious that's glaring me right in the face, but I just don't see it.
I also registered JDK, but to no avail.
I would suggest getting eclipse, but if you don't want to do that, you can just use "open with" and select notepad, at least that is what I did, I think.
package net.minecraft.src;
public class mod_SpikedPlate
{
public static final Block SpikedPlate = new BlockSpikedPlate(170,0) .setBlockName ("SpikedPlate").setHardness(2F).setResistance(1F)
public void load()
{
SpikedPlate.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mods/Spiked Plate.png");
ModLoader.registerBlock(Namehere);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
}
BlockSpikedPlate
package net.minecraft.src;
import java.util.Random;
public class BlockSpikedPlate extends Block
{
public BlockSpikedPlate(int i, int j)
{
super(i, j, Material.cactus);
}
public int idDropped(int i, Random random, int j)
{
return mod_SpikedPlate.SpikedPlate.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}}
Your mod_ code should look like this, you need to remember to use your item's/block's instance name everywhere in the class:
public class mod_SpikedPlate extends BaseMod
{
public static final Block SpikedPlate = new BlockSpikedPlate(170,0) .setBlockName("SpikedPlate").setHardness(2F).setResistance(1F);
public void load()
{
SpikedPlate.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mods/Spiked Plate.png");
ModLoader.registerBlock(SpikedPlate);
ModLoader.addName(SpikedPlate, "Spiked Plate");
ModLoader.addRecipe(new ItemStack(SpikedPlate, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
hey in your main post it said you were making 1 or 2 tutorials every week .. and since iv joined this post you dint even add 1 ...
i know you helped me alot .. but when are you going to do the advance stuff ?? like animations like the piston ??
Buildcraft engine uses that animation .. but i have no idea how ..
and i tihnk maby you sould doe the damage value tutorials becose that one is eazy lol .. its not hard at all to do it ..
anny way i am waiting for the advanced stuff .. becose almost no tutotrial makes is doing that ..
Actually, I've added three. I added the biome, and the additional information about mobs. I've also updated within 1-2 days of updates being released.
On the OP, I actually said "I try to make...". You see that big word there, it says try. I have other commitments too in my life. These tutorials aren't my number 1 priorities. I also have school, work, and my own modding. You are better off finding out how to do the animations yourself. They are hard as it is, even harder to make a tutorial on.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hi, thanks for these tutorials, they've helped me alot and I'd be nowhere without them. However, I have an error when trying to add a smelting recipe. I'm trying to get an item called YellowCobbleStone smelt into YellowStone.
mod_YellowStone:
package net.minecraft.src;
public class mod_YellowStone extends BaseMod
{
public static final Block YellowStone = new BlockYellowStone(172, 0).setBlockName("YellowStone").setHardness(3F).setResistance(4F);
public void load()
{
YellowStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Yellow.png");
ModLoader.registerBlock(YellowStone);
ModLoader.addName(YellowStone, "Yellow Stone");
ModLoader.addRecipe(new ItemStack(YellowStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)});
ModLoader.addSmelting(YellowCobbleStone.blockID, new ItemStack(YellowStone, 1));
}
public String getVersion()
{
return "1.2.5";
}
}
The error that I get:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_YellowStone.java:13: error: cannot find symb
ol
ModLoader.addSmelting(YellowCobbleStone.blockID,
new ItemStack(YellowStone, 1));
^
symbol: variable YellowCobbleStone
location: class mod_YellowStone
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Thanks in advance!
Rollback Post to RevisionRollBack
-Musician for mods including The Betweenlands and Arcticraft-
Hi, thanks for these tutorials, they've helped me alot and I'd be nowhere without them. However, I have an error when trying to add a smelting recipe. I'm trying to get an item called YellowCobbleStone smelt into YellowStone.
mod_YellowStone:
package net.minecraft.src;
public class mod_YellowStone extends BaseMod
{
public static final Block YellowStone = new BlockYellowStone(172, 0).setBlockName("YellowStone").setHardness(3F).setResistance(4F);
public void load()
{
YellowStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Yellow.png");
ModLoader.registerBlock(YellowStone);
ModLoader.addName(YellowStone, "Yellow Stone");
ModLoader.addRecipe(new ItemStack(YellowStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)});
ModLoader.addSmelting(YellowCobbleStone.blockID, new ItemStack(YellowStone, 1));
}
public String getVersion()
{
return "1.2.5";
}
}
The error that I get:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_YellowStone.java:13: error: cannot find symb
ol
ModLoader.addSmelting(YellowCobbleStone.blockID,
new ItemStack(YellowStone, 1));
^
symbol: variable YellowCobbleStone
location: class mod_YellowStone
1 error
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Thanks in advance!
Where did you create your YellowCobbleStone block?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Where did you create your YellowCobbleStone block?
They're all in the same folder, the src one with all the other files of the game. I don't know if you need this, but here's the code for mod_YellowCobbleStone:
package net.minecraft.src;
public class mod_YellowCobbleStone extends BaseMod
{
public static final Block YellowCobbleStone = new BlockYellowCobbleStone(182, 0).setBlockName("YellowCobbleStone").setHardness(3F).setResistance(4F);
public void load()
{
YellowCobbleStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YellowC.png");
ModLoader.registerBlock(YellowCobbleStone);
ModLoader.addName(YellowCobbleStone, "Yellow Cobblestone");
ModLoader.addRecipe(new ItemStack(YellowCobbleStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.cobblestone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)});
}
public String getVersion()
{
return "1.2.5";
}
}
and here's BlockYellowCobbleStone:
package net.minecraft.src;
import java.util.Random;
public class BlockYellowCobbleStone extends Block
{
public BlockYellowCobbleStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_YellowCobbleStone.YellowCobbleStone.blockID;
}
public int qualityDropped(Random random)
{
return 1;
}}
Rollback Post to RevisionRollBack
-Musician for mods including The Betweenlands and Arcticraft-
I thank you for these tutorials. They seem very nice, but I'm having some issues with modloader.
Here's my code:(I didn't rename anything that you had because I'm lazy.)
mod_Block:
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block Namehere = new BlockNamehere(160, 1).setBlockName("anynamehere").setHardness
(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Modloader.registerBlock(Namehere);
Modloader.addName(Namehere, "In Game Name Here");
Modloader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf
('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}</
I won't post the block code(but I do have it) because none of my errors were from it.
Here's my error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_01\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Block.java:10: error: cannot find symbol
Modloader.registerBlock(Namehere);
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:11: error: cannot find symbol
Modloader.addName(Namehere, "In Game Name Here")
;
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:12: error: cannot find symbol
Modloader.addRecipe(new ItemStack(Namehere, 1),
new Object [] {"#", Character.valueOf
^
symbol: variable Modloader
location: class mod_Block
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
They're all in the same folder, the src one with all the other files of the game. I don't know if you need this, but here's the code for mod_YellowCobbleStone:
package net.minecraft.src;
public class mod_YellowCobbleStone extends BaseMod
{
public static final Block YellowCobbleStone = new BlockYellowCobbleStone(182, 0).setBlockName("YellowCobbleStone").setHardness(3F).setResistance(4F);
public void load()
{
YellowCobbleStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YellowC.png");
ModLoader.registerBlock(YellowCobbleStone);
ModLoader.addName(YellowCobbleStone, "Yellow Cobblestone");
ModLoader.addRecipe(new ItemStack(YellowCobbleStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.cobblestone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)});
}
public String getVersion()
{
return "1.2.5";
}
}
and here's BlockYellowCobbleStone:
package net.minecraft.src;
import java.util.Random;
public class BlockYellowCobbleStone extends Block
{
public BlockYellowCobbleStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_YellowCobbleStone.YellowCobbleStone.blockID;
}
public int qualityDropped(Random random)
{
return 1;
}}
Everything should be kept in one mod_ class. Merge it all into one, then your smelting recipe should get no errors when trying to reference to YellowCobbleStone.
I thank you for these tutorials. They seem very nice, but I'm having some issues with modloader.
Here's my code:(I didn't rename anything that you had because I'm lazy.)
mod_Block:
package net.minecraft.src;
public class mod_Block extends BaseMod
{
public static final Block Namehere = new BlockNamehere(160, 1).setBlockName("anynamehere").setHardness
(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Modloader.registerBlock(Namehere);
Modloader.addName(Namehere, "In Game Name Here");
Modloader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf
('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}</
I won't post the block code(but I do have it) because none of my errors were from it.
Here's my error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_01\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Block.java:10: error: cannot find symbol
Modloader.registerBlock(Namehere);
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:11: error: cannot find symbol
Modloader.addName(Namehere, "In Game Name Here")
;
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:12: error: cannot find symbol
Modloader.addRecipe(new ItemStack(Namehere, 1),
new Object [] {"#", Character.valueOf
^
symbol: variable Modloader
location: class mod_Block
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Please help me, I would truly appreciate it.
Modloader
needs to be
ModLoader
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
how do you make a npc human that is tameable, only becomes aggressive if you attack it, and attacks for you when tamed - like the wolf?
I am no expert, but i think you should make it to extend EntityCreature, or EntityTameable. EntityCreature makes it friendly even if you hit it, don't know if it is like that for entitytameable(I have never made a tameable mob) No clue on how to make it tameable, but have a look in the class for wolf, and EntityTameable.
Like I said above, I am not an expert, so don't get mad at me if it ****s it up, or won't work. Maybe backup if it is a big mod
Thanks! Me and my simple mistakes. At least that tells you I didn't just
Copy and paste.
Now I can follow the rest of your tutorials,awesome! There some of the best.
i know it is not in these tutorials but does anyone know to make an item give you a GUI when right clicked? if anyone can tell me how?
it would be much obliged thanks!
I was using the wrong class (an old one and not the one i had "bound" to the entity, so i fixed that line in the new class and it worked.
Thanks for the help TechGuy
i dont know how to put it strait into the sword but you can put it in the mobs entity file;
you can look in EntityZombie for this line
protected void dropRareDrop(int par1) { switch (rand.nextInt(4)) { case 0: dropItem(Item.swordSteel.shiftedIndex, 1); break; case 1: dropItem(Item.helmetSteel.shiftedIndex, 1); break; case 2: dropItem(Item.ingotIron.shiftedIndex, 1); break; case 3: dropItem(Item.shovelSteel.shiftedIndex, 1); break; } }i dont know how to change percentages
I tried telling it to install JDK again, but my computer said it was already installed (thus I didn't go through with it.)
I'm probably missing something big and obvious that's glaring me right in the face, but I just don't see it.
I also registered JDK, but to no avail.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI would suggest getting eclipse, but if you don't want to do that, you can just use "open with" and select notepad, at least that is what I did, I think.
Your forgot to rename some stuff.
Your mod_ code should look like this, you need to remember to use your item's/block's instance name everywhere in the class:
public class mod_SpikedPlate extends BaseMod { public static final Block SpikedPlate = new BlockSpikedPlate(170,0) .setBlockName("SpikedPlate").setHardness(2F).setResistance(1F); public void load() { SpikedPlate.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Mods/Spiked Plate.png"); ModLoader.registerBlock(SpikedPlate); ModLoader.addName(SpikedPlate, "Spiked Plate"); ModLoader.addRecipe(new ItemStack(SpikedPlate, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); } public String getVersion() { return "1.2.5"; } }Actually, I've added three. I added the biome, and the additional information about mobs. I've also updated within 1-2 days of updates being released.
On the OP, I actually said "I try to make...". You see that big word there, it says try. I have other commitments too in my life. These tutorials aren't my number 1 priorities. I also have school, work, and my own modding. You are better off finding out how to do the animations yourself. They are hard as it is, even harder to make a tutorial on.
together they are powerful beyond imagination."
mod_YellowStone:
package net.minecraft.src; public class mod_YellowStone extends BaseMod { public static final Block YellowStone = new BlockYellowStone(172, 0).setBlockName("YellowStone").setHardness(3F).setResistance(4F); public void load() { YellowStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Yellow.png"); ModLoader.registerBlock(YellowStone); ModLoader.addName(YellowStone, "Yellow Stone"); ModLoader.addRecipe(new ItemStack(YellowStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); ModLoader.addSmelting(YellowCobbleStone.blockID, new ItemStack(YellowStone, 1)); } public String getVersion() { return "1.2.5"; } }The error that I get:
Thanks in advance!
Where did you create your YellowCobbleStone block?
together they are powerful beyond imagination."
They're all in the same folder, the src one with all the other files of the game. I don't know if you need this, but here's the code for mod_YellowCobbleStone:
package net.minecraft.src; public class mod_YellowCobbleStone extends BaseMod { public static final Block YellowCobbleStone = new BlockYellowCobbleStone(182, 0).setBlockName("YellowCobbleStone").setHardness(3F).setResistance(4F); public void load() { YellowCobbleStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YellowC.png"); ModLoader.registerBlock(YellowCobbleStone); ModLoader.addName(YellowCobbleStone, "Yellow Cobblestone"); ModLoader.addRecipe(new ItemStack(YellowCobbleStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.cobblestone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); } public String getVersion() { return "1.2.5"; } }and here's BlockYellowCobbleStone:
package net.minecraft.src; import java.util.Random; public class BlockYellowCobbleStone extends Block { public BlockYellowCobbleStone(int i, int j) { super(i, j, Material.rock); } public int idDropped(int i, Random random, int j) { return mod_YellowCobbleStone.YellowCobbleStone.blockID; } public int qualityDropped(Random random) { return 1; }}Reason why, I don't get how to do it with his post. 1. Doesn't make fully sense. 2. Kinda outdated.
Here's my code:(I didn't rename anything that you had because I'm lazy.)
mod_Block:
package net.minecraft.src; public class mod_Block extends BaseMod { public static final Block Namehere = new BlockNamehere(160, 1).setBlockName("anynamehere").setHardness (3F).setResistance(4F).setLightValue(1F); public void load() { Modloader.registerBlock(Namehere); Modloader.addName(Namehere, "In Game Name Here"); Modloader.addRecipe(new ItemStack(Namehere, 1), new Object [] {"#", Character.valueOf ('#'), Block.dirt}); } public String getVersion() { return "1.2.5"; } }</I won't post the block code(but I do have it) because none of my errors were from it.
Here's my error:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_01\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_Block.java:10: error: cannot find symbol
Modloader.registerBlock(Namehere);
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:11: error: cannot find symbol
Modloader.addName(Namehere, "In Game Name Here")
;
^
symbol: variable Modloader
location: class mod_Block
src\minecraft\net\minecraft\src\mod_Block.java:12: error: cannot find symbol
Modloader.addRecipe(new ItemStack(Namehere, 1),
new Object [] {"#", Character.valueOf
^
symbol: variable Modloader
location: class mod_Block
3 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
Please help me, I would truly appreciate it.
Everything should be kept in one mod_ class. Merge it all into one, then your smelting recipe should get no errors when trying to reference to YellowCobbleStone.
needs to be
together they are powerful beyond imagination."
I am no expert, but i think you should make it to extend EntityCreature, or EntityTameable. EntityCreature makes it friendly even if you hit it, don't know if it is like that for entitytameable(I have never made a tameable mob) No clue on how to make it tameable, but have a look in the class for wolf, and EntityTameable.
Like I said above, I am not an expert, so don't get mad at me if it ****s it up, or won't work. Maybe backup if it is a big mod
Thanks! Me and my simple mistakes. At least that tells you I didn't just
Copy and paste.
Now I can follow the rest of your tutorials,awesome! There some of the best.
it would be much obliged thanks!
package net.minecraft.src; public class mod_YellowStone extends BaseMod { public static final Block YellowStone = new BlockYellowStone(172, 0).setBlockName("YellowStone").setHardness(3F).setResistance(4F); public void load() { YellowStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Yellow.png"); ModLoader.registerBlock(YellowStone); ModLoader.addName(YellowStone, "Yellow Stone"); ModLoader.addRecipe(new ItemStack(YellowStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); ModLoader.addSmelting(YellowCobbleStone.blockID, new ItemStack(YellowStone, 1)); } public String getVersion() { return "1.2.5"; } } package net.minecraft.src; public class mod_YellowStone extends BaseMod { public static final Block YellowCobbleStone = new BlockYellowCobbleStone(182, 0).setBlockName("YellowCobbleStone").setHardness(3F).setResistance(4F); public void load() { YellowCobbleStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YellowC.png"); ModLoader.registerBlock(YellowCobbleStone); ModLoader.addName(YellowCobbleStone, "Yellow Cobblestone"); ModLoader.addRecipe(new ItemStack(YellowCobbleStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.cobblestone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); } public String getVersion() { return "1.2.5"; } }And here's the error:
Am I supposed to combine BlockYellowStone and BlockYellowCobbleStone? Becuase I tried that, and got 3 errors. I changed it back, however.
Copy and paste to code below and it should work.
package net.minecraft.src; public class mod_YellowStone extends BaseMod { public static final Block YellowStone = new BlockYellowStone(172, 0).setBlockName("YellowStone").setHardness(3F).setResistance(4F); public static final Block YellowCobbleStone = new BlockYellowCobbleStone(182, 0).setBlockName("YellowCobbleStone").setHardness(3F).setResistance(4F); public void load() { YellowStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Yellow.png"); ModLoader.registerBlock(YellowStone); ModLoader.addName(YellowStone, "Yellow Stone"); ModLoader.addRecipe(new ItemStack(YellowStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.stone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); ModLoader.addSmelting(YellowCobbleStone.blockID, new ItemStack(YellowStone, 1)); YellowCobbleStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/YellowC.png"); ModLoader.registerBlock(YellowCobbleStone); ModLoader.addName(YellowCobbleStone, "Yellow Cobblestone"); ModLoader.addRecipe(new ItemStack(YellowCobbleStone, 1), new Object [] {"#", "@", Character.valueOf('@'), Block.cobblestone, Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 11)}); } public String getVersion() { return "1.2.5"; } }