I was going to post this on the bug reporter, but no one else seems to have this problem, so I decided to ask about it here. So I've been experimenting with block placing/testing using /summon, /testforblock and /setblock. It seems like, consistently, the coordinates are inaccurate.
For example; I was trying out /testforblock, and I put in the command /testforblock 228 4 -115 29. I was trying to make it put out a redstone signal through a comparator when a sticky piston was placed at those coordinates, but it didn't. It DID work when I placed the sticky piston at 228 4 -113.
In short, it seems that, consistently, the coordinates are off by 2 blocks. I recall it happening to both X and Z, but the latest time (the example previously mentioned), it only applied to Z. This has happened to me using all the block-related commands: /summon FallingSand, /testforblock and /setblock.
If this has happened to anyone else, I'll put it on the bug reporter.
For example; I was trying out /testforblock, and I put in the command /testforblock 228 4 -115 29. I was trying to make it put out a redstone signal through a comparator when a sticky piston was placed at those coordinates, but it didn't. It DID work when I placed the sticky piston at 228 4 -113.
In short, it seems that, consistently, the coordinates are off by 2 blocks. I recall it happening to both X and Z, but the latest time (the example previously mentioned), it only applied to Z. This has happened to me using all the block-related commands: /summon FallingSand, /testforblock and /setblock.
If this has happened to anyone else, I'll put it on the bug reporter.
https://mojang.atlassian.net/browse/MC-30968
https://mojang.atlassian.net/browse/MC-30925
It's a known bug, most likely due to whatever type of math their using to round the coordinates.