I'm having a problem adding my furnace fuel, here's my code.
public int addFuel(int i){
if(i == propaneTank.shiftedIndex){
return 9600;
}
return 0;
}
I'm having an error in the "shiftedIndex" part of the code. Eclipse just says it can't be resolved. Am i missing a class I need to include, I have these classes included
I'm having a problem adding my furnace fuel, here's my code.
public int addFuel(int i){
if(i == propaneTank.shiftedIndex){
return 9600;
}
return 0;
}
I'm having an error in the "shiftedIndex" part of the code. Eclipse just says it can't be resolved. Am i missing a class I need to include, I have these classes included
I took a piece of code I used in a 1.2.5 mod, but I hope it still does the same thing
public int addFuel(int i, int j)
{
if(i == mod_Coalblock.superFuel.shiftedIndex)
{
return 25600;
}
return 0;
}
In your code, you don't have an "int j" part, and you also don't have the "mod_" part. That might be your problem. Your imports should be fine, because in my 400 line long mod_ file, I only imported Random. I'm not sure what int j is for, and I don't know why you would NEED to have mod_, but I have it any my fuel works.
Again, that was from 1.2.5, but I think it would be the same. I recommend modding with Forge instead of ModLoader. Ironically, adding a fuel with forge takes more work, but you'll really enjoy the other benefits of it. Its a bit of work to switch from ML to Forge, but you'll find it well worth it when you run out of sprite indexes (you'll see what I mean when that happens, and you won't like it)
By the way, I don't know what your mod is about, but for some reason Propane Tanks seem like such a cool idea xD Good luck with the mod!
I'm having a problem adding my furnace fuel, here's my code.
public int addFuel(int i){
if(i == propaneTank.shiftedIndex){
return 9600;
}
return 0;
}
I'm having an error in the "shiftedIndex" part of the code. Eclipse just says it can't be resolved. Am i missing a class I need to include, I have these classes included
public static final Achievement hankHill1 = new Achievement(5000, "hankHill1", 4, 9, mod_jesus.propaneTank, null).registerAchievement();
I'm getting an error on "public void takenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory iinventory)" of how it says takenFromCrafting is an invalid type of variable for void.
I'm having an error in the "shiftedIndex" part of the code. Eclipse just says it can't be resolved. Am i missing a class I need to include, I have these classes included
I took a piece of code I used in a 1.2.5 mod, but I hope it still does the same thing
In your code, you don't have an "int j" part, and you also don't have the "mod_" part. That might be your problem. Your imports should be fine, because in my 400 line long mod_ file, I only imported Random. I'm not sure what int j is for, and I don't know why you would NEED to have mod_, but I have it any my fuel works.
Again, that was from 1.2.5, but I think it would be the same. I recommend modding with Forge instead of ModLoader. Ironically, adding a fuel with forge takes more work, but you'll really enjoy the other benefits of it. Its a bit of work to switch from ML to Forge, but you'll find it well worth it when you run out of sprite indexes (you'll see what I mean when that happens, and you won't like it)
By the way, I don't know what your mod is about, but for some reason Propane Tanks seem like such a cool idea xD Good luck with the mod!
If you're using 1.4.7 code, shiftedIndex has been changed to itemID
Happy modding
That fixed it, I also need to know what changed for adding acheivments.
This is my code for acheivments
I'm getting an error on "public void takenFromCrafting(EntityPlayer entityplayer, ItemStack itemstack, IInventory iinventory)" of how it says takenFromCrafting is an invalid type of variable for void.