From e0f9f04e357b7181470fc1a8545d0fa6fc6b7a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sun, 12 Jul 2015 12:20:33 +0200 Subject: [PATCH] Made the touch inversion check in screens use the origin block as it should. First part of #1291. --- src/main/scala/li/cil/oc/common/block/Screen.scala | 2 +- src/main/scala/li/cil/oc/common/tileentity/Screen.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/li/cil/oc/common/block/Screen.scala b/src/main/scala/li/cil/oc/common/block/Screen.scala index 5685f70ea..df519361e 100644 --- a/src/main/scala/li/cil/oc/common/block/Screen.scala +++ b/src/main/scala/li/cil/oc/common/block/Screen.scala @@ -337,7 +337,7 @@ class Screen(val tier: Int) extends RedstoneAware { if (Wrench.holdsApplicableWrench(player, BlockPosition(x, y, z)) && getValidRotations(world, x, y, z).contains(side) && !force) false else if (api.Items.get(player.getHeldItem) == api.Items.get(Constants.ItemName.Analyzer)) false else world.getTileEntity(x, y, z) match { - case screen: tileentity.Screen if screen.hasKeyboard && (force || player.isSneaking == screen.invertTouchMode) => + case screen: tileentity.Screen if screen.hasKeyboard && (force || player.isSneaking == screen.origin.invertTouchMode) => // Yep, this GUI is actually purely client side. We could skip this // if, but it is clearer this way (to trigger it from the server we // would have to give screens a "container", which we do not want). diff --git a/src/main/scala/li/cil/oc/common/tileentity/Screen.scala b/src/main/scala/li/cil/oc/common/tileentity/Screen.scala index 8f061df85..68cc3cacb 100644 --- a/src/main/scala/li/cil/oc/common/tileentity/Screen.scala +++ b/src/main/scala/li/cil/oc/common/tileentity/Screen.scala @@ -243,7 +243,7 @@ class Screen(var tier: Int) extends traits.TextBuffer with SidedEnvironment with } }) } - if (arrows.size > 0) { + if (arrows.nonEmpty) { for (arrow <- arrows) { val hitX = arrow.posX - x val hitY = arrow.posY - y