mrsal, I followed your food tutorial (the revised one), and did what I know about a recipe, and every time i put in the mod, I get an error saying that minecraft cannot find a texture.
Currently, PumpkinCookie (after public static final) is underlined and I have an error saying "public static final is an illegal modifier, only final allowed" I deleted "public static" and no errors were shown, and the game just says MOJANG for a long time and crashes. And of course, it wont recompile with the errors.
Any help is greatly appreciated. Thanks.
heres the mod code
package net.minecraft.src;
import java.util.Random;
public class mod_everything extends BaseMod
{
public static final Item PumpkinSpice = new PumpkinSpice(2500).setItemName("Pumpkin Spice");
{
PumpkinSpice.iconIndex = ModLoader.addOverride("/gui/items.png", "/PumpkinSpice.png");
ModLoader.addName(PumpkinSpice, "Pumpkin Spice");
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
});
public static final Item PumpkinCookie = (new ItemFood(2501, 1, 1F, true )).setIconIndex(ModLoader.addOverride("/gui/Items.png", "/PumpkinCookie.png")).setItemName("PumpkinCookie");
{
ModLoader.addName(PumpkinCookie, "Pumpkin Cookie");
ModLoader.addRecipe(new ItemStack(PumpkinCookie, 8), new Object []{
"sws", Character.valueOf('s'), Item.PumpkinSpice, Character.valueOf('w'), Item.wheat
});
}
}
public String getVersion()
{
return "1.1";
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
mrsal, I followed your food tutorial (the revised one), and did what I know about a recipe, and every time i put in the mod, I get an error saying that minecraft cannot find a texture.
Currently, PumpkinCookie (after public static final) is underlined and I have an error saying "public static final is an illegal modifier, only final allowed" I deleted "public static" and no errors were shown, and the game just says MOJANG for a long time and crashes. And of course, it wont recompile with the errors.
Any help is greatly appreciated. Thanks.
heres the mod code
package net.minecraft.src;
import java.util.Random;
public class mod_everything extends BaseMod
{
public static final Item PumpkinSpice = new PumpkinSpice(2500).setItemName("Pumpkin Spice");
{
PumpkinSpice.iconIndex = ModLoader.addOverride("/gui/items.png", "/PumpkinSpice.png");
ModLoader.addName(PumpkinSpice, "Pumpkin Spice");
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
});
public static final Item PumpkinCookie = (new ItemFood(2501, 1, 1F, true )).setIconIndex(ModLoader.addOverride("/gui/Items.png", "/PumpkinCookie.png")).setItemName("PumpkinCookie");
{
ModLoader.addName(PumpkinCookie, "Pumpkin Cookie");
ModLoader.addRecipe(new ItemStack(PumpkinCookie, 8), new Object []{
"sws", Character.valueOf('s'), Item.PumpkinSpice, Character.valueOf('w'), Item.wheat
});
}
}
public String getVersion()
{
return "1.1";
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
block id might be to high or its PumpkinSpice.iconIndex this causing the problemMrsal511: did u fix the not change texture thing for armour ?
mrsal, I followed your food tutorial (the revised one), and did what I know about a recipe, and every time i put in the mod, I get an error saying that minecraft cannot find a texture.
Currently, PumpkinCookie (after public static final) is underlined and I have an error saying "public static final is an illegal modifier, only final allowed" I deleted "public static" and no errors were shown, and the game just says MOJANG for a long time and crashes. And of course, it wont recompile with the errors.
Any help is greatly appreciated. Thanks.
heres the mod code
package net.minecraft.src;
import java.util.Random;
public class mod_everything extends BaseMod
{
public static final Item PumpkinSpice = new PumpkinSpice(2500).setItemName("Pumpkin Spice");
{
PumpkinSpice.iconIndex = ModLoader.addOverride("/gui/items.png", "/PumpkinSpice.png");
ModLoader.addName(PumpkinSpice, "Pumpkin Spice");
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
});
public static final Item PumpkinCookie = (new ItemFood(2501, 1, 1F, true )).setIconIndex(ModLoader.addOverride("/gui/Items.png", "/PumpkinCookie.png")).setItemName("PumpkinCookie");
{
ModLoader.addName(PumpkinCookie, "Pumpkin Cookie");
ModLoader.addRecipe(new ItemStack(PumpkinCookie, 8), new Object []{
"sws", Character.valueOf('s'), Item.PumpkinSpice, Character.valueOf('w'), Item.wheat
});
}
}
public String getVersion()
{
return "1.1";
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
Where did you save your image to? Also, did you save it to minecraft.jar and your temporary folder in exactly the same directory
Mrsal511: Did you already changed the code in the tutorials? I already found some if you look back in my posts here.
So far, I've found a few changes in code. Instead of re-filming 2 hours worth of film and taking 24 hours to render it, I will instead upload a couple videos identifying the changes for changed code and directly link it to the previous tutorials. One of them is filmed already and just needs to be uploaded!
Where did you save your image to? Also, did you save it to minecraft.jar and your temporary folder in exactly the same directory
Is the temporary folder necessary? I just drag the png's to the to the minecraft folder in bin in mcp. at that point I recompile and reobf, and i get like 4 .class files, which i drag to the .jar and open the game. does putting the png's in the bin>minecraft after the recompile and reobf make a difference? cause now i think about it... I may put them in after I recompile and stuff. but I just drag the png's to the .jar itself with the classes. it worked with just the PumpkinSpice
If you say in the code: /####.png
Then you need to put it here: /####.png
Or if the code says: /mods/####.png
Then make a new mods map and put it there.
the pic is names PumpkinCookie (.png is hidden(maybe i should show extensions) but it is a .png
and in the code, i put /PumpkinCookie.png
and the pic is not in any folders, I just drag it straight to the minecraf.jar
Is there rules to adding more code to a mod? I've followed this tut on making custom armor and nothing works. It doesn't crash, but nothing involving the mod works. Anyone wanna do a skype chat? I'm having just problem after problem here....
In 1.2.3 what is the code for Potion effects? I´ve tried .setPotionEffect(Potion.moveSpeed.id, 60, 1, 0, 0.8F);
It sais in Eclipse : The method setPotionEffect(string) in the type Item is not applicable for the arguments (int, int, int, int, float). What´s wrong
Is the temporary folder necessary? I just drag the png's to the to the minecraft folder in bin in mcp. at that point I recompile and reobf, and i get like 4 .class files, which i drag to the .jar and open the game. does putting the png's in the bin>minecraft after the recompile and reobf make a difference? cause now i think about it... I may put them in after I recompile and stuff. but I just drag the png's to the .jar itself with the classes. it worked with just the PumpkinSpice
I believe temp folder is necessary when your going to test your mod in Eclipse. That's what I thought anyways.
In 1.2.3 what is the code for Potion effects? I´ve tried .setPotionEffect(Potion.moveSpeed.id, 60, 1, 0, 0.8F);
It sais in Eclipse : The method setPotionEffect(string) in the type Item is not applicable for the arguments (int, int, int, int, float). What´s wrong
the pic is names PumpkinCookie (.png is hidden(maybe i should show extensions) but it is a .png
and in the code, i put /PumpkinCookie.png
and the pic is not in any folders, I just drag it straight to the minecraf.jar
Is there rules to adding more code to a mod? I've followed this tut on making custom armor and nothing works. It doesn't crash, but nothing involving the mod works. Anyone wanna do a skype chat? I'm having just problem after problem here....
First off, does your mod even boot? Like can you do ANYTHING with your mod? Like crafting, or just seeing your items? If you can't do anything with your mod, it's either ModLoader is not installed, or a coding error. Post your code please?
I believe temp folder is necessary when your going to test your mod in Eclipse. That's what I thought anyways.
First off, does your mod even boot? Like can you do ANYTHING with your mod? Like crafting, or just seeing your items? If you can't do anything with your mod, it's either ModLoader is not installed, or a coding error. Post your code please?
No, the mod wouldn't boot. I know ModLoader was installed cause I forgot the first time, and added it and tried again, and got the same results. No, no part of the mod was working, no new items, no crafting, nothing involving the mod.
Well, i'm not bothering with trying to test it in eclipse. I just force a new jar download when things screw up.
Here's what I have. I took the PumpkinCookie part of the mod out cause I wanted to try armor, though I'd like the cookie to work
'
package net.minecraft.src;
import java.util.Random;
public class mod_everything extends BaseMod
{
//PumpkinSpice
public static final Item PumpkinSpice = new PumpkinSpice(2500).setItemName("Pumpkin Spice");
{
PumpkinSpice.iconIndex = ModLoader.addOverride("/gui/items.png", "/PumpkinSpice.png");
ModLoader.addName(PumpkinSpice, "Pumpkin Spice");
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
});
}
//PumpkinCooike
//PumpkinArmor
public static Item PumpkinHelmet;
public static Item PumpkinChest;
public static Item PumpkinLegs;
public static Item PumpkinBoots;
static
{
PumpkinHelmet = (new ItemArmor(8000, EnumArmorMaterial.CLOTH, 3, 0)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/modpng/PumpkinHelmet.png")).setItemName("Pumpkin Helmet");
PumpkinChest = (new ItemArmor(8001, EnumArmorMaterial.CLOTH, 3, 1)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/modpng/PumpkinChest.png")).setItemName("Pumpkin Chest");
PumpkinLegs = (new ItemArmor(8002, EnumArmorMaterial.CLOTH, 3, 2)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/modpng/PumpkinLegs.png")).setItemName("Pumpkin Legs");
PumpkinBoots = (new ItemArmor(8003, EnumArmorMaterial.CLOTH, 3, 3)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/modpng/PumpkinBoots.png")).setItemName("Pumpkin Boots");
ModLoader.addName(PumpkinHelmet, "Pumpkin Helmet");
ModLoader.addName(PumpkinChest, "Pumpkin Chest");
ModLoader.addName(PumpkinLegs, "Pumpkin Legs");
ModLoader.addName(PumpkinBoots, "Pumpkin Boots");
ModLoader.addArmor("pumpkin");
ModLoader.addRecipe(new ItemStack(PumpkinHelmet, 1), new Object[]
{
"ppp", "p p", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinChest, 1), new Object[]
{
"p p", "ppp", "ppp", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinLegs, 1), new Object[]
{
"ppp", "p p", "p p", Character.valueOf('p'), Block.pumpkin
});
ModLoader.addRecipe(new ItemStack(PumpkinBoots, 1), new Object[]
{
"p p", "p p", Character.valueOf('p'), Block.pumpkin
});
}
public String getVersion()
{
return "1.1";
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
package net.minecraft.src;
import java.util.Random;
public class PumpkinSpice extends Item{
public PumpkinSpice (int i)
{
super(i);
maxStackSize = 64;
}
}
That's all I have regarding the mod for coding atm. I deleted the PumpkinCookie item class as I said because I wasn't using it.
The mod works when it's only PumpkinSpice in the mod, 3 pumpkins makes Pumpkin Spice, that DOES work. It's just, it screws up whenever I add something else.
ModLoader.addRecipe(new ItemStack(PumpkinSpice, 3), new Object[]{
"xxx", Character.valueOf('x'), Block.pumpkin
public static final Item PumpkinCookie = (new ItemFood(2501, 1, 1F, true )).setIconIndex(ModLoader.addOverride("/gui/Items.png", "/PumpkinCookie.png")).setItemName("PumpkinCookie");
I just have seen your reply, and you said you DIDN'T put it in a folder.
The folder you gave up in the code, that's the place where you have to put it.
Umm, idk what you want me to do with that... Is that a correction? and /PumpkinCookie.png IS the image, not a folder. I made a folder for the images now, but, still, nothing works. I grag the image into the .jar and it's called PumpkinCookie (like i said the extension is hidden on my comp, but it is a png) SO it should look and find. I just followed the rough idea as the PumpkinSpice for the image location of the Pumpkin Cookie. like they are both the same, I just change one from Spice to Cookie, as they are both in the same location: just right in the .jar. (however now, they are both in a folder called modpng.
WAIT I never changed the location of the spice in the code, I'll try that quick.
Screwed something up, crashed on opening. at least its reading something now...
public void GenerateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Spawn SulfiteOre
for(int l = 0; l<21; l++)
{
int SO1 = chunkx + rand.nextInt(16);
int SO2 = rand.nextInt(67);
int SO3 = chunkz + rand.nextInt(16);
(new WorldGenMinable(SulfiteOre.blockID, 8)).generate(world, rand, SO1, SO2, SO3);
}
}
public String getVersion()
{
return "1.0";
}
}
Rollback Post to RevisionRollBack
There are 10 types of people in the world. Those who understand binary notation, those who don't, and those who think this is in binary.
public void GenerateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Spawn SulfiteOre
for(int l = 0; l<21; l++)
{
int SO1 = chunkx + rand.nextInt(16);
int SO2 = rand.nextInt(67);
int SO3 = chunkz + rand.nextInt(16);
(new WorldGenMinable(SulfiteOre.blockID, 8)).generate(world, rand, SO1, SO2, SO3);
}
}
Currently, PumpkinCookie (after public static final) is underlined and I have an error saying "public static final is an illegal modifier, only final allowed" I deleted "public static" and no errors were shown, and the game just says MOJANG for a long time and crashes. And of course, it wont recompile with the errors.
Any help is greatly appreciated. Thanks.
heres the mod code
block id might be to high or its PumpkinSpice.iconIndex this causing the problemMrsal511: did u fix the not change texture thing for armour ?
block id's go up to 4000 now. and the mod worked before I added the whole PumpkinCookie part.
I've made the two new items, the PumpkinSpice and PumpkinCookie.
Where did you save your image to? Also, did you save it to minecraft.jar and your temporary folder in exactly the same directory
So far, I've found a few changes in code. Instead of re-filming 2 hours worth of film and taking 24 hours to render it, I will instead upload a couple videos identifying the changes for changed code and directly link it to the previous tutorials. One of them is filmed already and just needs to be uploaded!
That guy that makes the wheels turn.. Y'know...
Is the temporary folder necessary? I just drag the png's to the to the minecraft folder in bin in mcp. at that point I recompile and reobf, and i get like 4 .class files, which i drag to the .jar and open the game. does putting the png's in the bin>minecraft after the recompile and reobf make a difference? cause now i think about it... I may put them in after I recompile and stuff. but I just drag the png's to the .jar itself with the classes. it worked with just the PumpkinSpice
the pic is names PumpkinCookie (.png is hidden(maybe i should show extensions) but it is a .png
and in the code, i put /PumpkinCookie.png
and the pic is not in any folders, I just drag it straight to the minecraf.jar
Is there rules to adding more code to a mod? I've followed this tut on making custom armor and nothing works. It doesn't crash, but nothing involving the mod works. Anyone wanna do a skype chat? I'm having just problem after problem here....
It sais in Eclipse : The method setPotionEffect(string) in the type Item is not applicable for the arguments (int, int, int, int, float). What´s wrong
Art by me: MrPancakeWolfie@DeviantArt
HugeMinefan
I believe temp folder is necessary when your going to test your mod in Eclipse. That's what I thought anyways.
I'll look into that one too.
First off, does your mod even boot? Like can you do ANYTHING with your mod? Like crafting, or just seeing your items? If you can't do anything with your mod, it's either ModLoader is not installed, or a coding error. Post your code please?
That guy that makes the wheels turn.. Y'know...
No, the mod wouldn't boot. I know ModLoader was installed cause I forgot the first time, and added it and tried again, and got the same results. No, no part of the mod was working, no new items, no crafting, nothing involving the mod.
Well, i'm not bothering with trying to test it in eclipse. I just force a new jar download when things screw up.
Here's what I have. I took the PumpkinCookie part of the mod out cause I wanted to try armor, though I'd like the cookie to work
'
That's all I have regarding the mod for coding atm. I deleted the PumpkinCookie item class as I said because I wasn't using it.
The mod works when it's only PumpkinSpice in the mod, 3 pumpkins makes Pumpkin Spice, that DOES work. It's just, it screws up whenever I add something else.
Umm, idk what you want me to do with that... Is that a correction? and /PumpkinCookie.png IS the image, not a folder. I made a folder for the images now, but, still, nothing works. I grag the image into the .jar and it's called PumpkinCookie (like i said the extension is hidden on my comp, but it is a png) SO it should look and find. I just followed the rough idea as the PumpkinSpice for the image location of the Pumpkin Cookie. like they are both the same, I just change one from Spice to Cookie, as they are both in the same location: just right in the .jar. (however now, they are both in a folder called modpng.
WAIT I never changed the location of the spice in the code, I'll try that quick.
Screwed something up, crashed on opening. at least its reading something now...
package net.minecraft.src;
import java.util.Random;
public class mod_Sulfite extends BaseMod
{
public static final Block SulfiteOre;
public static Item SulfiteShard;
public static Item CreepiteShard;
public static Item CreepiteGem;
static
{
SulfiteOre = (new BlockSulfiteOre(130, ModLoader.addOverride("/terrain.png", "/mods/SulfiteOre.png"))).setHardness(4F).setResistance(5F).setStepSound(Block.soundStoneFootstep).setBlockName("SulfiteOre");
SulfiteShard = (new Item(1000)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/SulfiteShard.png")).setItemName("SulfiteShard");
CreepiteShard = (new Item(1001)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/CreepiteShard.png")).setItemName("CreepiteShard");
CreepiteGem = (new Item(1002)).setIconIndex(ModLoader.addOverride("/gui/items.png", "/mods/CreepiteGem.png")).setItemName("CreepiteGem");
}
public mod_Sulfite()
{
ModLoader.registerBlock(SulfiteOre);
ModLoader.addName(SulfiteOre, "Sulfite Ore");
ModLoader.addName(SulfiteShard, "Sulfite Shard");
ModLoader.addName(CreepiteShard, "Creepite Shard");
ModLoader.addName(CreepiteGem, "Creepite Gem");
ModLoader.addRecipe(new ItemStack(mod_Sulfite.CreepiteShard, 1), new Object[]
{
"SS", Character.valueOf('S'), mod_Sulfite.SulfiteShard
});
ModLoader.addRecipe(new ItemStack(mod_Sulfite.CreepiteGem, 1), new Object[]
{
"CCC","CCC","CCC", Character.valueOf('C'), mod_Sulfite.CreepiteShard
});
ModLoader.addRecipe(new ItemStack(mod_Sulfite.SulfiteOre, 1), new Object[]
{
"DD", Character.valueOf('D'), Block.dirt
});
}
public void load()
{
}
public void GenerateSurface(World world, Random rand, int chunkx, int chunkz)
{
//Spawn SulfiteOre
for(int l = 0; l<21; l++)
{
int SO1 = chunkx + rand.nextInt(16);
int SO2 = rand.nextInt(67);
int SO3 = chunkz + rand.nextInt(16);
(new WorldGenMinable(SulfiteOre.blockID, 8)).generate(world, rand, SO1, SO2, SO3);
}
}
public String getVersion()
{
return "1.0";
}
}
make GenerateSurface generateSurface