mojira.dev
MC-76491

Coordinates in commands run by players get shifted up by half a block

Stand on a partial block, like cake, slab, or chest. Run the command "/setblock ~ ~ ~ stone" The block above the one you are standing on will be set to stone. This only occurs if the block is thick enough, if run on a carpet for example, it will work correctly. Interestingly, if run on a 4-layer thick snow cover, it will work correctly, even though that is the same height as cake, which doesn't work correctly. This is because the player sinks 2 pixels into snow.

This bug only occurs when the command is directly run by the player, if you instead run "/execute @p ~ ~ ~ setblock ~ ~ ~ stone", it will work correctly.

Linked issues

Comments

Sonicwave

Actually this is a dupe of MC-67515 (which based on this report seems to affect all relative coordinates, not just with /summon).

While 56253 has command blocks in the background, it talks about /execute from the player, not a command block (notice the command in the chat in the 1st screenshot).

KingSupernova

Actually, I think both MC-56253 and MC-67515 are both describing different aspects of the same bug.

Sonicwave

Coordinates in commands run by players

Nvm, it seems that I've misread the title. On second thought this seems different than MC-67515, since that issue doesn't involve partial blocks at all; rather it seems that entities are being summoned from the center of the command block (as opposed to the bottom, as with players). Using either

"/summon Creeper ~ ~2 ~ {NoAI:1}"

or an execute with it summons a NoAI Creeper exactly 2 blocks above the player's feet, so /summon seems to work differently.

Basically this is the opposite of MC-56253 (execute places the block 1 block higher than just using /setblock).

Tan Chin Cheern

If it is setblock, I think that the Y coordinates will round up instead of down. If for example, if the block you are standing on is 0.850 blocks high, the setblock will round up.

KingSupernova

This is actually a dupe of MC-56253, not MC-67515.

KingSupernova

This is not a duplicate of MC-67515. That report is about command blocks executing from their center, this report is about relative coordinates being treated differently depending on whether they are in an execute command or not. This report is actually a dupe of MC-56253.

KingSupernova

(Unassigned)

Community Consensus

Minecraft 1.8, Minecraft 1.8.1, Minecraft 1.8.2-pre1

Retrieved