All this does is declare each of the things described above. So now, we have to edit it to add in our own item's tool materials! But wait, you say! There's already an EMERALD decsribed! Well, that's why I called the one in mod_Emeralds.java 2EMERALD! So, to make 2EMERALD, we have to edit those two code lines to this:
This makes the 2EMERALD have 800 uses, and have 7F strength (among other things).
ERROR! (It may work in-game, but it's wrong)
Quote from ziddia »
2EMERALD("2EMERALD", 3, 2, 800, 7F, 2),
Should be
2EMERALD("2EMERALD", 5, 2, 800, 7F, 2);
Because the bolded bits are there for a reason. The bold 5 is because the numbers are for the order of game insertion or some crap like that, meant to be individualized. The bolded semicolon needs to be there after the last declaration or whatever you want to call it. And btw, it's this: Unique ID, Harvest level, uses, strength, damage vs entity.
Sorry, just figured I'd throw in my two cents (or is the saying sense?)
Quote from RedPanda »
One more thing. How can I add glowing to block?
It's something along the lines of .setLightValue([value]F)
Check Block.java, it's in there under lightstone
Added in import java.util.Random;, recompiled fine, everything works, still doesn't drop my item.
BlockBloodStone:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.Random;
public class BlockBloodStone extends Block
{
public BlockBloodStone(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i)
{
return mod_NetherDust.netherDust.shiftedIndex;
}
}
mod_NetherDust:
package net.minecraft.src;
public class mod_NetherDust extends BaseMod
{
public mod_NetherDust()
{
netherDust.iconIndex = ModLoader.addOverride("/gui/items.png", "/NetherDust/NetherDust.png");
ModLoader.AddName(netherDust, "NetherDust");
}
public String Version()
{
return "1.4_01";
}
public static final Item netherDust = new ItemNetherDust(2000).setItemName("netherdust");
static
{
}
}
:/
public BlockBloodStone(int i, int j)
{
super(i, j, Material.rock);
}
this part
it should be Material.ground or Material.wood or something because if you want blocks to drop when you break them by hands, rock wont do it, try using pickaxes to mine it and you'll see it drops block, just like when you mine iron(or cobblestone not really sure :tongue.gif:)
ok i followed your tutorial but when i compile i get over 40 errors O.o
-EnumToolMaterial.java
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public enum EnumToolMaterial
{
WOOD("WOOD", 0, 0, 59, 2.0F, 0),
STONE("STONE", 1, 1, 131, 4F, 1),
IRON("IRON", 2, 2, 250, 6F, 2),
EMERALD("EMERALD", 3, 3, 1561, 8F, 3),
GOLD("GOLD", 4, 0, 32, 12F, 0),
2EMERALD("2EMERALD", 3, 2, 800, 7F, 2);
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])field_21209_j.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(EnumToolMaterial.class, s);
}
*/
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
{
// super(s, i);
harvestLevel = j;
maxUses = k;
efficiencyOnProperMaterial = f;
damageVsEntity = l;
}
public int getMaxUses()
{
return maxUses;
}
public float getEfficiencyOnProperMaterial()
{
return efficiencyOnProperMaterial;
}
public int getDamageVsEntity()
{
return damageVsEntity;
}
public int getHarvestLevel()
{
return harvestLevel;
}
/*
public static final EnumToolMaterial WOOD;
public static final EnumToolMaterial STONE;
public static final EnumToolMaterial IRON;
public static final EnumToolMaterial EMERALD;
public static final EnumToolMaterial GOLD;
public static final EnumToolMaterial 2EMERALD;
*/
private final int harvestLevel;
private final int maxUses;
private final float efficiencyOnProperMaterial;
private final int damageVsEntity;
// private static final EnumToolMaterial field_21209_j[]; /* synthetic field */
/*
static
{
WOOD = new EnumToolMaterial("WOOD", 0, 0, 59, 2.0F, 0);
STONE = new EnumToolMaterial("STONE", 1, 1, 131, 4F, 1);
IRON = new EnumToolMaterial("IRON", 2, 2, 250, 6F, 2);
EMERALD = new EnumToolMaterial("EMERALD", 3, 3, 1561, 8F, 3);
GOLD = new EnumToolMaterial("GOLD", 4, 0, 32, 12F, 0);
field_21209_j = (new EnumToolMaterial[] {
WOOD, STONE, IRON, EMERALD, GOLD
});
}
*/
}
-ItemEmerald.java
package net.minecraft.src;
public class ItemEmerald extends Item {
public ItemEmerald (int i)
{
super(i);
maxStackSize = (64);
}
}
-mod_Emeralds.java
package net.minecraft.src;
public class mod_Emeralds extends BaseMod
{
public static final Block emeraldOre = new BlockEmeraldOre(97, 0).setHardness(2.0F).setResistance(5.0F).setBlockName("emeraldOre");
public static final Item emeraldItem = new Item(2000).setItemName("emeraldItem");
public static final Item emeraldPick = new ItemPickaxe(2001, EnumToolMaterial.2EMERALD).setItemName("emeraldPick");
public static final Item emeraldShovel = new ItemSpade(2002, EnumToolMaterial.2EMERALD).setItemName("emeraldShovel");
public static final Item emeraldAxe = new ItemAxe(2003, EnumToolMaterial.2EMERALD).setItemName("emeraldAxe");
public static final Item emeraldHoe = new ItemHoe(2004, EnumToolMaterial.2EMERALD).setItemName("emeraldHoe");
public static final Item emeraldSword = new ItemSword(2005, EnumToolMaterial.2EMERALD).setItemName("emeraldSword");
public mod_Emeralds()
{
ModLoader.RegisterBlock(emeraldOre);
emeraldOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/tutorial/emeraldore.png");
emeraldItem.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeralditem.png");
emeraldPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeraldpick.png");
emeraldShovel.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeraldshovel.png");
emeraldAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeraldaxe.png");
emeraldHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeraldhoe.png");
emeraldSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/tutorial/emeraldsword.png");
ModLoader.AddName(emeraldOre, "Emerald Ore");
ModLoader.AddName(emeraldItem, "Emerald");
ModLoader.AddName(emeraldPick, "Emerald Pickaxe");
ModLoader.AddName(emeraldShovel, "Emerald Shovel");
ModLoader.AddName(emeraldAxe, "Emerald Axe");
ModLoader.AddName(emeraldHoe, "Emerald Hoe");
ModLoader.AddName(emeraldSword, "Emerald Sword");
ModLoader.AddRecipe(new ItemStack(emeraldPick, 1), new Object[] {
"XXX", " | ", " | ", Character.valueOf('X'), emeraldItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(emeraldShovel, 1), new Object[] {
" X ", " | ", " | ", Character.valueOf('X'), emeraldItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(emeraldAxe, 1), new Object[] {
"XX ", "X| ", " | ", Character.valueOf('X'), emeraldItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(emeraldHoe, 1), new Object[] {
"XX ", " | ", " | ", Character.valueOf('X'), emeraldItem, Character.valueOf('|'), Item.stick
});
ModLoader.AddRecipe(new ItemStack(emeraldSword, 1), new Object[] {
" X ", " X ", " | ", Character.valueOf('X'), emeraldItem, Character.valueOf('|'), Item.stick
});
}
public String Version()
{
return "1.4_01";
}
}
this is the coding you showed in the tutorial so it should be working allright
if u can help me ill give you some gold and diamonds :smile.gif:
Do you have the BlockEmeraldOre file? I may need that too. I can't see where it goes wrong right now but I just woke up so I'll check it per if you post BlockEmeraldOre. Thanks.
Hey ziddia, in the first post, I can give you a tutorial to create a path variable in Windows 7 if you'd like.
Quote from RedPanda »
One more thing. How can I add glowing to block?
Found it! Ok, when you're setting the hardness and name and all that of a block:
public static final Block emeraldOre = new BlockEmeraldOre(97, 0).setHardness(2F).setResistance(5F).setBlockName("emeraldOre");
Add .setLightValue() after .setResisitance.
Torches are 0.9735F, and that's about seven blocks worth of light.
EDIT: It'd either be there, or in the Block(whatever) file... I'm pretty sure it actually goes in BlockEmeraldOre or whatever like so:
public class BlockEmeraldOre extends Block
{
protected BlockEmeraldOre(int i, int j)
{
super(i, i, Material.rock)
stepSound = soundStoneFootstep
lightValue = 0.9735F
}
}
Hey ziddia, in the first post, I can give you a tutorial to create a path variable in Windows 7 if you'd like.
Quote from RedPanda »
One more thing. How can I add glowing to block?
Found it! Ok, when you're setting the hardness and name and all that of a block:
public static final Block emeraldOre = new BlockEmeraldOre(97, 0).setHardness(2F).setResistance(5F).setBlockName("emeraldOre");
Add .setLightValue() after .setResisitance.
Torches are 0.9735F, and that's about seven blocks worth of light.
EDIT: It'd either be there, or in the Block(whatever) file... I'm pretty sure it actually goes in BlockEmeraldOre or whatever like so:
public class BlockEmeraldOre extends Block
{
protected BlockEmeraldOre(int i, int j)
{
super(i, i, Material.rock)
stepSound = soundStoneFootstep
lightValue = 0.9735F
}
}
Do you want to be an official Answerer for this page? Because you know a lot about ModLoader :biggrin.gif:
Any tutorials you can make would be great.
Just trying to help, truthfully I only started ModLoader modding about 3 days ago (4-14), but I've been Java coding for awhile. As for the Win7 PATH tutorial, ish here:
Click on the start icon (or the windows logo for some users), and open the control panel, in the top windows explorer search bar, type: Control Panel\System and Security\System
Look on the left, and click Advanced System Settings (or some crap like that, it'll say advanced)
Click Environment Variables in the box that opens.
Find your path variable in the list in the bottom section, and add the PATH variable:
NOTE: You must have Java installed for this to properly work, and under there directories, Java is directly installed to these directories when you use the installer found on their home page
Nothing works for me!
53 errors!!!!
WTF....
I think i better go modding without ModLoader ;(
The recompile log:
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Dokumente und Einstellungen\user\Desktop\Ordner-Sammlung\
Minecraft Mod Making Tools\MCP
Compiling Minecraft
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:14: <identifier> expec
ted
YELLORA("YELLORA", 3, 2, 800, 7F, 2),
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:26: ',', '}', or ';' e
xpected
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:26: '}' expected
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:30: class, interface,
or enum expected
maxUses = k;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:31: class, interface,
or enum expected
efficiencyOnProperMaterial = f;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:32: class, interface,
or enum expected
damageVsEntity = l;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:33: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:35: class, interface,
or enum expected
public int getMaxUses()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:38: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:40: class, interface,
or enum expected
public float getEfficiencyOnProperMaterial()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:43: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:45: class, interface,
or enum expected
public int getDamageVsEntity()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:48: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:50: class, interface,
or enum expected
public int getHarvestLevel()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:53: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:62: class, interface,
or enum expected
private final int harvestLevel;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:63: class, interface,
or enum expected
private final int maxUses;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:64: class, interface,
or enum expected
private final float efficiencyOnProperMaterial;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:65: class, interface,
or enum expected
private final int damageVsEntity;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:80: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\ItemYellora.java:5: invalid method declarati
on; return type required
public Yellora (int i)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:7: malformed floating poin
t literal
public static final Item YelloraPick = new ItemPickaxe(2001, EnumToolMaterial
.2EMERALD).setItemName("YelloraPick");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:7: <identifier> expected
public static final Item YelloraPick = new ItemPickaxe(2001, EnumToolMaterial
.2EMERALD).setItemName("YelloraPick");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:7: illegal start of type
public static final Item YelloraPick = new ItemPickaxe(2001, EnumToolMaterial
.2EMERALD).setItemName("YelloraPick");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:7: illegal start of type
public static final Item YelloraPick = new ItemPickaxe(2001, EnumToolMaterial
.2EMERALD).setItemName("YelloraPick");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:8: malformed floating poin
t literal
public static final Item YelloraShovel = new ItemSpade(2002, EnumToolMaterial
.2EMERALD).setItemName("YelloraShovel");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:8: <identifier> expected
public static final Item YelloraShovel = new ItemSpade(2002, EnumToolMaterial
.2EMERALD).setItemName("YelloraShovel");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:8: illegal start of type
public static final Item YelloraShovel = new ItemSpade(2002, EnumToolMaterial
.2EMERALD).setItemName("YelloraShovel");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:8: illegal start of type
public static final Item YelloraShovel = new ItemSpade(2002, EnumToolMaterial
.2EMERALD).setItemName("YelloraShovel");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:9: malformed floating poin
t literal
public static final Item YelloraAxe = new ItemAxe(2003, EnumToolMaterial.2EME
RALD).setItemName("YelloraAxe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:9: <identifier> expected
public static final Item YelloraAxe = new ItemAxe(2003, EnumToolMaterial.2EME
RALD).setItemName("YelloraAxe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:9: illegal start of type
public static final Item YelloraAxe = new ItemAxe(2003, EnumToolMaterial.2EME
RALD).setItemName("YelloraAxe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:9: illegal start of type
public static final Item YelloraAxe = new ItemAxe(2003, EnumToolMaterial.2EME
RALD).setItemName("YelloraAxe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:10: malformed floating poi
nt literal
public static final Item YelloraHoe = new ItemHoe(2004, EnumToolMaterial.2EME
RALD).setItemName("YelloraHoe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:10: <identifier> expected
public static final Item YelloraHoe = new ItemHoe(2004, EnumToolMaterial.2EME
RALD).setItemName("YelloraHoe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:10: illegal start of type
public static final Item YelloraHoe = new ItemHoe(2004, EnumToolMaterial.2EME
RALD).setItemName("YelloraHoe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:10: illegal start of type
public static final Item YelloraHoe = new ItemHoe(2004, EnumToolMaterial.2EME
RALD).setItemName("YelloraHoe");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:11: malformed floating poi
nt literal
public static final Item YelloraSword = new ItemSword(2005, EnumToolMaterial.
2EMERALD).setItemName("YelloraSword");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:11: <identifier> expected
public static final Item YelloraSword = new ItemSword(2005, EnumToolMaterial.
2EMERALD).setItemName("YelloraSword");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:11: illegal start of type
public static final Item YelloraSword = new ItemSword(2005, EnumToolMaterial.
2EMERALD).setItemName("YelloraSword");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:11: illegal start of type
public static final Item YelloraSword = new ItemSword(2005, EnumToolMaterial.
2EMERALD).setItemName("YelloraSword");
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: illegal start of expre
ssion
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: illegal start of expre
ssion
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: ';' expected
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: ';' expected
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: not a statement
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: ';' expected
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: <identifier> expected
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: not a statement
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:44: ';' expected
public void GenerateSurface(World world, Random rand, int chunkX
, int chunkZ)
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:54: illegal start of expre
ssion
public String Version()
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:54: ';' expected
public String Version()
^
sources\minecraft\net\minecraft\src\mod_Emeralds.java:59: reached end of file wh
ile parsing
}
^
53 errors
It would be nice if you can edit my files and make them OK!
Download Link: http://ul.to/o03ik2da
Your first error, if the YELLORA is your last material, then change the ',' to a ';' That should pretty much account for most of your EnumToolMaterial errors.
Yellora doesn't belong in your mod_Emeralds file, the different types of materials and whatnot go in their own files, such as mod_Yellora.java. Try these and see if it helps <- cuz it's cute
Thank you so much!
Just 41 More Erros :biggrin.gif:!
Ok, the world generation edit (to put your ores in-game) code in this thread doesn't work, I tried it out too. Get that out of anywhere you have it, I'll look for a fix and post it. - about 5 errors.
Try putting the version declaration directly after the ModLoader.whocares stuff, and make sure everything is properly indented, like so:
public String Version();
{
return "1.4_01";
}
That's all I can say right now, please reply with a new error report :smile.gif:
To ziddia, can you confirm without a doubt that you're world generation bit works? I can't seem to get it to recompile...
Thank you so much!
Just 41 More Erros :biggrin.gif:!
Ok, the world generation edit (to put your ores in-game) code in this thread doesn't work, I tried it out too. Get that out of anywhere you have it, I'll look for a fix and post it. - about 5 errors.
Try putting the version declaration directly after the ModLoader.whocares stuff, and make sure everything is properly indented, like so:
public String Version();
{
return "1.4_01";
}
That's all I can say right now, please reply with a new error report :smile.gif:
To ziddia, can you confirm without a doubt that you're world generation bit works? I can't seem to get it to recompile...
I can confirm without a doubt that it works for me. They are endearing in the ground in my more ores mod, ive found one of everything I made. Post your code and I'll fix it up.
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Dokumente und Einstellungen\user\Desktop\Ordner-Sammlung\
Minecraft Mod Making Tools\MCP
Compiling Minecraft
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:14: <identifie
r> expected
YELLORA("YELLORA", 3, 2, 800, 7F, 2),
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:26: ',', '}',
or ';' expected
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:26: '}' expect
ed
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:30: class, int
erface, or enum expected
maxUses = k;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:31: class, int
erface, or enum expected
efficiencyOnProperMaterial = f;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:32: class, int
erface, or enum expected
damageVsEntity = l;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:33: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:35: class, int
erface, or enum expected
public int getMaxUses()
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:38: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:40: class, int
erface, or enum expected
public float getEfficiencyOnProperMaterial()
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:43: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:45: class, int
erface, or enum expected
public int getDamageVsEntity()
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:48: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:50: class, int
erface, or enum expected
public int getHarvestLevel()
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:53: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:62: class, int
erface, or enum expected
private final int harvestLevel;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:63: class, int
erface, or enum expected
private final int maxUses;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:64: class, int
erface, or enum expected
private final float efficiencyOnProperMaterial;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:65: class, int
erface, or enum expected
private final int damageVsEntity;
^
sources\minecraft\net\minecraft\src\Copy of EnumToolMaterial.java:80: class, int
erface, or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:14: <identifier> expec
ted
YELLORA("YELLORA", 3, 2, 800, 7F, 2),
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:26: ',', '}', or ';' e
xpected
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:26: '}' expected
private EnumToolMaterial(String s, int i, int j, int k, float f, int l)
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:30: class, interface,
or enum expected
maxUses = k;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:31: class, interface,
or enum expected
efficiencyOnProperMaterial = f;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:32: class, interface,
or enum expected
damageVsEntity = l;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:33: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:35: class, interface,
or enum expected
public int getMaxUses()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:38: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:40: class, interface,
or enum expected
public float getEfficiencyOnProperMaterial()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:43: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:45: class, interface,
or enum expected
public int getDamageVsEntity()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:48: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:50: class, interface,
or enum expected
public int getHarvestLevel()
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:53: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:62: class, interface,
or enum expected
private final int harvestLevel;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:63: class, interface,
or enum expected
private final int maxUses;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:64: class, interface,
or enum expected
private final float efficiencyOnProperMaterial;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:65: class, interface,
or enum expected
private final int damageVsEntity;
^
sources\minecraft\net\minecraft\src\EnumToolMaterial.java:80: class, interface,
or enum expected
}
^
sources\minecraft\net\minecraft\src\ItemYellora.java:5: invalid method declarati
on; return type required
public Yellora (int i)
^
41 errors
*** minecraft_server.jar was not found, skipping
=== MCP 2.11 recompile script finished ===
Drücken Sie eine beliebige Taste . . .
EDIT: Do you have Skype? Then you could make it with Teamviewer or something.
The version bit isn't working for me either. As for your copy of EnumToolMaterial.java, once again change YELLORA("YELLORA", 3, 2, 800, 7F, 2), to YELLORA("YELLORA", 3, 2, 800, 7F, 2);
Same with your original EnumToolMaterial.java.
Also make sure to have the:
public static final EnumToolMaterial YELLORA;
line.
And ItemYellora goes in your mod_Yellora file.
That should about do it. As for world generation, only thing I can think of right now is editing ChunkProviderGenerate.java and including that in your obfuscation file....
No, I don't have skype...
EDIT: Here ya go zid...
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < (1); i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(32);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Emeralds.emeraldOre.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
It's saying that public and void are illegally declared, rand isn't a declaration, and some other crap.
If you can fix this then x 1.9999999999 x 10^99 for you
If you post your code, I'll fix it up for you. Version is wrong because you have a ; when it is opening a method. Take off the semicolon and try again. I can only fix world gen if you show me your code.
@dodori: why are you making a new EnumToolMaterial when there is already a perfectly good one there? Just edit it like I said in they tools tut. I didn't mean make a new one- I meant edit the original.
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i = 0; i < (1); i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(32);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(mod_Emeralds.emeraldOre.blockID, 5)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
It's saying that public and void are illegally declared, rand isn't a declaration, and some other crap.
If you can fix this then x 1.9999999999 x 10^99 for you
That was last page
And dodori, the world generation edit and the version string aren't working for me either...
I actually have no idea. Take a look at glowstones code and see what you can do.
ERROR! (It may work in-game, but it's wrong)
Should be
Because the bolded bits are there for a reason. The bold 5 is because the numbers are for the order of game insertion or some crap like that, meant to be individualized. The bolded semicolon needs to be there after the last declaration or whatever you want to call it. And btw, it's this: Unique ID, Harvest level, uses, strength, damage vs entity.
Sorry, just figured I'd throw in my two cents (or is the saying sense?)
It's something along the lines of .setLightValue([value]F)
Check Block.java, it's in there under lightstone
EDIT: torches light value is 0.9735F
this part
it should be Material.ground or Material.wood or something because if you want blocks to drop when you break them by hands, rock wont do it, try using pickaxes to mine it and you'll see it drops block, just like when you mine iron(or cobblestone not really sure :tongue.gif:)
In other news, my spiffy new code with a spiffy new crafting recipe:
With my spiffy new error message!:
I might as well have you write my code for me...
Why is this happening? :/
Oops. Basically because bloodstone wasn't made inside your mod you have to write it like thus in your crafting:
Block.bloodStone
To define that it is in the file block not the file mod_NetherDust.
My bad. Also I notice you are still using ItemNetherDust- please don't, it can cause errors.
@swissarmy: basically the same just instead off Item.itemitshoulddrop.shiftedIndex it's Block.blockitahoulddrop.
Do you have the BlockEmeraldOre file? I may need that too. I can't see where it goes wrong right now but I just woke up so I'll check it per if you post BlockEmeraldOre. Thanks.
Found it! Ok, when you're setting the hardness and name and all that of a block:
Add .setLightValue() after .setResisitance.
Torches are 0.9735F, and that's about seven blocks worth of light.
EDIT: It'd either be there, or in the Block(whatever) file... I'm pretty sure it actually goes in BlockEmeraldOre or whatever like so:
Do you want to be an official Answerer for this page? Because you know a lot about ModLoader :biggrin.gif:
Any tutorials you can make would be great.
Just trying to help, truthfully I only started ModLoader modding about 3 days ago (4-14), but I've been Java coding for awhile. As for the Win7 PATH tutorial, ish here:
Click on the start icon (or the windows logo for some users), and open the control panel, in the top windows explorer search bar, type: Control Panel\System and Security\System
Look on the left, and click Advanced System Settings (or some crap like that, it'll say advanced)
Click Environment Variables in the box that opens.
Find your path variable in the list in the bottom section, and add the PATH variable:
NOTE: You must have Java installed for this to properly work, and under there directories, Java is directly installed to these directories when you use the installer found on their home page
Your first error, if the YELLORA is your last material, then change the ',' to a ';' That should pretty much account for most of your EnumToolMaterial errors.
Yellora doesn't belong in your mod_Emeralds file, the different types of materials and whatnot go in their own files, such as mod_Yellora.java. Try these and see if it helps <- cuz it's cute
Ok, the world generation edit (to put your ores in-game) code in this thread doesn't work, I tried it out too. Get that out of anywhere you have it, I'll look for a fix and post it. - about 5 errors.
Try putting the version declaration directly after the ModLoader.whocares stuff, and make sure everything is properly indented, like so:
That's all I can say right now, please reply with a new error report :smile.gif:
To ziddia, can you confirm without a doubt that you're world generation bit works? I can't seem to get it to recompile...
I can confirm without a doubt that it works for me. They are endearing in the ground in my more ores mod, ive found one of everything I made. Post your code and I'll fix it up.
The version bit isn't working for me either. As for your copy of EnumToolMaterial.java, once again change YELLORA("YELLORA", 3, 2, 800, 7F, 2), to YELLORA("YELLORA", 3, 2, 800, 7F, 2);
Same with your original EnumToolMaterial.java.
Also make sure to have the:
public static final EnumToolMaterial YELLORA;
line.
And ItemYellora goes in your mod_Yellora file.
That should about do it. As for world generation, only thing I can think of right now is editing ChunkProviderGenerate.java and including that in your obfuscation file....
No, I don't have skype...
EDIT: Here ya go zid...
It's saying that public and void are illegally declared, rand isn't a declaration, and some other crap.
If you can fix this then x 1.9999999999 x 10^99 for you
As said before, the public Yellora (int i) belongs in your mod_Yellora file
Creating a new stair type is extremely easy. Take a look at my creating a new block tutorial, and change the block declaration to read like this:
Then just make it like you would a normal block, and you should have a new stair type!
I will post code snippets and clean this tut up soon. Only use it for now if you know what you are doing.
Thanks to KaeKae for the function reference for this!
That was last page
And dodori, the world generation edit and the version string aren't working for me either...