Skip to content

Commit

Permalink
修复关闭垃圾桶功能时无法正确清理掉落物的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
4o4E committed Oct 11, 2023
1 parent 0e441c5 commit 8de4ada
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group = "top.e404"
version = "1.17.1"
version = "1.17.2"
val epluginVer = "1.2.0"

fun eplugin(module: String, version: String = epluginVer) = "top.e404:eplugin-$module:$version"
Expand Down
7 changes: 7 additions & 0 deletions src/main/kotlin/clean/drop.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ fun World.cleanDrop(): Pair<Int, Int> {
}
Trashcan.update()
}
// 不启用垃圾箱收集
else {
items.values.forEach {
count += it.size
it.forEach(Item::remove)
}
}
PL.debug { "世界${name}掉落物清理完成($count/${waitingForClean.size})" }
return count to waitingForClean.size
}

0 comments on commit 8de4ada

Please sign in to comment.