mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-12 00:35:56 -04:00
Made the touch inversion check in screens use the origin block as it should. First part of #1291.
This commit is contained in:
parent
1b502f5a41
commit
e0f9f04e35
@ -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).
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user