From 1f084dadb97738f97e9bccce3b367847c86d6170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Fri, 10 Jan 2014 21:23:57 +0100 Subject: [PATCH 1/3] fixed the order of the coordinates navigation.getPosition returns, so that they're in Minecraft order: x, y, z and not x, z, y as they currently are --- li/cil/oc/server/component/UpgradeNavigation.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/li/cil/oc/server/component/UpgradeNavigation.scala b/li/cil/oc/server/component/UpgradeNavigation.scala index d390a1e92..59b59034e 100644 --- a/li/cil/oc/server/component/UpgradeNavigation.scala +++ b/li/cil/oc/server/component/UpgradeNavigation.scala @@ -15,13 +15,13 @@ class UpgradeNavigation(val owner: MCTileEntity, val xCenter: Int, val zCenter: @LuaCallback("getPosition") def getPosition(context: RobotContext, args: Arguments): Array[AnyRef] = { val x = owner.xCoord - val z = owner.zCoord val y = owner.yCoord + val z = owner.zCoord val relativeX = x - xCenter - val relativeY = z - zCenter + val relativeZ = z - zCenter - if (math.abs(relativeX) <= size / 2 && math.abs(relativeY) <= size / 2) - result(relativeX, relativeY, y) + if (math.abs(relativeX) <= size / 2 && math.abs(relativeZ) <= size / 2) + result(relativeX, y, relativeZ) else result(Unit, "out of range") } From d0deb19664952e06560ea0d448f6b27fdade89c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 11 Jan 2014 12:23:11 +0100 Subject: [PATCH 2/3] adjusted gregtech recipe for transistor to avoid collision with redstone conductor recipe --- assets/opencomputers/recipes/gregtech.recipes | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/opencomputers/recipes/gregtech.recipes b/assets/opencomputers/recipes/gregtech.recipes index 6d0ea59c1..5003ca2c3 100644 --- a/assets/opencomputers/recipes/gregtech.recipes +++ b/assets/opencomputers/recipes/gregtech.recipes @@ -112,11 +112,11 @@ disk { transistor { type: assembly - input: [redstone, {item="GT_Materials", subID=64}] - count: [1, 2] + input: [redstone, {item="GT_Materials", subID=96}] + count: [1, 3] eu: 16 time: 500 - output: 4 + output: 6 } chip1 { type: assembly From 9370dd9658aef74bbba9af3a43ddc5b0677e3f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sat, 11 Jan 2014 13:24:12 +0100 Subject: [PATCH 3/3] fixed screen gui not necessarily using origin screen for information (power state and resolution) --- li/cil/oc/client/gui/Screen.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/li/cil/oc/client/gui/Screen.scala b/li/cil/oc/client/gui/Screen.scala index 0cec8d73e..f8cae6695 100644 --- a/li/cil/oc/client/gui/Screen.scala +++ b/li/cil/oc/client/gui/Screen.scala @@ -24,7 +24,7 @@ class Screen(val screen: tileentity.Screen) extends Buffer { val mouseY = height - Mouse.getEventY * height / mc.displayHeight - 1 val bx = (mouseX - x - bufferMargin) / MonospaceFontRenderer.fontWidth + 1 val by = (mouseY - y - bufferMargin) / MonospaceFontRenderer.fontHeight + 1 - val (bw, bh) = screen.buffer.resolution + val (bw, bh) = buffer.resolution if (bx > 0 && by > 0 && bx <= bw && by <= bh) { val scroll = math.signum(Mouse.getEventDWheel) PacketSender.sendMouseScroll(buffer.owner, bx, by, scroll) @@ -61,7 +61,7 @@ class Screen(val screen: tileentity.Screen) extends Buffer { private def clickOrDrag(mouseX: Int, mouseY: Int) { val bx = ((mouseX - x - bufferMargin) / scale / MonospaceFontRenderer.fontWidth).toInt + 1 val by = ((mouseY - y - bufferMargin) / scale / MonospaceFontRenderer.fontHeight).toInt + 1 - val (bw, bh) = screen.buffer.resolution + val (bw, bh) = buffer.resolution if (bx > 0 && by > 0 && bx <= bw && by <= bh) { if (bx != mx || by != my) { PacketSender.sendMouseClick(buffer.owner, bx, by, mx > 0 && my > 0) @@ -79,7 +79,7 @@ class Screen(val screen: tileentity.Screen) extends Buffer { def drawBuffer() { GL11.glTranslatef(x, y, 0) BufferRenderer.drawBackground() - if (screen.hasPower) { + if (screen.origin.hasPower) { GL11.glTranslatef(bufferMargin, bufferMargin, 0) RenderState.makeItBlend() BufferRenderer.drawText()