Improved logs formating
Added weapon logs for scan result
This commit is contained in:
parent
c853ec81e7
commit
e3fb9fb033
6 changed files with 14 additions and 11 deletions
|
@ -197,6 +197,12 @@ public class TileEntityLaser extends TileEntityAbstractLaser implements IBeamFre
|
|||
PacketHandler.sendBeamPacket(worldObj, vSource, vReachPoint, r, g, b, 50, energy, 200);
|
||||
}
|
||||
|
||||
if (WarpDriveConfig.LOGGING_WEAPON) {
|
||||
WarpDrive.logger.info("Scan result type " + scanResult_type.name
|
||||
+ " at " + scanResult_position.x + " " + scanResult_position.y + " " + scanResult_position.z
|
||||
+ " block " + scanResult_blockUnlocalizedName + " " + scanResult_blockMetadata + " resistance " + scanResult_blockResistance);
|
||||
}
|
||||
|
||||
sendEvent("laserScanning",
|
||||
scanResult_type.name, scanResult_position.x, scanResult_position.y, scanResult_position.z,
|
||||
scanResult_blockUnlocalizedName, scanResult_blockMetadata, scanResult_blockResistance);
|
||||
|
|
|
@ -96,8 +96,8 @@ public class MessageCloak implements IMessage, IMessageHandler<MessageCloak, IMe
|
|||
|
||||
if (WarpDriveConfig.LOGGING_CLOAKING) {
|
||||
WarpDrive.logger.info("Received cloak packet: " + ((cloakMessage.decloak) ? "DEcloaked" : "cloaked")
|
||||
+ "area: (" + cloakMessage.minX + "; " + cloakMessage.minY + "; " + cloakMessage.minZ
|
||||
+ ") -> (" + cloakMessage.maxX + "; " + cloakMessage.maxY + "; " + cloakMessage.maxZ + ") tier " + cloakMessage.tier);
|
||||
+ "area: (" + cloakMessage.minX + " " + cloakMessage.minY + " " + cloakMessage.minZ
|
||||
+ ") -> (" + cloakMessage.maxX + " " + cloakMessage.maxY + " " + cloakMessage.maxZ + ") tier " + cloakMessage.tier);
|
||||
}
|
||||
|
||||
EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
|
||||
|
|
|
@ -43,11 +43,8 @@ public class MessageSpawnParticle implements IMessage, IMessageHandler<MessageSp
|
|||
@Override
|
||||
public void fromBytes(ByteBuf buffer) {
|
||||
int typeSize = buffer.readByte();
|
||||
WarpDrive.logger.info("1: " + buffer.readerIndex() + " typeSize " + typeSize);
|
||||
type = buffer.toString(buffer.readerIndex(), typeSize, StandardCharsets.US_ASCII);
|
||||
WarpDrive.logger.info("2: " + buffer.readerIndex() + " type " + type);
|
||||
buffer.skipBytes(typeSize);
|
||||
WarpDrive.logger.info("3: " + buffer.readerIndex());
|
||||
|
||||
double x = buffer.readDouble();
|
||||
double y = buffer.readDouble();
|
||||
|
|
|
@ -59,7 +59,7 @@ public class MessageTargeting implements IMessage, IMessageHandler<MessageTarget
|
|||
@Override
|
||||
public IMessage onMessage(MessageTargeting targetingMessage, MessageContext context) {
|
||||
if (WarpDriveConfig.LOGGING_TARGETTING) {
|
||||
WarpDrive.logger.info("Received target packet: (" + targetingMessage.x + "; " + targetingMessage.y + "; " + targetingMessage.z
|
||||
WarpDrive.logger.info("Received target packet: (" + targetingMessage.x + " " + targetingMessage.y + " " + targetingMessage.z
|
||||
+ ") yaw: " + targetingMessage.yaw + " pitch: " + targetingMessage.pitch);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,10 @@ public class MessageVideoChannel implements IMessage, IMessageHandler<MessageVid
|
|||
if (tileEntity instanceof IVideoChannel) {
|
||||
((IVideoChannel) tileEntity).setVideoChannel(videoChannel);
|
||||
} else {
|
||||
WarpDrive.logger.error("Received video channel packet: (" + x + ", " + y + ", " + z + ") is not a valid tile entity");
|
||||
WarpDrive.logger.error("Received video channel packet: (" + x + " " + y + " " + z + ") is not a valid tile entity");
|
||||
}
|
||||
} else {
|
||||
WarpDrive.logger.error("Received video channel packet: (" + x + ", " + y + ", " + z + ") has no tile entity");
|
||||
WarpDrive.logger.error("Received video channel packet: (" + x + " " + y + " " + z + ") has no tile entity");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public class MessageVideoChannel implements IMessage, IMessageHandler<MessageVid
|
|||
}
|
||||
|
||||
if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) {
|
||||
WarpDrive.logger.info("Received video channel packet: (" + videoChannelMessage.x + ", " + videoChannelMessage.y + ", " + videoChannelMessage.z + ") videoChannel '" + videoChannelMessage.videoChannel + "'");
|
||||
WarpDrive.logger.info("Received video channel packet: (" + videoChannelMessage.x + " " + videoChannelMessage.y + " " + videoChannelMessage.z + ") videoChannel '" + videoChannelMessage.videoChannel + "'");
|
||||
}
|
||||
|
||||
videoChannelMessage.handle(Minecraft.getMinecraft().theWorld);
|
||||
|
|
|
@ -111,7 +111,7 @@ public class PacketHandler {
|
|||
MessageVideoChannel videoChannelMessage = new MessageVideoChannel(xCoord, yCoord, zCoord, videoChannel);
|
||||
simpleNetworkManager.sendToAllAround(videoChannelMessage, new TargetPoint(dimensionId, xCoord, yCoord, zCoord, 100));
|
||||
if (WarpDriveConfig.LOGGING_VIDEO_CHANNEL) {
|
||||
WarpDrive.logger.info("Sent video channel packet (" + xCoord + ", " + yCoord + ", " + zCoord + ") video channel " + videoChannel);
|
||||
WarpDrive.logger.info("Sent video channel packet (" + xCoord + " " + yCoord + " " + zCoord + ") video channel " + videoChannel);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ public class PacketHandler {
|
|||
MessageTargeting targetingMessage = new MessageTargeting(x, y, z, yaw, pitch);
|
||||
simpleNetworkManager.sendToServer(targetingMessage);
|
||||
if (WarpDriveConfig.LOGGING_TARGETTING) {
|
||||
WarpDrive.logger.info("Sent targeting packet (" + x + ", " + y + ", " + z + ") yaw " + yaw + " pitch " + pitch);
|
||||
WarpDrive.logger.info("Sent targeting packet (" + x + " " + y + " " + z + ") yaw " + yaw + " pitch " + pitch);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue