mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2025-02-25 11:19:09 +00:00
403 lines
12 KiB
JSON
403 lines
12 KiB
JSON
{
|
|
"format_version": "1.21.70",
|
|
"minecraft:entity": {
|
|
"description": {
|
|
"identifier": "minecraft:pufferfish",
|
|
"spawn_category": "water_ambient",
|
|
"is_spawnable": true,
|
|
"is_summonable": true
|
|
},
|
|
"component_groups": {
|
|
"minecraft:normal_puff": {
|
|
"minecraft:variant": {
|
|
"value": 0
|
|
},
|
|
"minecraft:entity_sensor": {
|
|
"relative_range": false,
|
|
"subsensors": [
|
|
{
|
|
"range": [ 2.5, 2.5 ],
|
|
"minimum_count": 1,
|
|
"event_filters": {
|
|
"any_of": [
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "mob" },
|
|
{
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" },
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "aquatic" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{ "test": "is_family", "subject": "other", "value": "player" }
|
|
]
|
|
},
|
|
"event": "minecraft:start_half_puff"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"minecraft:half_puff_primary": {
|
|
"minecraft:variant": {
|
|
"value": 1
|
|
},
|
|
"minecraft:timer": {
|
|
"looping": false,
|
|
"time": 2,
|
|
"randomInterval": false,
|
|
"time_down_event": {
|
|
"event": "minecraft:on_half_puff"
|
|
}
|
|
}
|
|
},
|
|
"minecraft:half_puff_secondary": {
|
|
"minecraft:variant": {
|
|
"value": 1
|
|
},
|
|
"minecraft:entity_sensor": {
|
|
"relative_range": false,
|
|
"subsensors": [
|
|
{
|
|
"range": [ 2.5, 2.5 ],
|
|
"minimum_count": 1,
|
|
"event_filters": {
|
|
"any_of": [
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "mob" },
|
|
{
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" },
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "aquatic" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{ "test": "is_family", "subject": "other", "value": "player" }
|
|
]
|
|
},
|
|
"event": "minecraft:start_full_puff"
|
|
}
|
|
]
|
|
},
|
|
"minecraft:timer": {
|
|
"looping": false,
|
|
"time": 2,
|
|
"randomInterval": false,
|
|
"time_down_event": {
|
|
"event": "minecraft:on_normal_puff"
|
|
}
|
|
}
|
|
},
|
|
"minecraft:full_puff": {
|
|
"minecraft:variant": {
|
|
"value": 2
|
|
},
|
|
"minecraft:area_attack": {
|
|
"damage_range": 0.2,
|
|
"damage_per_tick": 2,
|
|
"damage_cooldown": 0.5,
|
|
"cause": "contact",
|
|
"entity_filter": {
|
|
"any_of": [
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "mob" },
|
|
{
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" },
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "aquatic" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "player" },
|
|
{ "test": "has_ability", "subject": "other", "operator": "not", "value": "instabuild" }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"minecraft:mob_effect": {
|
|
"effect_range": 0.2,
|
|
"mob_effect": "poison",
|
|
"effect_time": 10,
|
|
"entity_filter": {
|
|
"any_of": [
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "mob" },
|
|
{
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" },
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "aquatic" },
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "undead" }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "player"},
|
|
{ "test": "has_ability", "subject": "other", "operator": "not", "value": "instabuild" }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"minecraft:deflate_sensor_buffer": {
|
|
"minecraft:timer": {
|
|
"looping": false,
|
|
"time": 0.01,
|
|
"randomInterval": false,
|
|
"time_down_event": {
|
|
"event": "minecraft:on_full_puff"
|
|
}
|
|
}
|
|
},
|
|
"minecraft:deflate_sensor": {
|
|
"minecraft:entity_sensor": {
|
|
"relative_range": false,
|
|
"subsensors": [
|
|
{
|
|
"range": [ 2.9, 2.9 ],
|
|
"minimum_count": 0,
|
|
"maximum_count": 0,
|
|
"event_filters": {
|
|
"any_of": [
|
|
{
|
|
"all_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "mob" },
|
|
{
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" },
|
|
{ "test": "is_family", "subject": "other", "operator": "not", "value": "aquatic" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{ "test": "is_family", "subject": "other", "value": "player" }
|
|
]
|
|
},
|
|
"event": "minecraft:from_full_puff"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"minecraft:start_deflate": {
|
|
"minecraft:timer": {
|
|
"looping": false,
|
|
"time": 3,
|
|
"randomInterval": false,
|
|
"time_down_event": {
|
|
"event": "minecraft:on_deflate"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"minecraft:is_hidden_when_invisible": {
|
|
},
|
|
"minecraft:experience_reward": {
|
|
"on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
|
|
},
|
|
"minecraft:type_family": {
|
|
"family": [ "aquatic", "pufferfish", "fish" ]
|
|
},
|
|
"minecraft:collision_box": {
|
|
"width": 0.8,
|
|
"height": 0.8
|
|
},
|
|
"minecraft:loot": {
|
|
"table": "loot_tables/entities/pufferfish.json"
|
|
},
|
|
"minecraft:scale": {
|
|
"value": 1.2
|
|
},
|
|
"minecraft:health": {
|
|
"value": 3,
|
|
"max": 3
|
|
},
|
|
"minecraft:hurt_on_condition": {
|
|
"damage_conditions": [
|
|
{
|
|
"filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true },
|
|
"cause": "lava",
|
|
"damage_per_tick": 4
|
|
}
|
|
]
|
|
},
|
|
"minecraft:breathable": {
|
|
"total_supply": 15,
|
|
"suffocate_time": 0,
|
|
"breathes_air": false,
|
|
"breathes_water": true
|
|
},
|
|
"minecraft:movement": {
|
|
"value": 0.13
|
|
},
|
|
"minecraft:underwater_movement": {
|
|
"value": 0.13
|
|
},
|
|
"minecraft:navigation.generic": { // Allows the mob to go through water
|
|
"is_amphibious": false,
|
|
"can_path_over_water": false,
|
|
"can_swim": true,
|
|
"can_walk": false,
|
|
"can_breach": false,
|
|
"can_sink": false
|
|
},
|
|
"minecraft:movement.sway": {
|
|
"sway_amplitude": 0.0
|
|
},
|
|
"minecraft:despawn": {
|
|
"despawn_from_distance": {
|
|
"min_distance": 32,
|
|
"max_distance": 40
|
|
}
|
|
},
|
|
"minecraft:behavior.random_swim": { // Randomly selects points to go to, even in water
|
|
"priority": 3,
|
|
"speed_multiplier": 1.0,
|
|
"xz_dist": 16,
|
|
"y_dist": 4,
|
|
"interval": 0
|
|
},
|
|
"minecraft:behavior.swim_wander": {
|
|
"priority": 5,
|
|
"interval": 1.0,
|
|
"look_ahead": 2.0,
|
|
"speed_multiplier": 1.0,
|
|
"wander_time": 5.0
|
|
},
|
|
"minecraft:behavior.avoid_mob_type": {
|
|
"priority": 1,
|
|
"entity_types": [
|
|
{
|
|
"filters": {
|
|
"any_of": [
|
|
{ "test": "is_family", "subject": "other", "value": "player" },
|
|
{ "test": "is_family", "subject": "other", "value": "axolotl" }
|
|
]
|
|
},
|
|
"max_dist": 6,
|
|
"walk_speed_multiplier": 1.5,
|
|
"sprint_speed_multiplier": 2.0
|
|
}
|
|
]
|
|
},
|
|
"minecraft:flocking": {
|
|
"in_water": true,
|
|
"match_variants": false,
|
|
"use_center_of_mass": true,
|
|
"low_flock_limit": 4,
|
|
"high_flock_limit": 8,
|
|
"goal_weight": 2.0,
|
|
"loner_chance": 0.1,
|
|
"influence_radius": 3.0,
|
|
"breach_influence": 7.0,
|
|
"separation_weight": 1.75,
|
|
"separation_threshold": 0.95,
|
|
"cohesion_weight": 2.0,
|
|
"cohesion_threshold": 1.95,
|
|
"innner_cohesion_threshold": 1.25,
|
|
"min_height": 1.5,
|
|
"max_height": 6.0,
|
|
"block_distance": 2.0,
|
|
"block_weight": 0.85
|
|
},
|
|
"minecraft:nameable": {
|
|
},
|
|
"minecraft:physics": {
|
|
"has_gravity": false
|
|
},
|
|
"minecraft:pushable": {
|
|
"is_pushable": true,
|
|
"is_pushable_by_piston": true
|
|
},
|
|
"minecraft:conditional_bandwidth_optimization": {
|
|
}
|
|
},
|
|
"events": {
|
|
"minecraft:entity_spawned": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:normal_puff" ]
|
|
}
|
|
},
|
|
"minecraft:to_full_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:full_puff", "minecraft:deflate_sensor_buffer" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:normal_puff" ]
|
|
}
|
|
},
|
|
"minecraft:start_half_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:half_puff_primary" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:normal_puff" ]
|
|
}
|
|
},
|
|
"minecraft:on_half_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:half_puff_secondary" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:half_puff_primary" ]
|
|
}
|
|
},
|
|
"minecraft:start_full_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:full_puff", "minecraft:deflate_sensor_buffer" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:half_puff_secondary" ]
|
|
}
|
|
},
|
|
"minecraft:on_full_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:deflate_sensor" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:deflate_sensor_buffer" ]
|
|
}
|
|
},
|
|
"minecraft:from_full_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:start_deflate" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:deflate_sensor" ]
|
|
}
|
|
},
|
|
"minecraft:on_deflate": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:half_puff_secondary" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:full_puff", "minecraft:start_deflate" ]
|
|
}
|
|
},
|
|
"minecraft:on_normal_puff": {
|
|
"add": {
|
|
"component_groups": [ "minecraft:normal_puff" ]
|
|
},
|
|
"remove": {
|
|
"component_groups": [ "minecraft:half_puff_secondary" ]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|