Fixed cloaking core message

This commit is contained in:
LemADEC 2015-08-28 12:17:01 +02:00
parent 7df39bc6e9
commit 96a8f5b2f2
3 changed files with 8 additions and 8 deletions

View file

@ -68,13 +68,13 @@ public class BlockCloakingCore extends BlockContainer {
return false;
}
TileEntityCloakingCore te = (TileEntityCloakingCore)par1World.getTileEntity(par2, par3, par4);
if (te != null && (par5EntityPlayer.getHeldItem() == null)) {
WarpDrive.addChatMessage(par5EntityPlayer, te.getStatus()
TileEntityCloakingCore tileEntity = (TileEntityCloakingCore)par1World.getTileEntity(par2, par3, par4);
if (tileEntity != null && (par5EntityPlayer.getHeldItem() == null)) {
WarpDrive.addChatMessage(par5EntityPlayer, tileEntity.getStatus()
// + " isInvalid? " + te.isInvalid() + " Valid? " + te.isValid + " Cloaking? " + te.isCloaking + " Enabled? " + te.isEnabled
+ ((!te.isValid) ? "Invalid assembly!" :
((!te.isEnabled) ? "Cloak is disabled" :
((te.isCloaking) ? "A tier " + te.tier + " cloak is currently covering " + te.volume + " blocks!" : "Cloak needs more power!"))));
+ ((!tileEntity.isValid) ? " Invalid assembly!" :
((!tileEntity.isEnabled) ? " Cloak is disabled" :
((tileEntity.isCloaking) ? " A tier " + tileEntity.tier + " cloak is currently covering " + tileEntity.volume + " blocks!" : "Cloak needs more power!"))));
return true;
}

View file

@ -159,7 +159,7 @@ public class MessageCloak implements IMessage, IMessageHandler<MessageCloak, IMe
return null;
}
cloakMessage.handle(player);
return null; // no response
}
}

View file

@ -111,7 +111,7 @@ public class PacketHandler {
}
// Sending cloaking area definition (server -> client)
public static void sendCloakPacket(EntityPlayer player, AxisAlignedBB aabb, int tier, boolean decloak) {
public static void sendCloakPacket(EntityPlayer player, final AxisAlignedBB aabb, final int tier, final boolean decloak) {
MessageCloak cloakMessage = new MessageCloak(aabb, tier, decloak);
simpleNetworkManager.sendTo(cloakMessage, (EntityPlayerMP) player);
if (WarpDriveConfig.LOGGING_CLOAKING) {