Still doesn't work. Could my directories be wrong? My files are with the source, and my textures are in Bin>Minecraft>MangMod. I use startclient to run my tests. I put my dirt blocks in bucket-shaped pattern, and nothing.
package net.minecraft.src;
import java.util.Map;
public class mod_Mangmod extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(Innocent Villager.class, "Innocent Villager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(Innocent Villager.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public static final Item Glass Cup = new Glass Cup(5000).setItemName("Glass Cup");
{
Glass Cup.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Glass Cup.png");
ModLoader.addName(Glass cup, "Glass Cup");
ModLoader.addRecipe(new ItemStack(Glass Cup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.Dirt});
}
public static final Item Apple Juice = new Apple Juice(5001).setItemName("Apple Juice");
{
Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Apple Juice.png");
ModLoader.addName(Apple Juice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(Apple Juice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), Glass Cup});
}
public String getVersion()
{
return "1.2.5";
}
}
You need to take the "public static final" lines out of the load() method, like this:
package net.minecraft.src;
import java.util.Map;
public class mod_Mangmod extends BaseMod
{
public static final Item Glass Cup = new Glass Cup(5000).setItemName("Glass Cup");
public static final Item Apple Juice = new Apple Juice(5001).setItemName("Apple Juice");
public void load()
{//this is were the load() method starts
ModLoader.registerEntityID(Innocent Villager.class, "Innocent Villager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(Innocent Villager.class, 12, 14, 18, EnumCreatureType.creature);
Glass Cup.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Glass Cup.png");
ModLoader.addName(Glass cup, "Glass Cup");
ModLoader.addRecipe(new ItemStack(Glass Cup, 1), new Object [] {"# #", " # ",
Character.valueOf('#'), Block.Dirt});
Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Apple Juice.png");
ModLoader.addName(Apple Juice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(Apple Juice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), Glass Cup});
}// this is were it ends
public void addRenderer(Map map)
{
map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
package net.minecraft.src;
import java.util.Map;
public class mod_Mangmod extends BaseMod
{
public static final Item Glass Cup = new Glass Cup(5000).setItemName("Glass Cup");
public static final Item Apple Juice = new Apple Juice(5001).setItemName("Apple Juice");
public void load()
{
ModLoader.registerEntityID(Innocent Villager.class, "Innocent Villager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(Innocent Villager.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F));
}
{
Glass Cup.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Glass Cup.png");
ModLoader.addName(Glass cup, "Glass Cup");
ModLoader.addRecipe(new ItemStack(Glass Cup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.Dirt});
}
{
Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Apple Juice.png");
ModLoader.addName(Apple Juice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(Apple Juice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), Glass Cup});
}
public String getVersion()
{
return "1.2.5";
}
}
Try making your items/blocks and other things have less spaces... For instance, make "Glass Cup" into "glassCup" and "Apple Juice" to "appleJuice". That's your main problem, I think. Spaces are not your friend in java. (or other programming languages, for that matter) Other than that, all capitalization need to be exact wherever you declare them.
Also, your images are in bin>minecraft>MangMod? Like, exactly that? (MangMod without a space?) If so, you need to get rid of the space in your texture override. The only place I'd say spaces aren't dangerous is when pointing to directories, so long as you declare it in your code exactly how it's written as a directory name.
Hi @TechGuy543, my code now works!! YEY!! all of it is perfect - only problem is with the texture.
I drew the texture 32x32 so it looks really good - only problem IS, is that the game for some reason converts the picture into a 16x16 picture and it look, well, crappy. Please help mate (btw your mod tuts are AMAZING)
You need to start off with something 16x. If you want it to be 32x later, that's fine. Put it into a texture pack and install your mod to a game that also has optifine installed or something. At the moment, you're modding a game that by default only runs 16x. So, for now, you'll have to deal with 16x placeholders.
Rollback Post to RevisionRollBack
I used to maintain the Minecraft Forums Mod List. However, life has stepped in the way of that. Perhaps later...
You know, I have other things in my life to do as well. Most of which are more important than these tutorials. Being like that and asking to hurry up only makes me want to take longer to do it.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You should add armor tutorials... all the way from rendering on the player to simple coding it, all I need is the rendering it on the player.... But other people would probably find it useful too! Thanks! (I'll probably credit you on my mod!)
TechGuy has a life you know. Someone already asked about it. He said he has more important matters. Accept that. Sure, it would be cool to have an armor tutorial, but you just have to be patient.
TechGuy has a life you know. Someone already asked about it. He said he has more important matters. Accept that. Sure, it would be cool to have an armor tutorial, but you just have to be patient.
Thankyou! At least someone understands. I wish I could give you a million reputation points.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
public class glasscup extends Item
{
public glasscup(int i)
{
super(i);
maxStackSize = 64;
}
}
I have fixed your code:
package net.minecraft.src;
import java.util.Map;
public class mod_MangMod extends BaseMod
{
public static final Item glassCup = new glasscup(5000).setItemName("glasscup");
public static final Item appleJuice = new applejuice(5001).setItemName("applejuice");
public void load()
{
ModLoader.registerEntityID(InnocentVillager.class, "InnocentVillager", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(InnocentVillager.class, 12, 14, 18, EnumCreatureType.creature);
glassCup.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/glasscup.png");
ModLoader.addName(glassCup, "Glass Cup");
ModLoader.addRecipe(new ItemStack(glassCup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.dirt});
appleJuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/applejuice.png");
ModLoader.addName(appleJuice, "Apple Juice");
ModLoader.addRecipe(new ItemStack(appleJuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Item.appleRed, Character.valueOf('%'), glassCup});
}
public void addRenderer(Map map)
{
map.put(InnocentVillager.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
1. You had several capitalization errors. Always check them.
2. There was a space in "Apple Juice"'s icon index. You cannot have spaces in the names of variables or objects.
I don't doubt you have other stuff to do, but you're saying you're trying to make a dimension right now, and it's not even on your To-Do. And well, if someone asks for something it doesn't definitely mean you have to give up all your free time and do it.
The dimension is for my own mod, not these tutorials.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Just wondering, how would you make an ore or something else glow when touched or powered?
You need to make another block which has a light value and make the non-glowing block convert to it when powered. Have a look at BlockRedstoneOre. If you need any more help just ask.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You need to make another block which has a light value and make the non-glowing block convert to it when powered. Have a look at BlockRedstoneOre. If you need any more help just ask.
thanks
Rollback Post to RevisionRollBack
Go check out the rules (rules.mcf.li)
Special thanks to Goodlyay for my avatar!
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI got this from signature craft!
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Curse Premiummake sure to note the "/"
You need to take the "public static final" lines out of the load() method, like this:
package net.minecraft.src; import java.util.Map; public class mod_Mangmod extends BaseMod { public static final Item Glass Cup = new Glass Cup(5000).setItemName("Glass Cup"); public static final Item Apple Juice = new Apple Juice(5001).setItemName("Apple Juice"); public void load() {//this is were the load() method starts ModLoader.registerEntityID(Innocent Villager.class, "Innocent Villager", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(Innocent Villager.class, 12, 14, 18, EnumCreatureType.creature); Glass Cup.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Glass Cup.png"); ModLoader.addName(Glass cup, "Glass Cup"); ModLoader.addRecipe(new ItemStack(Glass Cup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.Dirt}); Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Apple Juice.png"); ModLoader.addName(Apple Juice, "Apple Juice"); ModLoader.addRecipe(new ItemStack(Apple Juice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), Glass Cup}); }// this is were it ends public void addRenderer(Map map) { map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F)); } public String getVersion() { return "1.2.5"; } }-
View User Profile
-
View Posts
-
Send Message
Curse Premiumpackage net.minecraft.src; import java.util.Map; public class mod_Mangmod extends BaseMod { public static final Item Glass Cup = new Glass Cup(5000).setItemName("Glass Cup"); public static final Item Apple Juice = new Apple Juice(5001).setItemName("Apple Juice"); public void load() { ModLoader.registerEntityID(Innocent Villager.class, "Innocent Villager", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(Innocent Villager.class, 12, 14, 18, EnumCreatureType.creature); } public void addRenderer(Map map) { map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F)); } { Glass Cup.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Glass Cup.png"); ModLoader.addName(Glass cup, "Glass Cup"); ModLoader.addRecipe(new ItemStack(Glass Cup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.Dirt}); } { Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/Mang Mod/Apple Juice.png"); ModLoader.addName(Apple Juice, "Apple Juice"); ModLoader.addRecipe(new ItemStack(Apple Juice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), Glass Cup}); } public String getVersion() { return "1.2.5"; } }-
View User Profile
-
View Posts
-
Send Message
Retired StaffTry making your items/blocks and other things have less spaces... For instance, make "Glass Cup" into "glassCup" and "Apple Juice" to "appleJuice". That's your main problem, I think. Spaces are not your friend in java. (or other programming languages, for that matter) Other than that, all capitalization need to be exact wherever you declare them.
Also, your images are in bin>minecraft>MangMod? Like, exactly that? (MangMod without a space?) If so, you need to get rid of the space in your texture override. The only place I'd say spaces aren't dangerous is when pointing to directories, so long as you declare it in your code exactly how it's written as a directory name.
Hope that helps.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou need to start off with something 16x. If you want it to be 32x later, that's fine. Put it into a texture pack and install your mod to a game that also has optifine installed or something. At the moment, you're modding a game that by default only runs 16x. So, for now, you'll have to deal with 16x placeholders.
You know, I have other things in my life to do as well. Most of which are more important than these tutorials. Being like that and asking to hurry up only makes me want to take longer to do it.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premiummod_MangMod.class (mcp>src>minecraft>net>Minecraft>src)
package net.minecraft.src; import java.util.Map; public class mod_MangMod extends BaseMod { public static final Item glasscup = new glasscup(5000).setItemName("glasscup"); public static final Item applejuice = new applejuice(5001).setItemName("applejuice"); public void load() { ModLoader.registerEntityID(InnocentVillager.class, "InnocentVillager", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(InnocentVillager.class, 12, 14, 18, EnumCreatureType.creature); } public void addRenderer(Map map) { map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F)); } { glasscup.iconIndex = ModLoader.addOverride("/gui/items.png", "/MangMod/glasscup.png"); ModLoader.addName(glasscup, "Glass Cup"); ModLoader.addRecipe(new ItemStack(glasscup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.Dirt}); } { Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/MangMod/applejuice.png"); ModLoader.addName(Apple Juice, "Apple Juice"); ModLoader.addRecipe(new ItemStack(applejuice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), glasscup}); } public String getVersion() { return "1.2.5"; } }glasscup.java
package net.minecraft.src; public class glasscup extends Item { public glasscup(int i) { super(i); maxStackSize = 1; } }And can someone tell me how to make an item like a spawn egg? I want to spawn my custom NPC to test it.
Download my first mod, the Phyllium Crystal Mod, today!
TechGuy has a life you know. Someone already asked about it. He said he has more important matters. Accept that. Sure, it would be cool to have an armor tutorial, but you just have to be patient.
-
View User Profile
-
View Posts
-
Send Message
Curse Premiummod_Mangmod.class (mcp>src>minecraft>net>Minecraft>src)
package net.minecraft.src; import java.util.Map; public class mod_MangMod extends BaseMod { public static final Item glasscup = new glasscup(5000).setItemName("glasscup"); public static final Item applejuice = new applejuice(5001).setItemName("applejuice"); public void load() { ModLoader.registerEntityID(InnocentVillager.class, "InnocentVillager", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(InnocentVillager.class, 12, 14, 18, EnumCreatureType.creature); glasscup.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/glasscup.png"); ModLoader.addName(glasscup, "Glass Cup"); ModLoader.addRecipe(new ItemStack(glasscup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), block.dirt}); Apple Juice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/applejuice.png"); ModLoader.addName(applejuice, "Apple Juice"); ModLoader.addRecipe(new ItemStack(applejuice, 1), new Object [] {" # ", " # ", " % ", Character.valueOf('#'), item.Apple, Character.valueOf('%'), glasscup}); } public void addRenderer(Map map) { map.put(Innocent Villager.class, new RenderBiped(new ModelBiped(), 0.5F)); } public String getVersion() { return "1.2.5"; } }glasscup.java (mcp>src>minecraft>net>Minecraft>src)
package net.minecraft.src; public class glasscup extends Item { public glasscup(int i) { super(i); maxStackSize = 64; } }Thankyou! At least someone understands. I wish I could give you a million reputation points.
together they are powerful beyond imagination."
I have fixed your code:
package net.minecraft.src; import java.util.Map; public class mod_MangMod extends BaseMod { public static final Item glassCup = new glasscup(5000).setItemName("glasscup"); public static final Item appleJuice = new applejuice(5001).setItemName("applejuice"); public void load() { ModLoader.registerEntityID(InnocentVillager.class, "InnocentVillager", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(InnocentVillager.class, 12, 14, 18, EnumCreatureType.creature); glassCup.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/glasscup.png"); ModLoader.addName(glassCup, "Glass Cup"); ModLoader.addRecipe(new ItemStack(glassCup, 1), new Object [] {"# #", " # ", Character.valueOf('#'), Block.dirt}); appleJuice.iconIndex = ModLoader.addOverride("/gui/items.png", "/mangmod/applejuice.png"); ModLoader.addName(appleJuice, "Apple Juice"); ModLoader.addRecipe(new ItemStack(appleJuice, 1), new Object [] {"#", "#", "%", Character.valueOf('#'), Item.appleRed, Character.valueOf('%'), glassCup}); } public void addRenderer(Map map) { map.put(InnocentVillager.class, new RenderBiped(new ModelBiped(), 0.5F)); } public String getVersion() { return "1.2.5"; } }1. You had several capitalization errors. Always check them.
2. There was a space in "Apple Juice"'s icon index. You cannot have spaces in the names of variables or objects.
The dimension is for my own mod, not these tutorials.
together they are powerful beyond imagination."
Your welcome. Thanks for the rep compliment too
Just wondering, how would you make an ore or something else glow when touched or powered?
You need to make another block which has a light value and make the non-glowing block convert to it when powered. Have a look at BlockRedstoneOre. If you need any more help just ask.
together they are powerful beyond imagination."
thanks