UNPKG

@minecraft/creator-tools

Version:

Minecraft Creator Tools command line and libraries.

494 lines 15.8 kB
{ "fields": [ { "id": "potions", "title": "Potions", "description": "A list of potions that this entity can drink. Each potion entry has the following parameters:", "dataType": 15, "subForm": { "description": "A list of potions that this entity can drink. Each potion entry has the following parameters:", "fields": [ { "id": "chance", "title": "Chance", "description": "The percent chance (from 0.0 to 1.0) of this potion being selected when searching for a potion to use.", "defaultValue": 1, "dataType": 3 }, { "id": "filters", "title": "Filters", "description": "The filters to use when determining if this potion can be selected.", "dataType": 20 }, { "id": "id", "title": "Id", "description": "The registry ID of the potion to use", "defaultValue": -1, "dataType": 0 } ] }, "samples": { "/vanilla/behavior_pack/entities/wandering_trader.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": [ { "id": 7, "chance": 1, "filters": { "all_of": [ { "any_of": [ { "test": "hourly_clock_time", "operator": ">=", "value": 18000 }, { "test": "hourly_clock_time", "operator": "<", "value": 12000 } ] }, { "test": "is_visible", "subject": "self", "value": true }, { "any_of": [ { "test": "is_avoiding_mobs", "subject": "self", "value": true }, { "all_of": [ { "test": "has_component", "subject": "self", "value": "minecraft:angry" }, { "test": "is_family", "subject": "target", "operator": "!=", "value": "player" } ] } ] } ] } }, { "id": 8, "chance": 1, "filters": { "all_of": [ { "test": "hourly_clock_time", "operator": ">=", "value": 12000 }, { "test": "hourly_clock_time", "operator": "<", "value": 18000 }, { "test": "is_visible", "subject": "self", "value": true }, { "any_of": [ { "test": "is_avoiding_mobs", "subject": "self", "value": true }, { "test": "has_component", "subject": "self", "value": "minecraft:angry" } ] } ] } } ] } ], "/vanilla/behavior_pack/entities/witch.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": [ { "id": 19, "chance": 0.15, "filters": { "all_of": [ { "test": "is_underwater", "subject": "self", "value": true }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "water_breathing" } ] } ] } }, { "id": 12, "chance": 0.15, "filters": { "all_of": [ { "any_of": [ { "test": "on_fire", "subject": "self", "value": true }, { "test": "on_hot_block", "subject": "self", "value": true }, { "test": "taking_fire_damage", "subject": "self", "value": true } ] }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "fire_resistance" } ] } ] } }, { "id": 21, "chance": 0.05, "filters": { "all_of": [ { "test": "is_missing_health", "subject": "self", "value": true } ] } }, { "id": 14, "chance": 0.25, "filters": { "all_of": [ { "test": "has_target", "subject": "self", "value": true }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "speed" } ] }, { "test": "target_distance", "subject": "self", "value": 11, "operator": ">=" } ] } } ] } ] } }, { "id": "speed_modifier", "title": "Speed Modifier", "description": "The movement speed modifier to apply to the entity while it is drinking a potion. A value of 0 represents no change in speed.", "defaultValue": 0, "dataType": 3, "samples": { "/vanilla/behavior_pack/entities/wandering_trader.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": -0.2 } ], "/vanilla/behavior_pack/entities/witch.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": -0.25 } ] } }, { "id": "priority", "title": "Priority", "hideSamples": true, "description": "As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.", "dataType": 0, "samples": { "/vanilla/behavior_pack/entities/wandering_trader.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": 1 } ], "/vanilla/behavior_pack/entities/witch.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": 1 } ] } } ], "description": "Allows the mob to drink potions based on specified environment conditions.", "title": "Drink Potion Behavior", "samples": { "/vanilla/behavior_pack/entities/wandering_trader.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": { "priority": 1, "speed_modifier": -0.2, "potions": [ { "id": 7, "chance": 1, "filters": { "all_of": [ { "any_of": [ { "test": "hourly_clock_time", "operator": ">=", "value": 18000 }, { "test": "hourly_clock_time", "operator": "<", "value": 12000 } ] }, { "test": "is_visible", "subject": "self", "value": true }, { "any_of": [ { "test": "is_avoiding_mobs", "subject": "self", "value": true }, { "all_of": [ { "test": "has_component", "subject": "self", "value": "minecraft:angry" }, { "test": "is_family", "subject": "target", "operator": "!=", "value": "player" } ] } ] } ] } }, { "id": 8, "chance": 1, "filters": { "all_of": [ { "test": "hourly_clock_time", "operator": ">=", "value": 12000 }, { "test": "hourly_clock_time", "operator": "<", "value": 18000 }, { "test": "is_visible", "subject": "self", "value": true }, { "any_of": [ { "test": "is_avoiding_mobs", "subject": "self", "value": true }, { "test": "has_component", "subject": "self", "value": "minecraft:angry" } ] } ] } } ] } } ], "/vanilla/behavior_pack/entities/witch.json": [ { "path": "/minecraft:entity/components/minecraft:behavior.drink_potion/", "content": { "priority": 1, "speed_modifier": -0.25, "potions": [ { "id": 19, "chance": 0.15, "filters": { "all_of": [ { "test": "is_underwater", "subject": "self", "value": true }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "water_breathing" } ] } ] } }, { "id": 12, "chance": 0.15, "filters": { "all_of": [ { "any_of": [ { "test": "on_fire", "subject": "self", "value": true }, { "test": "on_hot_block", "subject": "self", "value": true }, { "test": "taking_fire_damage", "subject": "self", "value": true } ] }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "fire_resistance" } ] } ] } }, { "id": 21, "chance": 0.05, "filters": { "all_of": [ { "test": "is_missing_health", "subject": "self", "value": true } ] } }, { "id": 14, "chance": 0.25, "filters": { "all_of": [ { "test": "has_target", "subject": "self", "value": true }, { "none_of": [ { "test": "has_mob_effect", "subject": "self", "value": "speed" } ] }, { "test": "target_distance", "subject": "self", "value": 11, "operator": ">=" } ] } } ] } } ] }, "id": "minecraft:behavior.drink_potion" }