Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-129777

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • 1.16.221 Hotfix, 1.17.2 Hotfix
    • None
    • Survival
    • Plausible
    • Multiple

      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"
      				}
      			}
      		]
      	}
      }
      

            mrpatches123 mrpatches123
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: