Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 139
    • Issues 139
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Mobs
  • Custom AI

Last edited by Lxlp Dec 31, 2024
Page history

Custom AI

  • AI Goal Selectors
    • All Mobs
    • Creatures Only
    • Animals Only
    • Creepers Only
    • Ranged Entities Only
    • Piglins and Pillagers Only
  • AI Target Selectors
    • All Creatures
    • All Creatures (Faction Support)
    • Tameable Creatures

AI Goal Selectors

Goal Selectors are used with the AIGoalSelectors field and determine what mobs want to “do”. Certain custom goals might not work if they're not included in the base AI of the mob you're creating. For example, a zombie won't be able to use the AI goal “EatGrass” because a zombie would never use that goal in the first place. Feel free to experiment to figure out what does and doesn't work!

Note: Certain goals will not work correctly if the world is in peaceful mode.

Example:

SuperMob:
  Type: zombie
  Health: 200
  Display: 'Superb Zombie'
  AIGoalSelectors:
  - clear
  - meleeattack
  - randomstroll

This zombie would attack players, and walk around randomly when not targeting an enemy.

All Mobs

AI Goal Aliases Description
clear reset Removes the AI from the mob
breakdoors Causes the mob to break down doors it runs into
eatgrass Makes the mob occasionally… eat grass
float swim Makes the mob swim in water/not
lookatplayers The mob will look at nearby players
LookAtTarget The mob will look at its target
opendoor opendoors The mob will open doors it runs into and close the door behind it
randomlookaround lookaround The mob will randomly look around
gotospawnlocation gotospawn Mob will pathfind to its spawn location
doNothing
[Premium-only]
Causes the mob to do nothing if conditions are met.

Creatures Only

AI Goal Aliases Description
meleeattack Causes the mob to move to and melee-attack its target
movetowardstarget Causes the mob to move towards its target
randomstroll The mob will randomly walk around
restrictsun Will prevent the mob from entering sunlight
fleeplayers runfromplayers Causes the mob to avoid Players
fleegolems runfromgolems Causes the mob to avoid Iron Golems
fleevillagers runfromvillagers Causes the mob to avoid villagers
fleewolf runfromwolves Causes the mob to avoid wolves
fleefaction runfromfaction Causes the mob to avoid entities in a given faction
fleesun The mob will hide in the shade when the sun it out
fleeConditional
[Premium-only]
fleeIf Causes the mob to flee based on provided conditions. Safe speed is required for distances greater than 5
spiderattack Uses the attack a spider would
zombieattack Zombie melee attack
leapattarget Makes the mob leap at its target
movethroughvillage
movetoblock Makes the mob go towards a specific type of block
movetolava Makes the mob move towards lava
movetowater Makes the mob move towards water
movetowardsrestriction Make a mob move towards its "Restriction Point" for some Entities (for instance, the village of a Villager)
MoveTowardsConditional
[Premium-only]
Causes the mob to move towards a target based on provided conditions
FollowRoute followpath Makes the mob follow a specific path, one time only.
patrol x1,y1,z1;x2,y2,z2;x3,y3,z3;… patrolroute Makes the mob patrol between the specified locations
gotolocation x,y,z goto Makes the mob go to the specified location(Notice Followrange must more than the distance between location and mob)
gotoowner # Makes the mob move towards its owner when beyond a certain distance (defaults to 5 blocks)
Followrange must be more than the distance between the owner and the mob)
gotoparent Makes the mob move towards its parent mob
Panic panicWhenOnFire Run around panicking when on fire and look for water
randomFly Fly around randomly
randomNod Makes the mob randomly nod its head

Animals Only

AI Goal Aliases Description
breed Causes the mob to be able to breed with other mobs

Creepers Only

AI Goal Aliases Description
creeperswell creeperexplode Make a creeper want to explode on its target

Ranged Entities Only

AI Goal Aliases Description
rangedattack arrowattack A basic ranged/projectile attack
bowattack bowshoot, bowmaster An advanced bow attack.

Piglins and Pillagers Only

AI Goal Aliases Description
crossbowAttack attack with a crossbow

AI Target Selectors

Target Selectors are used with the AITargetSelectors field and determine what mobs try to target.

If the mob has AITargets but not AIGoal that allows them to act based on their target, they will still be considered to have valid targets chosen according to the AITargets used (so, for instance, a @target targeter can be used and so on)

Example

SuperMob:
  Type: zombie
  Health: 200
  Display: 'Superb Zombie'
  AIGoalSelectors:
  - clear
  - meleeattack
  - randomstroll
  AITargetSelectors:
  - clear
  - players
  - golems

All Creatures

AI Target Aliases Description
clear Special Option. Clears all of the mob's AI
hurtbytarget attacker, damager Targets whatever attacks the mob
monsters monster Targets monsters
Players player Targets players
Villagers villager Targets villagers
irongolem irongolem, iron_golems, iron_golem Targets Golems
nearestConditionalTarget
[Premium-only]
nearestConditional, nearestIf Targets the nearest entity that meets the conditions provided

All Creatures (Faction Support)

AI Target Aliases Description
NearestOtherFaction OtherFaction Targets ANY entities that are in a different faction
NearestOtherFactionMonsters OtherFactionMonsters Targets any monster that is in a different faction
SpecificFaction [faction_name] Targets any entities that are in the given faction
SpecificFactionMonsters [faction_name] Targets any monsters that are in the given faction

Tameable Creatures

AI Target Description
OwnerAttacker Targets whatever attacks the mob's owner.
OwnerTarget Targets whatever the mob's owner attacks.
Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
Mythic Add-ons
Compatible Plugins
API Information
Config Files

Guides
  • Troubleshooting
  • FAQ / Common Issues
  • Examples
Packs

MythicScribe MythicScribe - VSCode Extension

Mobs
  • Mob Options
    • Display Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Templates
  • Vanilla Overrides
  • Extra: Disguises
  • Extra: ModelEngine

Skills
  • Mechanics
    • Mechanics by Tag
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Metaskills
  • Placeholders
  • Variables

Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework

Drops & DropTables
  • Drops
  • DropTables
  • FancyDrops

Spawning
  • Spawners
  • Random Spawns

Stats
  • Custom Stat Options
  • Modifiers
  • Built in Stats

Other
  • Particles Types
  • Audience
  • Equipment Slots
  • Pins
Technical
  • Math
  • Item Matcher
  • Operations
    • Attribute Operations
    • Stats Modifiers
  • SkillTree
  • Advanced User Guides and Techniques