mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 03:44:54 -04:00
light debug: separate option for infinite torches
This commit is contained in:
parent
0cd5396421
commit
fbde9061e9
18
src/main/java/de/bixilon/minosoft/config/DebugOptions.kt
Normal file
18
src/main/java/de/bixilon/minosoft/config/DebugOptions.kt
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Minosoft
|
||||
* Copyright (C) 2020-2022 Moritz Zwerger
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
|
||||
*/
|
||||
|
||||
package de.bixilon.minosoft.config
|
||||
|
||||
object DebugOptions {
|
||||
const val INFINITE_TORCHES = true
|
||||
}
|
@ -23,5 +23,5 @@ object StaticConfiguration {
|
||||
|
||||
|
||||
const val IGNORE_SERVER_LIGHT = true
|
||||
const val LIGHT_DEBUG_MODE = true
|
||||
const val LIGHT_DEBUG_MODE = false
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ import de.bixilon.kutil.concurrent.lock.simple.SimpleLock
|
||||
import de.bixilon.kutil.concurrent.time.TimeWorker
|
||||
import de.bixilon.kutil.concurrent.time.TimeWorkerTask
|
||||
import de.bixilon.kutil.watcher.DataWatcher.Companion.observe
|
||||
import de.bixilon.minosoft.config.DebugOptions
|
||||
import de.bixilon.minosoft.config.StaticConfiguration
|
||||
import de.bixilon.minosoft.data.container.stack.ItemStack
|
||||
import de.bixilon.minosoft.protocol.network.connection.play.PlayConnection
|
||||
@ -55,7 +56,7 @@ class ConnectionTicker(private val connection: PlayConnection) {
|
||||
connection.world.randomTick()
|
||||
}
|
||||
|
||||
if (StaticConfiguration.LIGHT_DEBUG_MODE) {
|
||||
if (StaticConfiguration.LIGHT_DEBUG_MODE || DebugOptions.INFINITE_TORCHES) {
|
||||
tasks += TimeWorkerTask(INTERVAL, maxDelayTime = MAX_DELAY) { connection.player.inventory[44] = ItemStack(connection.registries.itemRegistry["minecraft:torch"]!!, Int.MAX_VALUE) }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user