Plop, ça fait depuis un moment que j’essaie d’appliquer un son a mon mob
pour la classe eventsound j’ai essayé .addSound(“dofusmobs:bouftou_ambiant.ogg”); ainsi que .addStreaming(“dofusmobs:bouftou_ambiant.ogg”);
dans mon coremod j’appelle bien le eventsound
if(event.getSide().isClient())
{
MinecraftForge.EVENT_BUS.register(new EventSoundDofusMobs());
}
mes sont sont bien dans forge/src/assets/dofusmob/sound…
J’ai un peux tout essayé et rien…
/* Returns the sound this mob makes while it's alive.
*/
protected void getLivingSound(World world, int x, int y, int z)
{
world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "dofusmobs:bouftou_ambiant.ogg", 1.0F, 1.0F);
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected void getHurtSound(World world, int x, int y, int z)
{
world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "dofusmobs.sound.bouftou_ambiant.ogg", 1.0F, 1.0F); }
/**
* Returns the sound this mob makes on death.
*/
protected void getDeathSound(World world, EntityPlayer player)
{
world.playSoundAtEntity(player, "dofusmobs:bouftou_ambiant.ogg", 1.0F, 1.0F);
}
protected String getAttackSound()
{
return "dofusmobs:bouftou_attaque.ogg";
}
Donc… Bizzare…
J’ai aussi un autre probleme dont je viens de m’en rendre compte…
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
if (mobLevel == 11)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(8.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(1.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(0.0D);
this.experienceValue = 50;
}
if (mobLevel == 12)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(10.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(1.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(0.0D);
this.experienceValue = 60;
}
if (mobLevel == 13)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(12.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(1.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(0.0D);
this.experienceValue = 70;
}
if (mobLevel == 14)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(18.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(1.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(0.0D);
this.experienceValue = 80;
}
if (mobLevel == 15)
{
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setAttribute(22.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(1.0D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(2.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setAttribute(0.0D);
this.experienceValue = 90;
}
}
Je voulais faire en sorte que si le mob est level 11 alors il a tel stat, s’il est level 15 alors il prend tel stats… Le soucis c’est que le level 11 a les mêmes stats que le 15… Or, j’aurai pensé que ça aurai fonctionné comme ça… J’ai loupé un truc ?
Merci