[1.8.1] Item
+2
rt8269
Strengthowns
6 posters
MC Modding :: Modding :: Singleplayer Modding :: Tutorials
Page 1 of 1
[1.8.1] Item
Item
- Spoiler:
- ItemNamehere
- Code:
package net.minecraft.src;
import java.util.Random;
public class ItemNamehere extends Item
{
public ItemNamehere (int i)
{
super(i);
maxStackSize = 64;
}
}
mod_Namehere- Code:
package net.minecraft.src;
public class mod_Namehere extends BaseMod
{
public static final Item Namehere = new Item(30000).setItemName("Namehere");
public mod_Namehere()
{
Namehere.iconIndex = ModLoader.addOverride("/gui/items.png", "/Namehere.png");
ModLoader.AddName(Namehere, "Namehere");
ModLoader.AddRecipe(new ItemStack(Namehere, 1), new Object[] {
"XPX", "PSP", "XPX", Character.valueOf('P'), Item.porkCooked, Character.valueOf('X'), Item.redstone, Character.valueOf('S'), Item.swordStone
});
}
public String Version()
{
return "1.7.3";
}
}
Help: ItemNamehere
1. This file is very simple, the only thing you need to know about is the stacksize which is a no--brainer...Help: mod_Namehere
1. In the "public static final" part, the 30,000 is the ID for it and it's different to blocks. Item ID's can go up to 32,000!
2. "setitemname blablabla" is the name for it in the coding, not in-game.
3. "Namehere.iconIndex etc." at the end of it is your item's name.
4. "Modloader.AddName" the first Namehere is the name you use in the coding, and the second one is the name in-game.
5. For the version thing, you can change the 1.7.3 to what ever you want. It will show up in the modloader error log.
Re: [1.8.1] Item
how do i make it change to another item when i right click??
rt8269- Member
- Posts : 4
Join date : 2011-10-31
Re: [1.8.1] Item
this will help you
http://zidmc.x10.bz/viewtopic.php?f=16&t=692
i mean this https://www.youtube.com/watch?v=38kRK8DB2f4 its much more helpful
i mean this https://www.youtube.com/watch?v=38kRK8DB2f4 its much more helpful
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [1.8.1] Item
@Ikke009 how do I make an item so that upon right click it increases your movement speed for 30 seconds?
*Optional* Maybe make the durability bar go down so you know how much time you have left. But don't make it destroy when it reaches 0! the item is expensive.
*Optional* Maybe make the durability bar go down so you know how much time you have left. But don't make it destroy when it reaches 0! the item is expensive.
mastereric- Member
- Posts : 30
Join date : 2011-10-26
Re: [1.8.1] Item
i dont know.. the loop for the durability shouldnt be too hard, just make it so that if durability => 1 then durability = durability - 1 or something..
for increased speed, maybe there is something that can help you in one of the .java files that does the sprinting?
for increased speed, maybe there is something that can help you in one of the .java files that does the sprinting?
ikke009- Member
- Posts : 65
Join date : 2011-10-24
Age : 30
Location : The netherlands
Re: [1.8.1] Item
that is an old tut....
i just NEED help!!!
can someone look at my code??
i just NEED help!!!
can someone look at my code??
rt8269- Member
- Posts : 4
Join date : 2011-10-31
Re: [1.8.1] Item
ok there is no error but the item wont do anything when i right click. it is made for giving me a stick on right click.
- Code:
package net.minecraft.src;
public class ItemSwitchbladeclosed extends Item
{
public ItemSwitchbladeclosed(int i, int j)
{
super(i);
setMaxStackSize(1);
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return new ItemStack(Item.stick);
}
}
rt8269- Member
- Posts : 4
Join date : 2011-10-31
Re: [1.8.1] Item
- Code:
package net.minecraft.src;
public class ItemSwitchbladeclosed extends Item
{
public ItemSwitchbladeclosed(int i)
{
super(i);
maxStackSize = 1;
}
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
return new ItemStack(Item.stick, 1);
}
}
cosbraa- Member
- Posts : 2
Join date : 2011-11-06
Re: [1.8.1] Item
how do i make an item that does damage like a sword??? i looked in the itemsword.java and there are things i don't need like to be able to block. if u could help me that would be great!
rt8269- Member
- Posts : 4
Join date : 2011-10-31
Similar topics
» [1.8.1] Recharging Item
» [SSP Modding For 1.0.0] How To Make An Item For 1.0.0
» How to make a new fuel item {answered}
» [Unanswered]How to make rechargeable item do stuff
» [SSP Modding For 1.0.0] How To Make An Item For 1.0.0
» How to make a new fuel item {answered}
» [Unanswered]How to make rechargeable item do stuff
MC Modding :: Modding :: Singleplayer Modding :: Tutorials
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum