Skip to content

Behaviour components ​

A species' AI is a list of components. A pack picks from a fixed catalogue and configures each one; it cannot introduce new Java behaviour.

Profiles ​

Most creatures need only a profile — a named bundle of components.

json
"behavior": { "profile": "ancientcreature:defensive_herbivore" }
ProfileShapeUsed by
ancientcreature:passiveWanders, panics when hurt, breeds, is tempted by food, follows a parent—
ancientcreature:defensive_herbivoreWanders and grazes; passive until threatened, then bellows and charges. Attacks armed players who come close, and hostile mobsTriceratops
ancientcreature:armored_herbivoreSlow grazer that herds and stands its ground. Retaliates with melee, alerts its herd, and never chargesAnkylosaurus
ancientcreature:pack_predatorFast social predator that stays near its kind, calls before chasing and hunts only when hungry. Adults onlyDeinonychus
ancientcreature:sauropod_browserTowering herd herbivore that seeks canopy leaves, browses without breaking them and retaliates with meleeBrachiosaurus
ancientcreature:apex_predatorRoars, then charges. Hunts players and animals when hungry, hostiles always. Adults onlyTyrannosaurus Rex
ancientcreature:aquatic_predatorSwims, seeks water when beached, hunts anything in the water when hungry. No breedingMegalodon
ancientcreature:flying_passiveFlies, is tempted down by food, breeds, does not fight back—
ancientcreature:flying_predatorCircles its target, then dives. Hunts animals and players when hungryPteranodon

Predator profiles wait until they are hungry

The three predator profiles gate their prey selection on hunger, so they no longer attack everything that walks past. Retaliation and hostile-mob defence are never gated. Feed a creature, or use /ancientcreature hunger, to see the difference.

Flying profiles need the flying category

flying_passive and flying_predator only work with "entity_category": "flying". On any other category the flight components skip themselves and you get a creature that walks.

Overriding one piece ​

A component you list replaces the profile's component of the same type. Everything else stays.

json
"behavior": {
  "profile": "ancientcreature:defensive_herbivore",
  "components": [
    { "type": "ancientcreature:charge_attack", "speed_multiplier": 1.8, "break_blocks": false }
  ]
}

That keeps the whole herbivore kit and only retunes the charge.

Building from scratch ​

Omit profile and list everything:

json
"behavior": {
  "components": [
    { "type": "ancientcreature:float" },
    { "type": "ancientcreature:wander", "speed_modifier": 0.9 },
    { "type": "ancientcreature:look_at_player" },
    { "type": "ancientcreature:random_look" }
  ]
}

Priority ​

Every component takes an optional "priority". Lower numbers win when goals conflict — standard Minecraft goal priority. Omit it to use the type's default.

json
{ "type": "ancientcreature:charge_attack", "priority": 1, "speed_multiplier": 1.45 }

Movement and idle ​

ancientcreature:float priority 0 ​

Keeps a land creature's head above water. Automatically skipped for aquatic species. No options.

ancientcreature:find_water priority 0 ​

Sends a beached aquatic creature back towards water. No options.

ancientcreature:panic priority 1 ​

Runs away after being hurt.

OptionDefault
speed_modifier1.25

ancientcreature:wander priority 6 ​

Idle strolling. Uses a swimming variant automatically for aquatic species.

OptionDefaultNotes
speed_modifier0.9
avoid_watertrueLand species only
interval120Ticks between attempts

ancientcreature:swimming priority 6 ​

Open-water wandering.

OptionDefault
speed_modifier1.0
interval10

ancientcreature:fly priority 6 ​

Free flight. Requires "entity_category": "flying"; skipped otherwise.

OptionDefault
speed_modifier1.0

ancientcreature:look_at_player priority 7 ​

OptionDefault
look_distance8.0
probability0.02

ancientcreature:random_look priority 8 ​

Idle head movement. No options.

Social ​

ancientcreature:breed priority 3 ​

Pairing up to breed. Only ever with the same species — two different data-driven creatures sharing the generic entity type never cross-breed.

OptionDefault
speed_modifier1.0

ancientcreature:tempt priority 4 ​

Follows a player holding food. The item set comes from the species' diet block; the component does nothing if diet is empty.

OptionDefault
speed_modifier1.15
can_scarefalse

ancientcreature:follow_parent priority 5 ​

OptionDefault
speed_modifier1.1

ancientcreature:herding priority 6 ​

Keeps members of the same species loosely together.

OptionDefaultNotes
speed_modifier1.0
search_range24.0How far to look for a herd mate
join_distance12.0Start moving closer beyond this
stop_distance5.0Stop once this close

ancientcreature:graze priority 5 ​

Periodically stops to graze, publishing the graze action so the animation controller can react. Not used by babies, targets or creatures in water.

OptionDefaultNotes
duration80Ticks
chance400Reciprocal chance per tick
hunger_value4.0Hunger restored by finishing a graze

Hunger is only awarded when the graze runs to completion, so a mouthful interrupted by a threat is not a free meal. This is how a herbivore feeds itself. See hunger.

ancientcreature:browse_leaves priority 5 ​

Searches for leaf blocks above ground level, walks beneath the nearest reachable canopy, looks up and publishes the graze action while eating. It restores hunger only after the browsing animation finishes and never removes the leaf block.

OptionDefaultNotes
duration100Ticks spent eating
chance300Reciprocal chance per tick
horizontal_range7Canopy search radius in blocks
min_height3Lowest leaf height above the creature's feet
max_height8Highest leaf height considered
speed_modifier0.7Approach speed
reach_distance2.75Horizontal distance at which eating begins
hunger_value8.0Hunger restored by completing the browse

Attacking ​

ancientcreature:melee_attack priority 2 ​

Plain chase-and-bite.

OptionDefault
speed_modifier1.2
follow_without_sighttrue
adults_onlyfalse

ancientcreature:charge_attack priority 1 ​

Sprints at the target, plays the species' alert sound on engaging, and optionally ploughs through blocks tagged #ancientcreature:creature_destroyable (mob griefing must be on).

OptionDefault
speed_multiplier1.45
follow_without_sighttrue
break_blockstrue
break_reach0.6

ancientcreature:roar_attack priority 1 ​

Opens with a roar: stops, tracks the target and plays the species' alert sound for roar_duration ticks, then charges. Publishes the roar action for the animation controller, and goes on cooldown so it does not fire on every re-engage.

OptionDefault
speed_multiplier1.35
follow_without_sighttrue
roar_duration48
roar_cooldown240
break_blockstrue
break_reach1.0
adults_onlytrue

ancientcreature:circle_target priority 1 ​

Holds altitude and orbits the current target, then releases after dive_after ticks so a melee component can take over. Requires "entity_category": "flying"; skipped otherwise, and skipped for babies.

OptionDefaultNotes
speed_modifier1.1
radius8.0Orbit radius in blocks
height6.0Blocks above the target
dive_after100Ticks of circling before releasing

Choosing targets ​

These go in the mob's target selector rather than its goal selector; the slot is chosen automatically.

Predatory components here are gated on hunger: they only pick a target when the creature is actually hungry, and stop once it has eaten. Defensive ones are never gated, so a well-fed creature still fights back. Each component below states its own default.

The attack components under Attacking are never gated either. They carry out an attack on whatever target these components chose, so gating them would leave a fed creature unable to defend itself.

ancientcreature:defensive_retaliation priority 1 ​

Fights back against whatever hurt it.

OptionDefaultNotes
alert_othersfalseAlso anger nearby creatures

ancientcreature:territorial priority 2 ​

Attacks players who come close. The owner is always excluded.

OptionDefaultNotes
range12.0Blocks
random_interval5Reciprocal chance to re-scan
require_weapontrueOnly players holding a weapon
adults_onlyfalse
requires_hungerfalseOnly while hungry

requires_hunger defaults to off because guarding your space is defence, and a creature that only did it while starving would ignore threats it should answer.

Set it to true when you also set require_weapon: false. That combination is not defence — it is hunting players on sight — and without the gate the creature charges anyone who walks into range, forever. The shipped apex_predator and flying_predator profiles do exactly this.

ancientcreature:hunt_animals priority 3 ​

Preys on ordinary animals. Never the hunter's own species, never another revived creature with more health than the hunter, and never a flying creature while it is in the air.

OptionDefaultNotes
random_interval10
adults_onlytrue
requires_hungertrueOnly while hungry

Gated by default: eating animals is feeding. Set requires_hunger: false for a creature that should hunt regardless.

ancientcreature:hunt_hostiles priority 4 ​

Attacks nearby hostile mobs.

OptionDefaultNotes
random_interval5
adults_onlyfalse
requires_hungerfalseOnly while hungry

Not gated by default. Driving off a zombie is defence, not a meal — a herbivore uses this component too.

ancientcreature:aquatic_predator priority 2 ​

Hunts what is swimming nearby.

OptionDefaultNotes
random_interval10
target_playerstrue
target_aquatic_lifetrueSquid, fish, dolphins, guardians
require_in_watertrueIgnore anything on land
adults_onlytrue
requires_hungertrueOnly while hungry

Gated by default, so a fed Megalodon lets swimmers past.

Always true ​

Regardless of components, a creature never attacks:

  • another creature of its own species
  • its owner — the player who released it from a capsule or was nearby when its egg hatched

Live list ​

/ancientcreature behaviors

prints every registered component type with its default priority, and every profile.

Ancient Creature is in beta; species formats may change between releases.