mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 09:26:11 -04:00
option to reduce protocol logging
This commit is contained in:
parent
916de9e79a
commit
8d6eb392e6
@ -21,5 +21,6 @@ import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
data class GeneralConfig(
|
||||
var version: Int = Configuration.LATEST_CONFIG_VERSION,
|
||||
@Json(name = "log") var log: MutableMap<LogMessageType, LogLevels> = LogMessageType.DEFAULT_LOG_MAP.toMutableMap(),
|
||||
@Json(name = "reduce_protocol_log") var reduceProtocolLog: Boolean = true,
|
||||
var language: String = "en_US",
|
||||
)
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
package de.bixilon.minosoft.protocol.packets.s2c.play
|
||||
|
||||
import de.bixilon.minosoft.Minosoft
|
||||
import de.bixilon.minosoft.data.entities.block.BlockEntity
|
||||
import de.bixilon.minosoft.data.mappings.ResourceLocation
|
||||
import de.bixilon.minosoft.data.mappings.tweaker.VersionTweaker
|
||||
@ -120,7 +121,6 @@ class ChunkDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
|
||||
}
|
||||
|
||||
override fun handle(connection: PlayConnection) {
|
||||
|
||||
chunkData?.blocks?.let {
|
||||
VersionTweaker.transformSections(it, connection.version.versionId)
|
||||
}
|
||||
@ -136,6 +136,9 @@ class ChunkDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
|
||||
}
|
||||
|
||||
override fun log() {
|
||||
if (Minosoft.config.config.general.reduceProtocolLog) {
|
||||
return
|
||||
}
|
||||
Log.log(LogMessageType.NETWORK_PACKETS_IN, level = LogLevels.VERBOSE) { "Chunk data (chunkPosition=$chunkPosition)" }
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
package de.bixilon.minosoft.protocol.packets.s2c.play
|
||||
|
||||
|
||||
import de.bixilon.minosoft.Minosoft
|
||||
import de.bixilon.minosoft.data.world.light.ChunkLightAccessor
|
||||
import de.bixilon.minosoft.data.world.light.LightAccessor
|
||||
import de.bixilon.minosoft.modding.event.EventInitiators
|
||||
@ -59,6 +60,9 @@ class ChunkLightDataS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
|
||||
}
|
||||
|
||||
override fun log() {
|
||||
if (Minosoft.config.config.general.reduceProtocolLog) {
|
||||
return
|
||||
}
|
||||
Log.log(LogMessageType.NETWORK_PACKETS_IN, level = LogLevels.VERBOSE) { "Chunk light data (position=$chunkPosition)" }
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
package de.bixilon.minosoft.protocol.packets.s2c.play
|
||||
|
||||
import de.bixilon.minosoft.Minosoft
|
||||
import de.bixilon.minosoft.data.mappings.tweaker.VersionTweaker
|
||||
import de.bixilon.minosoft.data.world.ChunkData
|
||||
import de.bixilon.minosoft.modding.event.EventInitiators
|
||||
@ -89,6 +90,9 @@ class MassChunkDataS2CP() : PlayS2CPacket() {
|
||||
}
|
||||
|
||||
override fun log() {
|
||||
if (Minosoft.config.config.general.reduceProtocolLog) {
|
||||
return
|
||||
}
|
||||
Log.log(LogMessageType.NETWORK_PACKETS_IN, level = LogLevels.VERBOSE) { "Mass chunk data (chunks=${data.size})" }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user