From 6b7edc5d2c5661aeb6c980ee8ef8fd54feacd213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 9 Apr 2014 15:09:16 +0200 Subject: [PATCH 1/2] Make paper terminate recipe search for item costs. --- src/main/scala/li/cil/oc/util/ItemCosts.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/li/cil/oc/util/ItemCosts.scala b/src/main/scala/li/cil/oc/util/ItemCosts.scala index 24fd888e7..44b93cdf3 100644 --- a/src/main/scala/li/cil/oc/util/ItemCosts.scala +++ b/src/main/scala/li/cil/oc/util/ItemCosts.scala @@ -40,6 +40,7 @@ object ItemCosts { terminate(Item.ingotIron) terminate(Item.netherQuartz) terminate(Item.netherStar) + terminate(Item.paper) terminate(Item.redstone) terminate(Item.silk) terminate(Item.slimeBall) From c01081e6fd4d91247b06655ab29c21390d49940a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Wed, 9 Apr 2014 15:18:23 +0200 Subject: [PATCH 2/2] Localizing error messages in bluescreen, just to make sure (usually those are plain strings already anyway). --- .../scala/li/cil/oc/server/component/GraphicsCard.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala b/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala index ecb5f9ec1..8d274bfb9 100644 --- a/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala +++ b/src/main/scala/li/cil/oc/server/component/GraphicsCard.scala @@ -1,13 +1,13 @@ package li.cil.oc.server.component -import li.cil.oc.Settings import li.cil.oc.api.Network import li.cil.oc.api.network._ import li.cil.oc.common.component.Buffer import li.cil.oc.common.tileentity +import li.cil.oc.Settings import li.cil.oc.util.PackedColor import net.minecraft.nbt.NBTTagCompound -import scala.Some +import net.minecraft.util.StatCollector abstract class GraphicsCard extends ManagedComponent { val node = Network.newNode(this, Visibility.Neighbors). @@ -228,7 +228,7 @@ abstract class GraphicsCard extends ManagedComponent { buffer.owner.onScreenFill(0, 0, w, h, ' ') } try { - val message = "Unrecoverable error:\n" + machine.lastError + "\n" + val message = "Unrecoverable error:\n" + StatCollector.translateToLocal(machine.lastError) + "\n" val wrapRegEx = s"(.{1,${math.max(1, w - 2)}})\\s".r val lines = wrapRegEx.replaceAllIn(message, m => m.group(1) + "\n").lines.toArray for ((line, idx) <- lines.zipWithIndex) {