Hey, I tried to display a random item description among a pre-defined message list. It doesn't works so much well because instead of displaying one message, the description is blinking, displaying all the predefined messages at each second.
Here is my code :
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
String[] randMessages = new String[]{"Alpha", "Bravo", "Charlie"};
String randMessage = randMessages[player.getRNG().nextInt(randMessages.length)];
list.add(EnumChatFormatting.RED + randMessage);
}
Does anyone know the solution?
Thank you so much,
Best regards