28 août 2016, 20:46
@SubscribeEvent
public void achievementEvent (AchievementEvent event)
{
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;

if(event.getAchievement().equals(ModPg2.achievementKillR1a))
{
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("achievementKillR1a accomplis par " + player.getDisplayName());
((EntityClientPlayerMP)player).sendQueue.addToSendQueue(new C17PacketCustomPayload("achievementKillR1a", out.toByteArray()));
}
}

N’oublie pas de l’exécuter client seulement!