Add setting to allow disabling holograms emitting light. Closes #979.

This commit is contained in:
Florian Nücke 2015-11-15 22:21:05 +01:00
parent b9be02b71a
commit 8f60dc8a19
3 changed files with 9 additions and 1 deletions

View File

@ -1152,6 +1152,10 @@ opencomputers {
# the *worst case* is ~30KB/s/client. Again, for normal use-cases this
# is actually barely noticeable.
setRawDelay: 0.2
# Whether the hologram block should provide light. It'll also emit light
# when off, because having state-based light in MC is... painful.
emitLight: true
}
# Other settings that you might find useful to tweak.

View File

@ -307,6 +307,7 @@ class Settings(val config: Config) {
Array(0.25, 0.5)
}
val hologramSetRawDelay = config.getDouble("hologram.setRawDelay") max 0
val hologramLight = config.getBoolean("hologram.emitLight")
// ----------------------------------------------------------------------- //
// misc

View File

@ -4,6 +4,7 @@ import java.util
import cpw.mods.fml.relauncher.Side
import cpw.mods.fml.relauncher.SideOnly
import li.cil.oc.Settings
import li.cil.oc.common.tileentity
import li.cil.oc.integration.coloredlights.ModColoredLights
import li.cil.oc.util.Rarity
@ -15,7 +16,9 @@ import net.minecraft.world.World
import net.minecraftforge.common.util.ForgeDirection
class Hologram(val tier: Int) extends SimpleBlock with traits.SpecialBlock {
ModColoredLights.setLightLevel(this, 15, 15, 15)
if (Settings.get.hologramLight) {
ModColoredLights.setLightLevel(this, 15, 15, 15)
}
setBlockBounds(0, 0, 0, 1, 0.5f, 1)
// ----------------------------------------------------------------------- //