The guy who made the post here told me to do that thing with set/bucket and null and crap? and the other thing i meant to take out. I'm not asking to be criticized, I just need someone to HELP me fix the errors!
I told you to put in what was required not change what the comment said
My mod is going to add an item called Ice cream.
My coding:
package net.minecraft.src;
public class ItemIceCream extends Item
{
public ItemIceCream (int i)
{
super(i);
maxStackSize = 64;
healAmount = 3;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
itemstack.stackSize--;
entityplayer.heal(healAmount);
return itemstack;
}
}
When I run the recompile thing I get an error message that says it cannot find symbol. This error message is for anywhere it says healAmount.
plz help!
ok then either way, the line where the error is, is line 46 which is the bottom line. I think it has something to do with the setIconIndex. idk tho i use modloader
I already tried to remove "v", but error didn't went.
Also I modified bu.class (EnumToolMaterial.java). I added this line into EnumToolMaterial.java:
LAPIS("LAPIS", 5, 5, 1254, 12F, 3);
After this, file looks like this:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: [url="http://www.kpdus.com/jad.html"]http://www.kpdus.com/jad.html[/url]
// Decompiler options: packimports(3) braces deadcode
package net.minecraft.src;
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),
LAPIS("LAPIS", 5, 5, 1254, 12F, 3);
/*
public static EnumToolMaterial[] values()
{
return (EnumToolMaterial[])field_21209_j.clone();
}
public static EnumToolMaterial valueOf(String s)
{
return (EnumToolMaterial)Enum.valueOf(net.minecraft.src.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;
*/
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
});
}
}
But, problem is not from EnumToolMaterial.java.
Ok. so you know its not from enumtoolmaterial since theres only one error and the error is on mod_lapistools. So either try eclipse, if you arent already using it, to find what the error is. try that. Il look at the last line again and see if i can find it.
The guy who made the post here told me to do that thing with set/bucket and null and crap? and the other thing i meant to take out. I'm not asking to be criticized, I just need someone to HELP me fix the errors!
I'm critical of people that learn to copy and paste before learning how to program. I've even gotten off my ass and written a tutorial here. Maybe that will help. Maybe it won't.
I'm trying to make an entity that will be affected by gravity the same way that the player entity is. Does anyone know what value I should be adding to motionY for every onUpdate to give it the same acceleration?
I'm critical of people that learn to copy and paste before learning how to program. I've even gotten off my ass and written a tutorial here. Maybe that will help. Maybe it won't.
Ive never copied and pasted? Ive only ever followed a tutorial, And obviously, theres no tutorials to make what im making CAUSE NO ONE HAS DONE IT BEFORE. And before you make a smart little comment, I just need someone to help, and i DONT need someone to be critical, I need someone to help. And you are not helping. So why waste your time commenting, when i neither care or will i read what you have to say.
I'm trying to make an entity that will be affected by gravity the same way that the player entity is. Does anyone know what value I should be adding to motionY for every onUpdate to give it the same acceleration?
Look at the existing mobs for reference if you still need help just ask.
@docj98 can you pm me your code I'll edit it and figure it out tomorrow.
sure il PM that now. Ive been working around with if statements and stuff, so anything REALLY wrong is eclipse fault.... well mine actually for eclipse changing crap.
Back! :biggrin.gif: I AM using ModLoader, and I was wondering how to make the sides of my block the same image, but have the top and bottom a different image. As in, all the sides are a face, but the top is just white and the bottom is the same as the top. I literally have NO idea how to do this using modloader. Please help meh! :biggrin.gif:
I have a mod, too. But It is working! I'm using this in my other mod:
public String Version()
{
return "3.14159265";
}
You used Pi as the version? lol Yeah I'm not sure what the problem is. It probably has NOTHING to do with what the error says, correcting a tiny error will sometimes fix a completely different error. I would just look over the whole code and make sure you don't have anything out of place or missing.
I told you to put in what was required not change what the comment said
Can I see your code.
thats the thing, im not using modloader
I didnt mean you were wrong, I thing you misunderstood what i am making.
It should be, extends ItemFood
ok then either way, the line where the error is, is line 46 which is the bottom line. I think it has something to do with the setIconIndex. idk tho i use modloader
Yes. There's my code:
I think this codes occurs error:
Ok, this might not fix it, Idk if it will, But try taking the v out of
If it doesnt work then you can put it back in. but try it maybe?
I already tried to remove "v", but error didn't went.
Also I modified bu.class (EnumToolMaterial.java). I added this line into EnumToolMaterial.java:
After this, file looks like this:
But, problem is not from EnumToolMaterial.java.
Ok. so you know its not from enumtoolmaterial since theres only one error and the error is on mod_lapistools. So either try eclipse, if you arent already using it, to find what the error is. try that. Il look at the last line again and see if i can find it.
ok try it like this:
I'm critical of people that learn to copy and paste before learning how to program. I've even gotten off my ass and written a tutorial here. Maybe that will help. Maybe it won't.
Ive never copied and pasted? Ive only ever followed a tutorial, And obviously, theres no tutorials to make what im making CAUSE NO ONE HAS DONE IT BEFORE. And before you make a smart little comment, I just need someone to help, and i DONT need someone to be critical, I need someone to help. And you are not helping. So why waste your time commenting, when i neither care or will i read what you have to say.
Look at the existing mobs for reference if you still need help just ask.
sure il PM that now. Ive been working around with if statements and stuff, so anything REALLY wrong is eclipse fault.... well mine actually for eclipse changing crap.
I tried, but no change. Same error.
I have a mod, too. But It is working! I'm using this in my other mod:
You used Pi as the version? lol Yeah I'm not sure what the problem is. It probably has NOTHING to do with what the error says, correcting a tiny error will sometimes fix a completely different error. I would just look over the whole code and make sure you don't have anything out of place or missing.