super();
this.setUnlocalizedName("Again With the name");
this.setTextureName("Texture Name in your src\man\resources\assets\customitemmod\textures\items directory");
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("Text Under Item");
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
//You Want to do stuff here when they right click the item
//This kills them
player.setDead();
return itemStack;
}
}
And Your'e Done ! Just run gradlew build and put the jar that is in the build\libs directory into your mods folder
*facepalm* I thought when you said mcpe that you were talking about MCPC+ or the minecraft forge integrated pc multiplayer server. It didn't occur to me that you were talking about pocket edition. Sorry about that
*facepalm* I thought when you said mcpe that you were talking about MCPC+ or the minecraft forge integrated pc multiplayer server. It didn't occur to me that you were talking about pocket edition. Sorry about that
Thanks, please help.
Ok, First you want to use gradle to set up a forge environment, (Note, You have to have JetBrains idea, or Eclipse installed on your computer)
Download the recommended forge version (MAKE SURE TO GET THE ONE THAT SAYS SRC) and extract the files into a folder.
Then open a cmd prompt window by shift clicking on empty space in the folder and clicking open command prompt here.
Run "gradlew setupDecompWorkspace", and then "gradlew idea" or "gradlew eclipse" depending on what IDE you have.
Then change your build script to fit your mod, and then create the same package in your src/main/java directory.
After that, create a base mod class like this one:
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.Mod;
import com.AbdMoazen.CustomItemMod.CustomItem;
@Mod(modid = "CustomItem", version = "1.0", name = "Custom Item")
public class CustomItemMod{
@Mod.EventHandler
public void preinit(FMLPreInitializationEvent){
GameRegistry.registerItem(new CustomItem(), "Custom Item Name");
}
}
And Then Make a Main Item Class:
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import java.util.List;
public class CustomItem extends Item {
public CustomItem(){
super();
this.setUnlocalizedName("Again With the name");
this.setTextureName("Texture Name in your src\man\resources\assets\customitemmod\textures\items directory");
}
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
list.add("Text Under Item");
}
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
//You Want to do stuff here when they right click the item
//This kills them
player.setDead();
return itemStack;
}
}
And Your'e Done
Hope it Helps!
Pay No Attention!: *self
Int = the number id of the item you want to change
String1 = the name of that item
String2 = the new name of the item
e.g...
ModPE.setItem(280,"stick",0,"Branch");
Hope that helps
Pay No Attention!: *self
No problem, thx for trying to help
I need a tut that learns a lot of things like making blocks and what it drops,weapons and change its damage, knock back etc...