aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/util/MCUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/makamys/neodymium/util/MCUtil.java')
-rw-r--r--src/main/java/makamys/neodymium/util/MCUtil.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/util/MCUtil.java b/src/main/java/makamys/neodymium/util/MCUtil.java
index 7a2694d..2e14d16 100644
--- a/src/main/java/makamys/neodymium/util/MCUtil.java
+++ b/src/main/java/makamys/neodymium/util/MCUtil.java
@@ -1,5 +1,10 @@
package makamys.neodymium.util;
+import static makamys.neodymium.Neodymium.LOGGER;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.util.ChatComponentText;
import net.minecraft.world.biome.BiomeGenBase;
public class MCUtil {
@@ -17,4 +22,15 @@ public class MCUtil {
}
}
+ public static void showChatMessage(String text) {
+ EntityPlayer player = Minecraft.getMinecraft().thePlayer;
+
+ if(player != null) {
+ ChatComponentText cc = new ChatComponentText(text);
+ player.addChatComponentMessage(cc);
+ } else {
+ LOGGER.info(text);
+ }
+ }
+
}