Skip to content

Commit

Permalink
Remove isModLoaded check for GTNH Lib (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
glowredman authored Jul 11, 2024
1 parent 0fc382d commit 4a94c1b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions src/main/java/crazypants/enderio/teleport/TravelController.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
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;
Expand Down Expand Up @@ -1188,19 +1187,15 @@ private BlockCoord getActiveTravelBlock(EntityPlayer player) {
}

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);
}
}
}

0 comments on commit 4a94c1b

Please sign in to comment.