Remove isModLoaded check for GTNH Lib (#172)

This commit is contained in:
glowredman authored and GitHub committed 2024-07-11 08:44:35 -05:00
1 parent 0fc382dd13
commit 4a94c1ba90
1 file changed
+8 -13
@@ -46,7 +46,6 @@ import com.google.common.collect.Table;
import com.google.common.collect.TreeBasedTable;
import com.gtnewhorizon.gtnhlib.GTNHLib;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
@@ -1188,19 +1187,15 @@ public class TravelController {
}
public static void showMessage(EntityPlayer player, IChatComponent chatComponent) {
if (Loader.isModLoaded("gtnhlib")) {
if (player instanceof EntityPlayerMP) {
chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE));
GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true);
} else {
GTNHLib.proxy.printMessageAboveHotbar(
EnumChatFormatting.WHITE + chatComponent.getFormattedText(),
60,
true,
true);
}
if (player instanceof EntityPlayerMP) {
chatComponent.setChatStyle(new ChatStyle().setColor(EnumChatFormatting.WHITE));
GTNHLib.proxy.sendMessageAboveHotbar((EntityPlayerMP) player, chatComponent, 60, true, true);
} else {
player.addChatComponentMessage(chatComponent);
GTNHLib.proxy.printMessageAboveHotbar(
EnumChatFormatting.WHITE + chatComponent.getFormattedText(),
60,
true,
true);
}
}
}