Mojira Archive
MCPE-129777

The filter, distance_to_nearest_player, in minecraft:damage_sensor does not trigger if value > 1.39

If the value is greater than 1.39 for distance_to_nearest_player as the test in a minecraft:damage_sensor, it will not trigger no matter the distance. If less than or equal to it will work as intended.

Steps to reproduce
1. place the JSON below in a player.json.
2. Make a event named 'reach' add a queriable dummy comment that runs /say hi
3. hit another player at different distances.

Observed Results
Does nothing at any distance.

Expected Results
Triggers when the target is greater than 5 blocks from the player.

{
	"minecraft:damage_sensor": {
		"triggers": [
			{
				"on_damage": {
					"filters": {
						"test": "distance_to_nearest_player",
						"operator": ">",
						"value": 5
					},
					"event": "reach",
					"target": "other"
				}
			}
		]
	}
}

Incomplete

mrpatches123

2021-06-04, 01:33 AM

2023-01-20, 06:01 PM

2023-01-20, 06:01 PM

0

0

Plausible

1.16.221 Hotfix, 1.17.2 Hotfix

-