mojira.dev
MC-99552

radius 0 on /testfor is broken

Since 16w07b, using a radius of 0 on /testfor will never return any players. This breaks a lot of maps.
Before 16w07b, using a radius of 0 on /testfor would return players who are at the specified coordinates. "/testfor @a[0,128,0,0]" in versions 16w06a and before will return all players standing at coordinates 0, 128, 0. In versions 16w07b and later it will never under any circumstances return any players. The smallest radius to test for players in is 1 now, which is mechanically very different from radius 0, because it will also return players standing in the blocks next to the coordinates specified in /testfor, and not only players standing at the exact coordinates.

How to reproduce:
1. stand at 0, 128, 0
2. use /testfor @a[0,128,0,0]

Considering this was never stated in any changelog, breaks something that is used in a lot of maps and doesn't really have any easy alternative to achieve the same thing, pretty sure this is to be considered as a bug.

Comments 1

This is an intentional change due to inaccuracies in how radius had worked prior. You can use the delta parameters instead of radius to target blockspace:

/testfor @a[0,128,0,dx=0]

MC-95352 was where the fix was introduced and went through a couple phases before being finalized.

haschischtasche

(Unassigned)

Unconfirmed

Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3

Retrieved