mojira.dev
MC-191391

TP to negative co-ordinate rounds up so the destination is off by 1

While in most gameplay this might not have a huge impact, occasionally it could result in teleporting somewhere undesired

examples: 

scenario: /tp -1 ~ -1 result -0.5 ~ -0.5

scenario: /tp -22 ~ -22 result -21.5 ~ -21.5

scenario: /tp -333 ~ 333 result -332.5 ~ 332.5

scenario /tp -4444 ~ -4444 result -4443.5 ~ -4443.5

Comments 3

It centers you on the block by adding 0.5

That would be and is the correct calculation for positive numbers, to centre on the block for a negative number it should be a subtraction. ie. -1 + -0.5 or -1 - 0.5 = -1.5 this would correctly target you in the middle of the TP destination

in the provided example of /tp -4444 ~ -4444 the result should have been -4444.5 ~ -4444.5 (not -4443.5 ~ -4443.5)

corrected description, it is rounding up not down for negative numbers

Leon Friend

(Unassigned)

Unconfirmed

(Unassigned)

1.16

Retrieved