PLEASE REOPEN IT IS NOT A DUPE ISSUE AS ITS BEEN MARKED SEE MY COMMENTS AND EVIDENCE IN COMMENTS BELOW.
It is possible that a player can be reported as standing on 1 or 9 separate locations. This will at first sound crazy, but if I player is stood on the edge of a block due to internal rounding or flooring of the X and Z co-ordinate.
There is NO way at all to know what block the player is stood on. This has huge consequences to the game. The simplist way to duplicate this is to stand on the edge of a block and run the following.
/setblock ~ ~-1 ~ minecraft:stone You should expect this to replace the block the player is stood on but if you are on the edge of the block there is a good chance it will change the block in front of to the left or right of the player.
Please see the attachments. Note that every shot the player cords have not changed. Note this can happen any side OR corner hence why the player can be internally seen to be standing on any 1 or 9 blocks.
mc using the center of the player's aabb, even though you can still stand on a block with less than half your aabb is likely the cause.
I have tested this also in 1.7.10 and 1.7.9 with the same results. It occurs in Survival or Creative mode and in single of MP. The same result.
Hope you understand that, please treat this as a matter of urgency as this has huge effects to so many areas of the game.
Regards
Relicum
PS I am Dyslexic so sorry about any spelling or grammar.
Linked issues
Attachments
Comments 10
Most probably working as intended. /setblock-ing on the edge of a block makes the game think that you are standing on the impossible to get "air" block.
This is not a duplicate. This works on flat ground, I used the example on a block to make it easier to see.
Now please explain why the same effect happens with positive cords ???
Why does 84.686 get round to 84 for the z access. I can stand and face any direction with the same result. This is not intended results. I understand the negative cords but positive to. Are you telling me that it is intended to allow the player location to be 1 or 9 different blocks. Please don't say just stand back from the edge as when your testing for the abstract with no prior knowledge to where a player is, it is impossible to get a true location, this has huge effects on every part of the game.
Please reopen
Thanks
Kumasasa's comment from MC-4794:
The coordinates mark the corners of the blocks.
If you omit the fractional digits, you land always at the center of the nearest block (seen in +x, +z direction):
If you teleport to 1 / y / 1, you land at 1.5 / y /1.5
If you teleport to -1 / y / -1 you land at -0,5 / y / -0.5
but if you specify the fractional digits, you land exactly at given coordinates:
If you teleport to 1.0 / y / 1.0, you land at 1.0 / y /1.0
If you teleport to -1.0 / y / -1.0 you land at -1.0 / y / -1.0
Sorry but you theory is invalid. See this screen shot. All cords are positive including direction and this time I am setting the block 2 blocks above. Same result.
See the incorrect rounding of the X co-ord 112.938 to 112 hmmm
Please re open this not teleport specific at all. OR are you telling me this is intended
Edit: To clarify my aim is nothing to do with setblocks my issue is you are unable to test for what block a player is standing on. If I want to trigger an event when a player moves over a certain block, You will be get false triggers due to this bug.
Are you going to change the status of this issue as I have proved it clearly has nothing to do with the TP issues.
Your last two screenshots disapproved your theory:
Your feet coordinates are 112.938 / 81.000 / 80.491 ("XYZ:" in debug screen), therefore you're standing on top of block 112 / 80 / 80, because block 112 / 80 / 80 goes from 112.000 / 80.000 / 80.000 to 112.999 / 80.999 / 80.999
You're setblocking a block @ ~0 ~2 ~0 (= relative to your feet coordinates) , the block gets placed on 112 + 0 / 81 + 2 / 80 + 0 = 112 / 83 / 80
You're setblocking a block @ 112 / 83 / 80, the block gets of course also placed on 112 / 83 / 80
Remember: 112 / 80 / 80 marks one of the eight corners of a block.
Hi
Again you not actual seeing the end result. I am fully aware of the math, the reason I did 2 blocks up was to allow for the player to still be stood there and not have the block place in his head.
Ok looking at my last image tell me which block do you think i am stood on ? Diamond or stone ? I am not debating the math here I agree with everything you have said BUT its the outcome in game.
Which block would I need to delete to make my player drop down into the hole left ?? Bare in mind it must be either the diamond or the stone ?? I will provide you with video evidence once you tell me that is the correct intended outcome. It may well surprise you. Bare also that if i do /setworldspawn from where I am at, the spawn will be the center of the stone, so mc is saying internally I am stood on the stone block.
Regards
You're standing on stone, not on diamond - see the coordinates and the screenshots.Look straight down, see where the black frame is rendered, observe the "looking at" part and the block description to the right of the debug screen.
To drop the player in a hole you have to delete the stone block and the diamond block. As long as the player is standing with a fraction of the feet on a block, all blocks have to be deleted to make the player fall down. Worst case 4 blocks if the player is standing on the cross junction of 4 blocks.
WAI as you are using a negative coordinate. See MC-4794 for an explanation of the coordinate system.