Skip to content

Friendly

Provi edited this page Oct 6, 2023 · 4 revisions

Bientity Condition Type

Checks whether two entities are friendly towards each other.

This condition looks at many possible relations between the two entities to get the context between them and it is recommended that you check the source code to see if it's suitable for your exact use case.

In generically, this condition checks the following in order:

  • Are they both living entities?
    • returns false if not.
  • Are the actor and target the same entity?
    • returns true
  • If the actor/target is tameable, did one tame the other?
    • returns true
  • If they are both tameable, are they owned by the same owner?
    • returns true
  • If they are both tameable, are the owners friendly to each other?
    • returns true
  • If the actor/target is tameable, is the owner in combat with the other?
    • returns false
  • Are the entities attacking each other?
    • returns false
  • Does the Teammate condition return true for them?
    • returns true
  • Is one entity hostile and the other not hostile?
    • returns false
  • Do both entities lack scoreboard teams?
    • returns true
  • None of the above?
    • returns false#

Type ID: proviorigins:friendly

Fields

None

Examples

"bientity_condition": {
    "type": "proviorigins:friendly"
}