MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0

3 posters

Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by jaojake1804 Thu Dec 01, 2011 12:13 am

The coding for ModLoader has changed in the 1.0.0 update. Here is the code for items in 1.0.0.

This Goes In ItemNameHere

Code:

package net.minecraft.src;

public class ItemNameHere extends Item
{

    public ItemNameHere(int i)
    {
        super(i);
        setMaxStackSize(64);
    }
}

And This Into mod_NameHere

Code:

package net.minecraft.src;
import java.util.Random;

public class mod_NameHere extends BaseMod
{
      public static final ItemNameHere = new ItemNameHere(800, 0).setItemName("Heart");

  public void load() {
      ModLoader.AddName(ItemNameHere, "NameHere");
      ItemNameHere.iconIndex = ModLoader.addOverride("/gui/items.png", "/NameHere.png");
      ModLoader.AddRecipe(new ItemStack(NameHere, 64), new Object[] {
      "***", "***","***", Character.valueOf('*'), Block.dirt
  });

  public String getVersion()
  {
      return "1.0.0";
  }
}


This is the usuall. NameHere replaced with your mod/item name.
In the live ItemNameHere(800, 0) The 800 becomes the Item ID number.
Any questions. Just ask Smile

jaojake1804
Member

Posts : 10
Join date : 2011-10-26

Back to top Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty Re: [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by mastereric Thu Dec 01, 2011 5:06 pm

Question: HOW IS THIS DIFFERENT???
mastereric
mastereric
Member

Posts : 30
Join date : 2011-10-26

Back to top Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty Re: [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by jaojake1804 Thu Dec 01, 2011 7:24 pm

the constructor is mod_NameHere instead of public mod_NameHere() its public void load () Razz

jaojake1804
Member

Posts : 10
Join date : 2011-10-26

Back to top Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty Re: [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by riccardoNL Mon Dec 05, 2011 6:09 pm

jaojake1804 wrote:the constructor is mod_NameHere instead of public mod_NameHere() its public void load () Razz

AND the string version is not getVersion;

riccardoNL
Member

Posts : 2
Join date : 2011-11-18

Back to top Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty Re: [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by jaojake1804 Mon Dec 05, 2011 10:48 pm

AND the string version is not getVersion;

Yes, and that Razz

Thanks

jaojake1804
Member

Posts : 10
Join date : 2011-10-26

Back to top Go down

[SSP Modding For 1.0.0] How To Make An Item For 1.0.0 Empty Re: [SSP Modding For 1.0.0] How To Make An Item For 1.0.0

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum