Hello Modders,
I'll make a Mod, that only add Recipes,
but I have I problem, I would add a Recipe,
where a Item get damage, I know how I can do that with self-created Items,
but it doesn't work with vanilla Items:
The problem is: The Item that should take damage will consumed....
Can I fix that? If I can fix that, how?
I hope you can understand that, because my english is bad
I hope anyone can answer me, thanks in advance
~MineLoad
I do not quite understand because I doesn't speak english so good...
can anyone give me a short tutorial to this? Or gives it a german tutorial, because I doesn't find anyone?
I hope you can answer me, thanks in advance!
~MineLoad
Ok thanks, now I can teleport me with the staff, but the staff doesn't take damage, I have find a command but it doesent work
My code:
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer player)
{
if(Minecraft.getMinecraft().objectMouseOver!=null)
{
int xm=Minecraft.getMinecraft().objectMouseOver.blockX;
int ym=Minecraft.getMinecraft().objectMouseOver.blockY;
int zm=Minecraft.getMinecraft().objectMouseOver.blockZ;
player.setPositionAndUpdate(xm, ym, zm);
player.fallDistance=0F;
par1ItemStack.damageItem(1, player); //with this command it should be take damage
}
return par1ItemStack;
}
Hi Forge-Modder & Co.
I have a problem because I will make a teleport staff, but if i teleport me it teleport me to myself and it should teleport me a few blocks in viewing direction...
And can i make that the Staff has durability?
I hope you can answer me, thanks in advanced ~ML
Here is my code:
@Override
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player)
{
player.setPositionAndUpdate(player.posX , player.posY , player.posZ);
return super.onItemRightClick(itemstack, world, player);
}
10 replies
Important Information
By using this site, you agree to our Terms of Use.