Fixed debug item

This commit is contained in:
TheDarkDnKTv 2020-08-16 00:52:25 +03:00
parent b035116b8b
commit 4f1ad92d2d
2 changed files with 2 additions and 2 deletions

View file

@ -300,7 +300,7 @@ public class GT_Utility {
}
public static void sendChatToPlayer(EntityPlayer aPlayer, IChatComponent aChatMessage) {
if (aPlayer != null && aPlayer instanceof EntityPlayerMP && aChatMessage != null) {
if (aPlayer != null && aChatMessage != null) {
aPlayer.addChatMessage(aChatMessage);
}
}

View file

@ -96,7 +96,7 @@ public class GT_Debug_Item extends GT_Generic_Item implements IElectricItem {
private void debug(ItemStack aStack, EntityPlayer aPlayer, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ, Side side) {
ArrayList<String> tList = new ArrayList<String>();
tList.add("=====================");
tList.add(String.format("%s-sided info", side.isClient() ? "<EFBFBD>aCLIENT" : "<EFBFBD>cSERVER"));
tList.add(String.format("%s-sided info", side.isClient() ? "§aCLIENT" : "§cSERVER"));
GT_ModHandler.useElectricItem(aStack, GT_Utility.getCoordinateScan(tList, aPlayer, aPlayer.worldObj, 1, aX, aY, aZ, aSide, aClickX, aClickY, aClickZ), aPlayer);
for (int i = 0; i < tList.size(); i++) GT_Utility.sendChatToPlayer(aPlayer, tList.get(i));
}