re alors j’essaie une nouvelle méthode
| public boolean attackEntityAsMob(Entity p_70652_1_) { |
| int i = this.isTamed() ? 4 : 2; |
| if (this.attackEntityAsMob(player)) |
| { |
| |
| this.worldObj.setEntityState(this, (byte)4); |
| |
| if (this.attackEntityAsMob(p_70652_1_)) |
| { |
| if(this.lvl > 10 && this.attackEntityAsMob(p_70652_1_)) |
| { |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.poison.id, 1000,0)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000,0)); |
| } |
| if(this.lvl > 40 && this.attackEntityAsMob(p_70652_1_)) |
| { |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.weakness.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.wither.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000); |
| } |
| if(this.lvl > 50 && this.attackEntityAsMob(p_70652_1_)) |
| { |
| this.motionY = 2.0F; |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.weakness.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.wither.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000,1)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000); |
| } |
| |
| if(this.lvl > 99 && this.attackEntityAsMob(p_70652_1_)) |
| { |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.wither.id, 2000,3)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000,3)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.hunger.id, 2000,3)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.confusion.id, 500,3)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.blindness.id, 1000,3)); |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2000,3)); |
| this.motionY = 2.0F; |
| ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000); |
| } |
| } |
| return true; |
| } |
| return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i); |
| |
| } |
et elle ne marche pas 
Merci de vos réponse 