20 déc. 2015, 17:36

Bonsoir j’essaye depuis ce matin a faire en sorte que quand je fais clic droit avec un item sur un joueur (Entité) une action s’exécute mais j’y arrive pas…

CODE:

 public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
   if (lvl != 0)
     lvl2 = Math.abs(lvl / 2);
   else if (lvl == 0) {
     lvl2 = Math.abs(lvl);
   }
   this.lvlS = Integer.toString(lvl2);
   return itemstack;
 }

J’ai essayé avec [size=smallEntityInteractEvent marche toujours pas .]
[size=smallCordialement Flo.]