package net.silentchaos512.gems.lib;

import java.util.List;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.silentchaos512.gems.SilentGems;

public class Greetings {

  public static final String PREFIX = "misc.silentgems:alpha";

  public static void greetPlayer(EntityPlayer player) {

    // Reset the random object, because it seems to yield the same value each time. Huh?
    SilentGems.instance.random.setSeed(System.currentTimeMillis());

    List<String> list = SilentGems.instance.localizationHelper.getDescriptionLines(PREFIX);
    String msg = SilentGems.instance.localizationHelper.getLocalizedString(PREFIX + "Prefix") + " ";
    int index = SilentGems.instance.random.nextInt(list.size());
//    SilentGems.instance.logHelper.debug(list.size(), index);
    msg += list.get(index);
    player.addChatMessage(new TextComponentString(TextFormatting.RED + msg));
  }
}

@@ -245,16 +245,65 @@
 entGems;
+%0Aimport net.silentchaos512.lib.util.PlayerHelper;
 %0A%0Apublic
@@ -863,13 +863,14 @@
 ));%0A
-//
+ 
    
+//
  Sil
@@ -955,22 +955,28 @@
 x);%0A    
-p
+P
 layer
+Helper
 .addChat
@@ -987,32 +987,16 @@
 age(
-new TextComponentString(
+player, 
 Text
@@ -1016,16 +1016,168 @@
 D + msg)
+;%0A%0A    // TODO: Remove this later.%0A    PlayerHelper.addChatMessage(player,%0A        %22Yes, the numbers in the upper-left are my fault. I'm working on it.%22
 );%0A  %7D%0A%7D

Add greeting line about chaos text.