MC Modding
Please register and join the community!

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

View previous topic View next topic Go down

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

Post by jaojake1804 on 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

View user profile

Back to top Go down

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

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

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

Posts : 30
Join date : 2011-10-26

View user profile

Back to top Go down

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

Post by jaojake1804 on 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

View user profile

Back to top Go down

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

Post by riccardoNL on 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

View user profile

Back to top Go down

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

Post by jaojake1804 on 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

View user profile

Back to top Go down

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

View previous topic View next topic Back to top


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