Mark "refusing to add tickable" as debug line

This commit is contained in:
DBotThePony 2024-08-30 19:56:03 +07:00
parent b65c80d55e
commit 7a1becf071
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 5 additions and 3 deletions

View File

@ -39,6 +39,7 @@ import net.neoforged.neoforge.network.PacketDistributor
import org.apache.logging.log4j.LogManager
import ru.dbotthepony.mc.otm.network.DelegateSyncher
import ru.dbotthepony.kommons.util.Listenable
import ru.dbotthepony.mc.otm.SERVER_IS_LIVE
import ru.dbotthepony.mc.otm.block.INeighbourChangeListener
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
import ru.dbotthepony.mc.otm.capability.MatteryCapability
@ -345,6 +346,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
get() = cache?.capability == null
fun rebuildCache() {
if (!SERVER_IS_LIVE) return
val level = level as? ServerLevel
if (level == null) {

View File

@ -103,7 +103,7 @@ class TickList : ITickable {
fun add(ticker: IConditionalTickable, condition: Boolean, reason: String) {
if (!condition) {
LOGGER.error("Refusing to add tickable $ticker because we $reason", IllegalStateException(reason))
LOGGER.debug("Refusing to add tickable $ticker because we $reason", IllegalStateException(reason))
return
}
@ -116,7 +116,7 @@ class TickList : ITickable {
fun once(ticker: ITickable, condition: Boolean, reason: String) {
if (!condition) {
LOGGER.error("Refusing to add tickable $ticker because we $reason", IllegalStateException(reason))
LOGGER.debug("Refusing to add tickable $ticker because we $reason", IllegalStateException(reason))
return
}
@ -129,7 +129,7 @@ class TickList : ITickable {
fun timer(timerTicks: Int, action: Runnable, condition: Boolean, reason: String): Timer? {
if (!condition) {
LOGGER.error("Refusing to add timer $action in $timerTicks ticks because we $reason", IllegalStateException(reason))
LOGGER.debug("Refusing to add timer $action in $timerTicks ticks because we $reason", IllegalStateException(reason))
return null
}