generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Friendly
Provi edited this page Oct 6, 2023
·
4 revisions
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.
- returns
- Are the actor and target the same entity?
- returns
true
- returns
- If the actor/target is tameable, did one tame the other?
- returns
true
- returns
- If they are both tameable, are they owned by the same owner?
- returns
true
- returns
- If they are both tameable, are the owners friendly to each other?
- returns
true
- returns
- If the actor/target is tameable, is the owner in combat with the other?
- returns
false
- returns
- Are the entities attacking each other?
- returns
false
- returns
- Does the Teammate condition return true for them?
- returns
true
- returns
- Is one entity hostile and the other not hostile?
- returns
false
- returns
- Do both entities lack scoreboard teams?
- returns
true
- returns
- None of the above?
- returns
false
#
- returns
Type ID: proviorigins:friendly
None
"bientity_condition": {
"type": "proviorigins:friendly"
}