From c130594124f18d86f6f26fd2102104cb6adbf58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sun, 31 Aug 2014 11:39:59 +0200 Subject: [PATCH] Some more housekeeping and a bit of recipe tweakery. --- src/main/resources/application.conf | 10 ++++++++++ .../assets/opencomputers/recipes/default.recipes | 4 ++-- .../assets/opencomputers/recipes/hardmode.recipes | 2 +- src/main/scala/li/cil/oc/Settings.scala | 1 + .../cil/oc/common/tileentity/traits/TileEntity.scala | 4 ++-- .../cil/oc/server/driver/item/UpgradeNavigation.scala | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/main/resources/application.conf b/src/main/resources/application.conf index 084100644..8a95f8603 100644 --- a/src/main/resources/application.conf +++ b/src/main/resources/application.conf @@ -955,5 +955,15 @@ opencomputers { # be loaded. There is also less of a chance of conflicts when running # multiple servers or server and client on the same machine. nativeInTmpDir: false + + # Due to a bug in Minecraft's lighting code there's an issue where + # lighting does not properly update near light emitting blocks that are + # fully solid - like screens, for example. This can be annoying when + # using other blocks that dynamically change their brightness (e.g. for + # the addon mod OpenLights). Enable this to force light emitting blocks + # in oc to periodically (every two seconds) do an update. This should + # not have an overly noticeable impact on performance, but it's disabled + # by default because it is unnecessary in *most* cases. + periodicallyForceLightUpdate: false } } \ No newline at end of file diff --git a/src/main/resources/assets/opencomputers/recipes/default.recipes b/src/main/resources/assets/opencomputers/recipes/default.recipes index 59586bf14..1be67eb0f 100644 --- a/src/main/resources/assets/opencomputers/recipes/default.recipes +++ b/src/main/resources/assets/opencomputers/recipes/default.recipes @@ -173,7 +173,7 @@ inventoryControllerUpgrade { } navigationUpgrade { input: [[ingotGold, compass, ingotGold] - ["oc:circuitChip3", {item=map, subID=any}, "oc:circuitChip3"] + ["oc:circuitChip2", {item=map, subID=any}, "oc:circuitChip2"] [ingotGold, potion, ingotGold]] } signUpgrade { @@ -427,7 +427,7 @@ rack { ["oc:switch", "oc:materialCircuitBoardPrinted", "oc:powerDistributor"]] } redstone { - input: [[ingotIron, "oc:circuitChip2", ingotIron] + input: [[ingotIron, "oc:circuitChip3", ingotIron] [blockRedstone, "oc:redstoneCard1", blockRedstone] [ingotIron, "oc:materialCircuitBoardPrinted", ingotIron]] } diff --git a/src/main/resources/assets/opencomputers/recipes/hardmode.recipes b/src/main/resources/assets/opencomputers/recipes/hardmode.recipes index b67f34f0c..1637d825f 100644 --- a/src/main/resources/assets/opencomputers/recipes/hardmode.recipes +++ b/src/main/resources/assets/opencomputers/recipes/hardmode.recipes @@ -358,7 +358,7 @@ rack { ["oc:switch", "oc:materialCircuitBoardPrinted","oc:powerDistributor"]] } redstone { - input: [[ingotIron, "oc:circuitChip2", ingotIron] + input: [[ingotIron, "oc:circuitChip3", ingotIron] [blockRedstone, "oc:redstoneCard1", blockRedstone] [ingotIron, "oc:materialCircuitBoardPrinted", ingotIron]] } diff --git a/src/main/scala/li/cil/oc/Settings.scala b/src/main/scala/li/cil/oc/Settings.scala index 61ac1c2fb..323873b5b 100644 --- a/src/main/scala/li/cil/oc/Settings.scala +++ b/src/main/scala/li/cil/oc/Settings.scala @@ -241,6 +241,7 @@ class Settings(config: Config) { val alwaysTryNative = config.getBoolean("debug.alwaysTryNative") val debugPersistence = config.getBoolean("debug.verbosePersistenceErrors") val nativeInTmpDir = config.getBoolean("debug.nativeInTmpDir") + val periodicallyForceLightUpdate = config.getBoolean("debug.periodicallyForceLightUpdate") } object Settings { diff --git a/src/main/scala/li/cil/oc/common/tileentity/traits/TileEntity.scala b/src/main/scala/li/cil/oc/common/tileentity/traits/TileEntity.scala index 6b64cc8d9..8c827c463 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/traits/TileEntity.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/traits/TileEntity.scala @@ -3,7 +3,7 @@ package li.cil.oc.common.tileentity.traits import java.util.logging.Level import cpw.mods.fml.relauncher.{Side, SideOnly} -import li.cil.oc.OpenComputers +import li.cil.oc.{Settings, OpenComputers} import li.cil.oc.client.Sound import li.cil.oc.util.SideTracker import net.minecraft.nbt.NBTTagCompound @@ -29,7 +29,7 @@ trait TileEntity extends net.minecraft.tileentity.TileEntity { override def updateEntity() { super.updateEntity() - if (world.getTotalWorldTime % 40 == 0 && block.getLightValue(world, x, y, z) > 0) { + if (Settings.get.periodicallyForceLightUpdate && world.getTotalWorldTime % 40 == 0 && block.getLightValue(world, x, y, z) > 0) { world.markBlockForUpdate(x, y, z) } } diff --git a/src/main/scala/li/cil/oc/server/driver/item/UpgradeNavigation.scala b/src/main/scala/li/cil/oc/server/driver/item/UpgradeNavigation.scala index 561e1dae1..82ff9fb69 100644 --- a/src/main/scala/li/cil/oc/server/driver/item/UpgradeNavigation.scala +++ b/src/main/scala/li/cil/oc/server/driver/item/UpgradeNavigation.scala @@ -18,5 +18,5 @@ object UpgradeNavigation extends Item { override def slot(stack: ItemStack) = Slot.Upgrade - override def tier(stack: ItemStack) = Tier.Three + override def tier(stack: ItemStack) = Tier.Two }