diff --git a/geary-papermc-core/src/main/kotlin/com/mineinabyss/geary/papermc/GearyPaperConfig.kt b/geary-papermc-core/src/main/kotlin/com/mineinabyss/geary/papermc/GearyPaperConfig.kt index ce63f65..f6d4ce0 100644 --- a/geary-papermc-core/src/main/kotlin/com/mineinabyss/geary/papermc/GearyPaperConfig.kt +++ b/geary-papermc-core/src/main/kotlin/com/mineinabyss/geary/papermc/GearyPaperConfig.kt @@ -24,7 +24,7 @@ class GearyPaperConfig( val mobTypeConversion: MobTypeConversion = MobTypeConversion.IGNORE, @YamlComment("List of mob types to remove if they are not entities with Geary prefabs (i.e. vanilla entities)") val removeVanillaMobTypes: Set = emptySet(), - val logLevel: Severity = Severity.Warn, + val logLevel: Severity = Severity.Info, ) @Serializable diff --git a/geary-papermc-datastore/src/main/kotlin/com/mineinabyss/geary/papermc/datastore/ContainerHelpers.kt b/geary-papermc-datastore/src/main/kotlin/com/mineinabyss/geary/papermc/datastore/ContainerHelpers.kt index 524f80c..d00abe1 100644 --- a/geary-papermc-datastore/src/main/kotlin/com/mineinabyss/geary/papermc/datastore/ContainerHelpers.kt +++ b/geary-papermc-datastore/src/main/kotlin/com/mineinabyss/geary/papermc/datastore/ContainerHelpers.kt @@ -27,7 +27,7 @@ fun GearyEntity.encodeComponentsTo(pdc: PersistentDataContainer) { fun GearyEntity.encodeComponentsTo(holder: PersistentDataHolder) { val bukkitHolder = holder as? BukkitEntity - geary.logger.d("Encoding components for bukkit entity $id (${bukkitHolder?.type} ${bukkitHolder?.uniqueId})") + geary.logger.v("Encoding components for bukkit entity $id (${bukkitHolder?.type} ${bukkitHolder?.uniqueId})") encodeComponentsTo(holder.persistentDataContainer) } diff --git a/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/entities/systems/EntityWorldEventTracker.kt b/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/entities/systems/EntityWorldEventTracker.kt index 979a867..8dc76aa 100644 --- a/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/entities/systems/EntityWorldEventTracker.kt +++ b/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/entities/systems/EntityWorldEventTracker.kt @@ -22,7 +22,7 @@ class EntityWorldEventTracker : Listener { fun EntityAddToWorldEvent.onBukkitEntityAdd() { // Only remove player from ECS on disconnect, not death if (entity is Player) return - geary.logger.d("EntityAddToWorldEvent: Tracking bukkit entity ${entity.toGearyOrNull()?.id} (${entity.type} ${entity.uniqueId})") + geary.logger.v("EntityAddToWorldEvent: Tracking bukkit entity ${entity.toGearyOrNull()?.id} (${entity.type} ${entity.uniqueId})") gearyMobs.bukkit2Geary.getOrCreate(entity) } @@ -35,7 +35,7 @@ class EntityWorldEventTracker : Listener { // We remove the geary entity a bit later because paper has a bug where stored entities call load/unload/load Bukkit.getScheduler().scheduleSyncDelayedTask(gearyPaper.plugin, { if (entity.isValid) return@scheduleSyncDelayedTask // If the entity is still valid, it's the paper bug - geary.logger.d("EntityRemoveFromWorldEvent: Calling removeEntity for ${entity.toGearyOrNull()?.id} (${entity.type} ${entity.uniqueId})") + geary.logger.v("EntityRemoveFromWorldEvent: Calling removeEntity for ${entity.toGearyOrNull()?.id} (${entity.type} ${entity.uniqueId})") entity.toGearyOrNull()?.removeEntity() }, 10) } @@ -43,7 +43,7 @@ class EntityWorldEventTracker : Listener { @EventHandler(priority = EventPriority.HIGHEST) fun EntitiesUnloadEvent.onEntitiesUnload() { if (entities.size != 0) - geary.logger.d("EntitiesUnloadEvent: Saving ${entities.size} entities in chunk...") + geary.logger.v("EntitiesUnloadEvent: Saving ${entities.size} entities in chunk...") entities.forEach { val gearyEntity = it.toGearyOrNull() ?: return@forEach gearyEntity.encodeComponentsTo(it) @@ -52,13 +52,13 @@ class EntityWorldEventTracker : Listener { @EventHandler(priority = EventPriority.LOWEST) fun PlayerJoinEvent.onPlayerLogin() { - geary.logger.d("PlayerJoinEvent: Track ${player.name}") + geary.logger.v("PlayerJoinEvent: Track ${player.name}") gearyMobs.bukkit2Geary.getOrCreate(player) } @EventHandler(priority = EventPriority.HIGHEST) fun PlayerQuitEvent.onPlayerLogout() { - geary.logger.d("PlayerQuitEvent: Untracking ${player.name}") + geary.logger.v("PlayerQuitEvent: Untracking ${player.name}") val gearyEntity = player.toGearyOrNull() ?: return gearyEntity.encodeComponentsTo(player) gearyEntity.removeEntity() diff --git a/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/items/cache/PlayerItemCache.kt b/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/items/cache/PlayerItemCache.kt index fb269c9..83224b7 100644 --- a/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/items/cache/PlayerItemCache.kt +++ b/geary-papermc-tracking/src/main/kotlin/com/mineinabyss/geary/papermc/tracking/items/cache/PlayerItemCache.kt @@ -23,7 +23,7 @@ abstract class PlayerItemCache( private fun removeEntity(slot: Int) { val entity = entities[slot].takeIf { it != 0uL }?.toGeary() ?: return - logger.d("Removing ${entities[slot]} in slot $slot") + logger.v("Removing ${entities[slot]} in slot $slot") val pdc = entity.get()?.itemMeta?.persistentDataContainer if (pdc != null) entity.encodeComponentsTo(pdc) entity.removeEntity() @@ -63,7 +63,7 @@ abstract class PlayerItemCache( entities[slot] = newEntity?.id ?: 0uL if (holder != null) newEntity?.addParent(holder) newEntity?.set(convertToItemStack(item)) - logger.d("Adding $newEntity (${newEntity?.prefabs?.map { it.get() }}) in slot $slot") + logger.v("Adding $newEntity (${newEntity?.prefabs?.map { it.get() }}) in slot $slot") } else -> removeEntity(slot) diff --git a/gradle.properties b/gradle.properties index 4c45491..06bd08f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ kotlin.code.style=official group=com.mineinabyss version=0.30 idofrontVersion=0.23.0 -gearyVersion=0.26.0-dev.12 +gearyVersion=0.26.0-dev.14