2

I have followed several tutorials to the letter, and got the "player is_sprinting:true" predicate to work. So I know my fresh new datapack is working.

There are no examples of location predicates anywhere. Videos, wiki, nothing.

I go to a generator and generate the whole predicate, export the whole file, put it in the proper folder, and when I type the path in my tick.mcfunction, visual studio code properly links to it (finally after having to create a new project AND restart my computer to not have the new project auto-fill paths to my old project- for some reason).

It does not detect when a player is within 100 of 0 0 0. It does nothing. Here's what I've tried:

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "type": "minecraft:player",
    "location": {
      "position": {
        "x": 0,
        "y": 0,
        "z": 0
      }
    },
    "distance": {
      "absolute": {
        "min": 0,
        "max": 100
      }
    }
  }
}

And...

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "type": "minecraft:player",
    "distance": {
      "absolute": {
        "min": 0,
        "max": 100
      }
    }
  }
}

And...

{
  "condition": "minecraft:location_check",
  "predicate": {
    "position": {
      "x": {
        "min": -100,
        "max": 100
      },
      "y": {
        "min": -100,
        "max": 100
      },
      "z": {
        "min": -100,
        "max": 100
      }
    }
  }
}

All combined with:

execute as @a if predicate test:homezone run say hi

Or:

execute as @a[predicate=homezone] run say hi

What's my problem?

2
  • I've also noticed that the generator doesn't have a "distance" option when you select "location_check" once I get it working, would I be able to take the distance formatting from the entity_properties predicate and paste it into the location_check one? Or if location_check is the correct predicate to use, do I now have to change all my " ~ ~ ~, distance=x" to cubiods? god I hope not. – Gorm Feb 9 at 19:48
  • You already have answered your own question. Congrats. – Kirbychu Apr 28 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.