<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Baton de teleportation]]></title><description><![CDATA[<p dir="auto">Bonjour, je viens de crée un item qui qu’en on fait clique droit sa lance une enderpearl sauf que je voudrais rajouter que sa abime l’item mais je sait pas ou le mettre et quand je le met stack.damageItem(1, player); sa ne fait rien</p>
<pre><code>package com.mod.olicraft.items;

import net.minecraft.entity.item.EntityEnderPearl;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class TelStick extends Item
{
public TelStick(Item TelStick)
{
   this.setMaxDamage(32);
   this.maxStackSize = 1;
}

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entity)
{
   if (entity.capabilities.isCreativeMode)
   {
       return stack;
   }
   else
   {
       –stack.stackSize;
       world.playSoundAtEntity(entity, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

       if (!world.isRemote)
       {
        world.spawnEntityInWorld(new EntityEnderPearl(world, entity));
       }

       return stack;
   }
}
}
</code></pre>
]]></description><link>https://www.minecraftforgefrance.fr/topic/3028/baton-de-teleportation</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 01:23:36 GMT</lastBuildDate><atom:link href="https://www.minecraftforgefrance.fr/topic/3028.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Apr 2016 17:49:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Baton de teleportation on Fri, 29 Apr 2016 19:36:16 GMT]]></title><description><![CDATA[<p dir="auto">merci <img src="https://www.minecraftforgefrance.fr/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=191f1bb5acb" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://www.minecraftforgefrance.fr/post/38905</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/38905</guid><dc:creator><![CDATA[Ertale]]></dc:creator><pubDate>Fri, 29 Apr 2016 19:36:16 GMT</pubDate></item><item><title><![CDATA[Reply to Baton de teleportation on Fri, 29 Apr 2016 18:12:49 GMT]]></title><description><![CDATA[<pre><code class="java">
package com.mod.olicraft.items;

import net.minecraft.entity.item.EntityEnderPearl;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class TelStick extends Item
{
    public TelStick(Item TelStick)
    {
        this.setMaxDamage(32);
        this.maxStackSize = 1;
    }

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entity)
{
   if (entity.capabilities.isCreativeMode)
   {
       return stack;
   }
   else
   {
       world.playSoundAtEntity(entity, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));

       if (!world.isRemote)
       {
           world.spawnEntityInWorld(new EntityEnderPearl(world, entity));
            stack.damageItem(1, entity); //Ajout ici ! 

       }

       return stack;
   }
}
}

</code></pre>
<p dir="auto">stack.damageItem(1, entity);<br />
Il enlève  de dura lorsque le joueur clique droit</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/38881</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/38881</guid><dc:creator><![CDATA[mosca421]]></dc:creator><pubDate>Fri, 29 Apr 2016 18:12:49 GMT</pubDate></item></channel></rss>