@‘robin4002’:
protected Entity findPlayerToAttack()
{
if (this.getHealth() > 0.0F)
{
EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
if(entityplayer != null && this.canEntityBeSeen(entityplayer))
{
entityplayer.addChatComponentMessage(new ChatComponentTranslation("tile.seifer.voleur1", new Object[0]));
entityplayer.addChatComponentMessage(new ChatComponentTranslation("tile.reflet.informationVoleur1", new Object[0]));
this.playSound("modminekingdomhearts:informationSE", this.getSoundVolume(), this.getSoundPitch());
return entityplayer;
}
}
return null;
}
J’aurai fait comme ça.
Ca marche un grand merci à toi Robin