Changes
Page history
Added YAML formatting to make it look pretty
authored
Oct 10, 2023
by
Amy
Hide whitespace changes
Inline
Side-by-side
Mobs/Custom-AI.md
View page @
444f392b
...
@@ -7,7 +7,7 @@ Note: Certain goals will not work correctly if the world is in peaceful mode.
...
@@ -7,7 +7,7 @@ Note: Certain goals will not work correctly if the world is in peaceful mode.
Example:
Example:
```
```
yaml
SuperMob
:
SuperMob
:
Type
:
zombie
Type
:
zombie
Health
:
200
Health
:
200
...
@@ -37,7 +37,7 @@ This zombie would attack players, and walk around randomly when not targeting an
...
@@ -37,7 +37,7 @@ This zombie would attack players, and walk around randomly when not targeting an
| doNothing
**[Premium-only]**
| | Causes the mob to do nothing if conditions are met. |
| doNothing
**[Premium-only]**
| | Causes the mob to do nothing if conditions are met. |
FleeConditional Example:
FleeConditional Example:
```
```
yaml
AIGoalSelectors
:
AIGoalSelectors
:
-
clear
-
clear
-
fleeConditional{distance=5;speed=2;safespeed=2;conditions=[ - inlineofsight
true
]}
-
fleeConditional{distance=5;speed=2;safespeed=2;conditions=[ - inlineofsight
true
]}
...
@@ -100,7 +100,7 @@ Target Selectors are used with the AITargetSelectors field and determine what mo
...
@@ -100,7 +100,7 @@ Target Selectors are used with the AITargetSelectors field and determine what mo
Example:
Example:
```
```
yaml
SuperMob
:
SuperMob
:
Type
:
zombie
Type
:
zombie
Health
:
200
Health
:
200
...
@@ -128,7 +128,7 @@ SuperMob:
...
@@ -128,7 +128,7 @@ SuperMob:
| nearestConditionalTarget
**[Premium-only]**
| nearestConditional, nearestIf | Targets the nearest entity that meets the conditions provided. |
| nearestConditionalTarget
**[Premium-only]**
| nearestConditional, nearestIf | Targets the nearest entity that meets the conditions provided. |
NearestConditionalTarget Example:
NearestConditionalTarget Example:
```
```
yaml
AITargetSelectors
:
AITargetSelectors
:
-
clear
-
clear
-
nearestConditionalTarget{conditions=[
-
nearestConditionalTarget{conditions=[
...
@@ -149,7 +149,7 @@ AITargetSelectors:
...
@@ -149,7 +149,7 @@ AITargetSelectors:
Example:
Example:
```
```
yaml
AITargetSelectors
:
AITargetSelectors
:
-
SpecificFaction undead
-
SpecificFaction undead
```
```
...
...
...
...