En modifiant l’effet par un effet de potion speed donc: ```java
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 10, 10));
J'ai réussi à retirer le bug.
Pour ceux que ça interresse:
ItemMonArmure:
```java
package mod.epicrafting.items;
import java.util.List;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mod.epicrafting.Epicrafting;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
public class ItemAluminiumArmor extends ItemArmor{
public ItemAluminiumArmor(int i, ArmorMaterial enumArmorMaterial, int j, int k) {
super(enumArmorMaterial, j, k);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type){
if(stack.getItem() == Epicrafting.aluminiumHelmet || stack.getItem() == Epicrafting.aluminiumChestplate || stack.getItem() == Epicrafting.aluminiumBoots){
return "Epicrafting:textures/models/armor/aluminium_1.png";
}
if(stack.getItem() == Epicrafting.titaneLeggings){
return "Epicrafting:textures/models/armor/aluminium_2.png";
}
else return null;
};
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg){
if(this == Epicrafting.aluminiumHelmet){
this.itemIcon = reg.registerIcon("Epicrafting:aluminiumHelmet");
}
if(this == Epicrafting.aluminiumChestplate){
this.itemIcon = reg.registerIcon("Epicrafting:aluminiumChestplate");
}
if(this == Epicrafting.aluminiumLeggings){
this.itemIcon = reg.registerIcon("Epicrafting:aluminiumLeggings");
}
if(this == Epicrafting.aluminiumBoots){
this.itemIcon = reg.registerIcon("Epicrafting:aluminiumBoots");
}
}
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean bool){
if(this == Epicrafting.aluminiumHelmet){
// Do Nothing //
}
if(this == Epicrafting.aluminiumChestplate){
// Do Nothing //
}
if(this == Epicrafting.aluminiumLeggings){
// Do Nothing //
}
if(this == Epicrafting.aluminiumBoots){
// Do Nothing //
}
}
public boolean getIsRepairable(ItemStack stack, ItemStack repairItem)
{
if(stack.getItem().equals(this) && repairItem.getItem() == Epicrafting.aluminium)
return true;
return false;
}
public void onArmorTick(World world, EntityPlayer player, ItemStack itemstack)
{
int parX = (int)player.posX, parY = (int)player.posY, parZ = (int)player.posZ;
ItemStack boots = player.getCurrentArmor(0);
ItemStack legs = player.getCurrentArmor(1);
ItemStack chest = player.getCurrentArmor(2);
ItemStack helmet = player.getCurrentArmor(3);
if(boots != null && legs != null && chest != null && helmet != null)
{
if(boots.getItem() == Epicrafting.aluminiumBoots && legs.getItem() == Epicrafting.aluminiumLeggings &&
chest.getItem() == Epicrafting.aluminiumChestplate && helmet.getItem() ==Epicrafting.aluminiumHelmet)
{
player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 10, 10));
}
}
}
}
Merci Robin :). Résolu (Désolé je n’ai pas trouvé comment mettre des balises :/)