@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
You might want to take the last "public void" out. The one at the very bottom. Then your top one should be able to be "public void" without the 1.
And for the textures, call your .png file what it is under the "UnlocalizedName" part. Then make the folders I think I discussed in the earlier part of this topic and it should have your textures.
You might want to take the last "public void" out. The one at the very bottom. Then your top one should be able to be "public void" without the 1.
And for the textures, call your .png file what it is under the "UnlocalizedName" part. Then make the folders I think I discussed in the earlier part of this topic and it should have your textures.
Texture wise, just doing what I said works perfectly. No new to create new files.
that's only available to instances of Item in your main mod file - it shouldn't be there, it should be in the Item's class.
I've no idea why you've put a method to get a version number inside your items class. That's not doing anything. it should be in your mod_*** class, where there's a method called getVersion().
Your constructor of the Item class should be at the top of the items class, not half way up it. You do this to keep the code logical and readable. It won't affect the outcome though.
You've called setCreativeTab() twice - once when instantiating the item, and once in the constructor. Pick one. :3
You don't need to override getDisplayName().
Since that you're using modloader, make sure there's an image called Blob.png in the root of minecraft.jar. Though if I recall correctly, I think I can remember someone saying that ModLoader declares textures based on what you put in setUnlocalizedName(). I've no idea, but if that's true then copy Blob.png and call it Item and put it in the root of minecraft.jar. Since you're overriding updateIcons, it shouldn't matter, but it's just a precaution. :3
I did the 3 things but dont understand what u mean by you dont need to override getDisplayName(). and i dont understand I've no idea why you've put a method to get a version number inside your items class. That's not doing anything. it should be in your mod_*** class, where there's a method called getVersion().
This is what i have now
Basically, make a template off of this. And add in your super(i) method.
package net.minecraft.src;
public class mod_TIRCItem extends BaseMod {
public static final Item Item = new Item(1000).setUnlocalizedName("Name of saved .png file").setCreativeTab(CreativeTabs.tabMaterials);
public void load()
{
ModLoader.addName(Item, "InGame Name");
}
public String getVersion() {
return null;
}
}
That's for your blob Item. Now you need to delete your last method on the bottom. The "public void load()" method. And then take out the middle method. "public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
} "
I highly recommend you learn java in a general sense. It would help you fix your own errors, understand what you're doing, and let you come up with your own non-template-copying solutions. After all, you can't be "new to coding" forever.
The constructor for an object is the method that is called to create it and that is always named after the class for the object. In your case it would be
public ItemBlob(int i)
{
super(i);
maxStackSize = 15;
this.setCreativeTab(CreativeTabs.tabMaterials);
}
The constructor always has the exact same name as the class (without the .class extension, of course)
I highly recommend you learn java in a general sense. It would help you fix your own errors, understand what you're doing, and let you come up with your own non-template-copying solutions. After all, you can't be "new to coding" forever.
The constructor for an object is the method that is called to create it and that is always named after the class for the object. In your case it would be
public ItemBlob(int i)
{
super(i);
maxStackSize = 15;
this.setCreativeTab(CreativeTabs.tabMaterials);
}
The constructor always has the exact same name as the class (without the .class extension, of course)
I did everything right and there is no mod section after installing MCP and Eclispe i run a mac. So i guess it didnt work
I did everything right and there is no mod section after installing MCP and Eclispe i run a mac. So i guess it didnt work
Do you mean mod section on the menu? There won't be a mod until you recompile and re obfuscate it and then move the files into your .jar file. If you just open it in Eclipse, it won't show the mods in the game, just the items and blocks you've made. I'm not quite sure what you're saying. (:
Under the bin that u copy?
You might want to take the last "public void" out. The one at the very bottom. Then your top one should be able to be "public void" without the 1.
And for the textures, call your .png file what it is under the "UnlocalizedName" part. Then make the folders I think I discussed in the earlier part of this topic and it should have your textures.
^^ Click the Signature to go to my page. (: ^^
Texture wise, just doing what I said works perfectly. No new to create new files.
It still doesnt appear in the creative tab under materials. Here is my code:
import net.minecraft.src.BaseMod;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Icon;
import net.minecraft.src.IconRegister;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.StringTranslate;
public class mod_TheLimitMod extends BaseMod{
//The Item//
public static final Item Blob = new Item(1000).setUnlocalizedName("Item").setCreativeTab(CreativeTabs.tabMaterials);
public void load1()
{
ModLoader.addName(Blob, "The eye of the mage");
}
//Texture//
public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
import java.util.Random;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.StringTranslate;
public class ItemBlob extends Item
{
public String getItemDisplayName(ItemStack par1ItemStack)
{
String var2 = ("\u00a74" + StringTranslate.getInstance().translateNamedKey(this.getLocalizedName(par1ItemStack))).trim();
return var2;
}
public ItemBlob(int i)
{
super(i);
maxStackSize = 15;
this.setCreativeTab(CreativeTabs.tabMaterials);
}
public String Version()
{
return "1.4.0";
}
}
it is
Okay whatever your (.setUnlocalizedName) is, set your item in your folder to that name. I don't believe you have to have that extra part:
public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
}
Are you working in Forge or ModLoader?
^^ Click the Signature to go to my page. (: ^^
Im working with ModLoader because Forge wasnt working and i have the public void Icon Index thing. Im Coding in 1.5.1
I did the 3 things but dont understand what u mean by you dont need to override getDisplayName(). and i dont understand I've no idea why you've put a method to get a version number inside your items class. That's not doing anything. it should be in your mod_*** class, where there's a method called getVersion().
This is what i have now
import net.minecraft.src.BaseMod;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Icon;
import net.minecraft.src.IconRegister;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.StringTranslate;
public class mod_TheLimitMod extends BaseMod{
//The Item//
public static final Item Blob = new Item(1000).setUnlocalizedName("Blob");
public void load()
{
ModLoader.addName(Blob, "The eye of the mage");
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
}
import java.util.Random;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.StringTranslate;
public class ItemBlob extends Item
{
public String getItemDisplayName(ItemStack par1ItemStack)
{
String var2 = ("\u00a74" + StringTranslate.getInstance().translateNamedKey(this.getLocalizedName(par1ItemStack))).trim();
return var2;
}
//Texture//
public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
}
public ItemBlob(int i)
{
super(i);
maxStackSize = 15;
this.setCreativeTab(CreativeTabs.tabMaterials);
}
public String Version()
{
return "1.4.0";
}
}
Srry for all the qusetions because im new to codding do i delete
{
String var2 = ("\u00a74" + StringTranslate.getInstance().translateNamedKey(this.getLocalizedName(par1ItemStack))).trim();
return var2;
}
Or Do i delete only
And What is the ItemBlobs Cunstructer?
package net.TheLimitMod.src;
import net.minecraft.src.BaseMod;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Icon;
import net.minecraft.src.IconRegister;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.ModLoader;
import net.minecraft.src.StringTranslate;
public class mod_TheLimitMod extends BaseMod{
//The Item//
public static final Item Blob = new Item(1000).setUnlocalizedName("Item").setCreativeTab(CreativeTabs.tabMaterials);
public void load1()
{
ModLoader.addName(Blob, "The eye of the mage");
}
//Texture//
public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
@Override
public void load() {
// TODO Auto-generated method stub
}
}
package net.minecraft.src;
import java.util.Random;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.StringTranslate;
public class ItemBlob extends Item
{
public String getItemDisplayName(ItemStack par1ItemStack)
{
String var2 = ("\u00a74" + StringTranslate.getInstance().translateNamedKey(this.getLocalizedName(par1ItemStack))).trim();
return var2;
}
public ItemBlob(int i)
{
super(i);
maxStackSize = 15;
this.setCreativeTab(CreativeTabs.tabMaterials);
}
public String Version()
{
return "1.4.0";
}
}
Basically, make a template off of this. And add in your super(i) method.
package net.minecraft.src;
public class mod_TIRCItem extends BaseMod {
public static final Item Item = new Item(1000).setUnlocalizedName("Name of saved .png file").setCreativeTab(CreativeTabs.tabMaterials);
public void load()
{
ModLoader.addName(Item, "InGame Name");
}
public String getVersion() {
return null;
}
}
That's for your blob Item. Now you need to delete your last method on the bottom. The "public void load()" method. And then take out the middle method. "public void updateIcons(IconRegister iconRegister)
{
Icon iconIndex = iconRegister.registerIcon("Blob");
} "
^^ Click the Signature to go to my page. (: ^^
I highly recommend you learn java in a general sense. It would help you fix your own errors, understand what you're doing, and let you come up with your own non-template-copying solutions. After all, you can't be "new to coding" forever.
The constructor for an object is the method that is called to create it and that is always named after the class for the object. In your case it would be
The constructor always has the exact same name as the class (without the .class extension, of course)
I did everything right and there is no mod section after installing MCP and Eclispe i run a mac. So i guess it didnt work
Do you mean mod section on the menu? There won't be a mod until you recompile and re obfuscate it and then move the files into your .jar file. If you just open it in Eclipse, it won't show the mods in the game, just the items and blocks you've made. I'm not quite sure what you're saying. (:
^^ Click the Signature to go to my page. (: ^^