Authoring
Targets, participants & threat
What a mob can perceive, who it may fight (players, other mobs, any living entity) and the extra threat ThePredict adds to the MythicMobs threat table.
What a mob perceives
ThePredict decides only with what the mob could perceive, so its behavior stays believable:
- Who: the participants the policy below admits, within the mob's
Options.FollowRange(never more thandecision.searchRadiusBlocks). By default that means living players inSURVIVALorADVENTURE; a player inCREATIVEorSPECTATORdoes not exist for ThePredict. - What: visible details of a player (a raised shield, a drawn bow, the item in hand, effects) only with line of sight and when the player is not invisible. A player's tendency (closing in, backing off, strafing) comes from how they actually move, never from raw keyboard input.
- What Jev reads: bands and facts (
MELEE,RANGED,CRITICAL,RAISING_SHIELD…), never coordinates, names or UUIDs. Inside each encounter, players areplayer_1,player_2… and other entitiesentity_1,entity_2… with their species. - No double hits: one cast per choice and per cooldown, one vanilla hit per 20 ticks, no hits during the target's invulnerability frames and no hits into a blocking shield (unless the skill ignores shields). The threat ThePredict adds is capped per window.
- The history of an encounter is discarded when it ends.
Who can take part
A participant is anything a mob perceives, targets and fights. It can be any living entity, not only a player. A small policy built from native Minecraft, Paper and MythicMobs distinctions decides who qualifies. Without configuration, only players in SURVIVAL or ADVENTURE take part, and requests to Jev are exactly the same as without the feature.
The global policy is the participants section of config.yml (participants.playerGameModes, participants.entities.allow, participants.entities.deny, participants.entities.profilesMayAllow, participants.entities.perceiveNonTargets). Each profile can refine it with an optional Participants section:
| Profile key | Default | Rule |
|---|---|---|
PlayerGameModes | the global list | A subset of the global list; a mode outside it is an error. []: these mobs never perceive or attack players. |
Entities.Allow | [] | Selectors added to the global allow list. Ignored with a warning when the admin set profilesMayAllow: false. |
Entities.Deny | [] | Selectors added to the global deny list; they never take part. |
Entities.PerceiveNonTargets | the global value | true only if the global key allows it. With false, the mob only perceives its own target among entities; with true it also perceives allowed entities nearby (at most participants.entities.maxCandidatesPerMember per mob). |
Selectors
A selector is prefix:value text; each list holds up to 16. Loading only checks the shape; values are resolved when profiles bind (on every /mm reload), and an unknown value warns with its path (for example Participants.Entities.Allow[0]) and is ignored.
| Selector | Matches when |
|---|---|
type:<key> | The entity type is that one: type:minecraft:zombie (without a namespace, minecraft). |
tag:<key> | The type is in that entity-type tag, vanilla or from a datapack: tag:minecraft:undead. Tags are read when profiles bind: after /minecraft:reload, run /mm reload. |
category:<SpawnCategory> | Its spawn category: MONSTER, ANIMAL, WATER_ANIMAL, WATER_AMBIENT, WATER_UNDERGROUND_CREATURE, AMBIENT, AXOLOTL, MISC. |
kind:<KIND> | It is a LIVING entity, a MOB, an ENEMY (wider than monster: includes slime, ghast, phantom, hoglin and shulker), a MONSTER or an ANIMAL. |
mythic:* or mythic:<MobId> | It is a MythicMobs mob, or one of that exact type (case-sensitive). |
faction:<name> | Its MythicMobs faction, any case. |
team:<name> | Its main scoreboard team, any case. |
tagged:<tag> | It has that /tag scoreboard tag, exactly. |
predictor | It is a mob bound to ThePredict. |
How the policy decides
The first rule that applies wins:
- An invalid or dead entity never takes part.
- The mob itself and the members of its own encounter (its allies) never do.
- A player takes part when their game mode is listed, and nothing else applies to players.
- An armor stand never does.
- Anything matching a
Denyselector never does. - Anything on the same side as the mob never does.
- Anything matching an
Allowselector does. - Everything else does not.
Sides. Two entities are on the same side when both are MythicMobs mobs with the same faction (any case), or else when they share a main scoreboard team. Sides never apply to players, even in a team. An encounter is a side: its members are allies and its participants are rivals. Two ThePredict mobs fighting each other form two encounters, each with its own request and its own point of view.
Watch out ThePredict mobs without a faction are rivals
A broad allow (kind:MONSTER, kind:MOB, predictor) also admits other ThePredict mobs. Without a Faction or a team, they are rivals: two of them fighting the same player form separate encounters (more requests), and if their AITargetSelectors pick each other (for example - 1 monsters), they fight each other. For a group that should fight together, give them the same Faction: in MythicMobs and target with - 1 nearestOtherFactionMonsters instead of - 1 monsters, or add their faction to the deny list.
A player the policy does not admit at the top of the threat table leaves the mob without a target for ThePredict (it does not fall back to Mob#getTarget()): safe, since nothing is cast against that player. With an entity the policy does not admit, ThePredict does fall back to Mob#getTarget().
The target is still chosen natively. MythicMobs or vanilla pick the target (threat table, AITargetSelectors). To make a mob attack other creatures, give it a native target selector, for example - 1 monsters or - 1 nearestSpecificFaction{f=blue}, and admit those creatures in Participants.
What Jev reads about other entities
An entity reaches Jev as entity_N plus its species, the key of its type without namespace: entity_1 is a zombie, entity_2 is a wither skeleton, target is a zombie. Its custom name, Display, MythicMobs ID, faction and UUID never travel. Local outputs (inspect, records) do show the species: Target: entity_1 (zombie) ….
Jev gets fewer facts about an entity than about a player, never invented ones:
| Fact | Player | Mob with items (skeleton, pillager, piglin, witch, armed zombie) | Other living entity |
|---|---|---|---|
| Health and armor | yes | yes | yes |
| Raising a shield, blocking | yes | from the item in use (BLOCKS_ATTACKS), with the vanilla block delay | same |
| Shield disabled, attack recharging, pearl on cooldown | yes | — | — |
| Drawing a bow, bow fully drawn | yes | from the item in use | — |
| Crossbow loaded, holds a totem | yes | from equipment | — |
| Eating or drinking | yes | from the item in use | — |
| Gliding, invisible, mace dive | yes | yes or equivalent | yes or equivalent |
| Long-reach weapon | yes | from the weapon in hand | — |
| Tendency | from movement and distance | from velocity and distance | same |
| Reachable on foot, visible, flankable | yes | yes | yes |
| Out of the target's reach | yes | from its ThePredict profile, or the vanilla melee check of a Mob | the vanilla check if it is a Mob |
| Threat | yes | yes | yes |
| Species | — | yes | yes |
Example: a two-faction duel
The mob of the other faction uses the same profile with faction:duel_red swapped for its rival:
schemaVersion: 2
duel_blue_ai:
MythicID: ThePredictGuardian
Objective: Defeat the red duelist in front of you
Choices:
punch: { Kind: VANILLA_MELEE }
Tactics:
press: { Movement: APPROACH, Choice: punch, Description: Close in and hit the rival }
hold: { Movement: HOLD, Description: Wait for the rival to come closer }
Participants:
PlayerGameModes: []
Entities:
Allow: ['faction:duel_red']Safe mob-versus-mob duels
To pit two mobs against each other without ever touching players or other mobs, combine four independent safeguards:
- Native targeting of the rival only:
AITargetSelectorswith- 0 clearand- 1 nearestSpecificFaction{faction=<rival>}. A player only counts as part of a faction with the permissionfaction.<name in lower case>and withoutmythicmobs.nofaction; operators and*have both, so they stay out. Never givefaction.<rival>to a player. - No threat from players:
Modules: ThreatTable: false, so a player's hit never changes the target. - Profiles that only admit the rival:
Participants: PlayerGameModes: []andEntities: Allow: ['faction:<rival>']. ThePredict then never perceives, targets or casts against anything else. - Single-target damage: every damaging skill targets
@target, never an area.
For a fair comparison with a classic boss, give both sides the same stats, base goals and skills (a shared MythicMobs Template helps), set Damage: 0 on both and put all damage in skills, gate the classic timer skills with predictorcontrol false, and make every round end (for example a delay 1800 then remove @self on spawn). Run the arena in its own world with natural spawning off. /thepredict duel records everything both mobs decide and do (see Storage & records).
Enriched threat
The MythicMobs threat table still picks the target. ThePredict adds (or removes) threat for facts MythicMobs does not measure, with the weights of the profile's Threat section. It works with and without Jev.
| Threat key | Default | Effect |
|---|---|---|
AssistsOthers | 1.5 | When a player heals or buffs other participants with a splash or lingering potion: weight × participants reached, added to that player in the table of every active member of the encounter. |
RangedHarass | 1.0 | Multiplies the final damage of each projectile from a player who is not the mob's target, in that mob's table. |
BlockedHits | 0.25 | Points per mob hit the player blocks with a shield, in that mob's table. |
UnreachableDecayPerSecond | 2.0 | Points per second the target loses while the mob cannot reach it on foot: after two decisions following a path that does not reach the target, it is removed at each decision. Nothing is removed while the mob stands still without a path. No window cap. |
MaxPerWindow | 20.0 | Cap of points added per mob table, player and fact in each 100-tick (5 s) window. Must be above 0. |
Units and limits:
- With
ThreatTable.UseDamageTaken: true, the native table adds one point per point of damage, so the weights are in points of final damage. Ranged harass uses the final Bukkit damage, after armor, resistance and absorption. - MythicMobs switches target when another entity passes the current target's threat by 10 %. ThePredict never forces that switch.
- With
ThreatTable.DecayUnreachable: trueon the mob, MythicMobs already lowers the unreachable target's threat: ThePredict ignoresUnreachableDecayPerSecondso it is not removed twice, and the catalog warnsThreat.UnreachableDecayPerSecond: is ignored because mob '<Mob>' enables ThreatTable.DecayUnreachable. - A mob without
Modules.ThreatTabledoes not use enriched threat;inspectsaysno threat table (Modules.ThreatTable off): enriched threat inactive for this mob. - Setting every weight to
0turns enriched threat off for that profile. - With
decision.logDecisionsthe console shows lines likeThreat +1.50 ALLY_ASSISTED for player_2 sent to the table of mob <uuid>orThreat -2.00 UNREACHABLE for player_1 sent to the table of mob <uuid>, without player names.