1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-07-05 19:42:54 +00:00

Correctly offset touch position on a monitor

Fixes #223
This commit is contained in:
SquidDev 2019-06-02 18:06:24 +01:00
parent 234f18c228
commit c221502ec9

View File

@ -114,7 +114,11 @@ public class TileMonitor extends TileGeneric implements IPeripheralTile
{ {
if( !getWorld().isClient ) if( !getWorld().isClient )
{ {
monitorTouched( (float) hit.getPos().x, (float) hit.getPos().y, (float) hit.getPos().z ); monitorTouched(
(float) (hit.getPos().x - hit.getBlockPos().getX()),
(float) (hit.getPos().y - hit.getBlockPos().getY()),
(float) (hit.getPos().z - hit.getBlockPos().getZ())
);
} }
return true; return true;
} }