Mark "refusing to add tickable" as debug line
This commit is contained in:
parent
b65c80d55e
commit
7a1becf071
@ -39,6 +39,7 @@ import net.neoforged.neoforge.network.PacketDistributor
|
|||||||
import org.apache.logging.log4j.LogManager
|
import org.apache.logging.log4j.LogManager
|
||||||
import ru.dbotthepony.mc.otm.network.DelegateSyncher
|
import ru.dbotthepony.mc.otm.network.DelegateSyncher
|
||||||
import ru.dbotthepony.kommons.util.Listenable
|
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.INeighbourChangeListener
|
||||||
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
|
import ru.dbotthepony.mc.otm.block.RotatableMatteryBlock
|
||||||
import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
import ru.dbotthepony.mc.otm.capability.MatteryCapability
|
||||||
@ -345,6 +346,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
|||||||
get() = cache?.capability == null
|
get() = cache?.capability == null
|
||||||
|
|
||||||
fun rebuildCache() {
|
fun rebuildCache() {
|
||||||
|
if (!SERVER_IS_LIVE) return
|
||||||
val level = level as? ServerLevel
|
val level = level as? ServerLevel
|
||||||
|
|
||||||
if (level == null) {
|
if (level == null) {
|
||||||
|
@ -103,7 +103,7 @@ class TickList : ITickable {
|
|||||||
|
|
||||||
fun add(ticker: IConditionalTickable, condition: Boolean, reason: String) {
|
fun add(ticker: IConditionalTickable, condition: Boolean, reason: String) {
|
||||||
if (!condition) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ class TickList : ITickable {
|
|||||||
|
|
||||||
fun once(ticker: ITickable, condition: Boolean, reason: String) {
|
fun once(ticker: ITickable, condition: Boolean, reason: String) {
|
||||||
if (!condition) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ class TickList : ITickable {
|
|||||||
|
|
||||||
fun timer(timerTicks: Int, action: Runnable, condition: Boolean, reason: String): Timer? {
|
fun timer(timerTicks: Int, action: Runnable, condition: Boolean, reason: String): Timer? {
|
||||||
if (!condition) {
|
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
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user