1. Wiki
  2. /Entities
  3. /minecraft:behavior.celebrate_survive

minecraft:behavior.celebrate_survive

Don't want to write this by hand? GodCraft sets minecraft:behavior.celebrate_survive for you with a switch.Get GodCraft

Overview

minecraft:behavior.celebrate_survive is an entity component: it goes in the components object of a custom mob, or in one of its component groups. AI goal that makes the mob celebrate with fireworks, like villagers after a raid is defeated.

Fields

FieldTypeDefaultDescription
durationnumber30How many seconds the celebration lasts.
fireworks_intervalFloatRange{"max":20,"min":10}Random wait range in seconds between fireworks.
on_celebration_end_eventActorDefinitionTrigger{"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Event that fires when the celebration time is over.
priorityinteger0Lower numbers run first: when two goals compete, the one with the smaller priority wins.Range: 0 to …
control_flagsGoal's control flags[]noneWhich body parts this goal takes over (move, look, jump), so goals using the same parts cannot run together.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:behavior.celebrate_survive": {
    "duration": 30,
    "fireworks_interval": {
      "max": 20,
      "min": 10
    },
    "on_celebration_end_event": {
      "event": "",
      "filters": {
        "AND": null,
        "NOT": null,
        "OR": null,
        "all": null,
        "all_of": null,
        "any": null,
        "any_of": null,
        "none_of": null
      },
      "target": "self"
    },
    "priority": 0,
    "control_flags": []
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more