mojira.dev
MC-37836

/setblock X-co-ordinates are off

What I expected to happen was when I set the command block to place a block of snow in the negative co-ordinates.

What actually happened was the snow block was off by one block
Describe what happened here

Steps to Reproduce:
1. set a command block with this command "setblock -21 70 -0 minecraft:snow"
2. check if the block is at the co-ordinates that are in the command block

Linked issues

Attachments

Comments 8

Are you sure that you're on 1.7.x and not on an earlier snapshot ?
That bug was fixed in 1.7, see MC-30870
Screenshot: Result of

/setblock -21 4 -0 minecraft:snow

Block is placed on -21 / 4 / 0

ok

On 27 October 2013 20:26, [Mod] Kumasasa (JIRA)

I am experiencing this bug only when connecting via Multiplayer to a console server. I am using server 1.7.5 and client 1.7.5

I collected coordinates from the client where I want the block (-79 54 316) but when I execute the setblock command using these coordinates the block is set at -78 54 316.
Changing the setblock coordinate to -80 54 316 puts the block in the desired position.

This bug does not appear in my single player testing world but is 100% repeatable in my multiplayer world. Every time I have ran this command in multiplayer it is 1 block off on the X axis.

Setblock placed block 1 off the desired X axis position. Taken in multiplayer.

More testing with 1.7.5 verses 14w08a. Both clients appear to report the player's location incorrectly (along the negative axis) or at least incorrect in regard to player's percieved position (i.e. "where I'm standing should be the block coordinate.")

The additional coordinate outputs for "Block" and "Looking at" in the 1.8 snapshots solve the issue.

Read the explanation in MC-36602

I'm not sure the information provided fully explains the discrepancy between block coordinates and player coordinates... at least not until the lightbulb in my head turns on.

After some thought I understand why this is the case, the first negative block must be rounded to a full integer. It makes sense but the explanation given could use some fleshing out for those who are bad at math or a bit stubborn like myself.

Also, I never noticed the parenthesized number in the coordinates before. So the link was helpful. I'm still glad the debug info has been reformatted to make the coordinate details easier to find.

For the :light_bulb_off: in your head, read all the comments of MC-4794, then it may become :light_bulb_on:

joe nicholas

(Unassigned)

Unconfirmed

Minecraft 1.7.2

Retrieved