How do I make it so the camera is attached to the Warden's head in my Behavior Pack?
This is SO annoying and it really messes up my Addon. Code:
Behavior Pack:
{ "format_version": "1.16.0", "minecraft:entity": { "description": { "identifier": "minecraft:player","minecraft:warden", "is_spawnable": true, "is_summonable": true, "is_experimental": false }, "component_groups": { "emerging": { "minecraft:behavior.emerge": { "duration": 7.0, "on_done": { "event": "minecraft:emerged", "target": "self" } } }, "pushable": { "minecraft:pushable": { "is_pushable": true, "is_pushable_by_piston": true } } }, "components": { "minecraft:hurt_on_condition": { "damage_conditions": [ { "filters": { "test": "in_lava", "subject": "self", "operator": "==", "value": true }, "cause": "lava", "damage_per_tick": 4 } ] }, "minecraft:attack": { "damage": 100 }, "minecraft:collision_box": { "width": 10, "height": 15, }, "minecraft:exhaustion_values": { "heal": 6, "jump": 0.05, "sprint_jump": 0.2, "mine": 0.005, "attack": 10, "damage": 0.1, "walk": 0.0, "sprint": 0.1, "swim": 0.01 }, "minecraft:attack": { "damage": 1000 }, "minecraft:movement_sound_distance_offset": { "value": 0.55 }, "minecraft:experience_reward": { "on_bred": "Math.Random(1,7)", "on_death": "query.last_hit_by_player ? 5 : 0" }, "minecraft:vibration_listener": {}, "minecraft:vibration_damper": {}, "minecraft:suspect_tracking": {}, "minecraft:anger_level": { "max_anger": 150, "angry_threshold": 80, "remove_targets_below_angry_threshold": true, "angry_boost": 20, "anger_decrement_interval": 1.0, "default_annoyingness": 35, "default_projectile_annoyingness": 10, "on_increase_sounds": [ { "sound": "listening_angry", "condition" : "query.anger_level(this) >= 40" }, { "sound": "listening", "condition" : "query.anger_level(this) >= 0" } ], "nuisance_filter": { "all_of": [ { "test": "is_family", "subject": "other", "operator": "not", "value": "warden" }, { "test": "is_family", "subject": "other", "operator": "not", "value": "inanimate" } ] } }, "minecraft:is_hidden_when_invisible": { }, "minecraft:type_family": { "family": [ "warden", "monster", "mob" ] }, "minecraft:breathable": { "total_supply": 15, "suffocate_time": 0 }, "minecraft:navigation.walk": { "can_path_over_water": true, "can_path_over_lava": true, "avoid_damage_blocks": true }, "minecraft:preferred_path": { "max_fall_blocks": 20 }, "minecraft:ambient_sound_interval": { "value": 2.0, "range": 4.0, "event_name": "ambient", "event_names": [ { "event_name" : "angry", "condition" : "query.anger_level(this) >= 80" }, { "event_name" : "agitated", "condition" : "query.anger_level(this) >= 40" } ] }, "minecraft:heartbeat": { "interval": "2.0 - math.clamp(query.anger_level / 80 * 1.5, 0, 1.5)" }, "minecraft:movement.basic": {}, "minecraft:jump.static": {}, "minecraft:can_climb": {}, "minecraft:collision_box": { "width": 0.9, "height": 2.9 }, "minecraft:health": { "value": 500, "max": 500 }, "minecraft:movement": { "value": 0.3 }, "minecraft:knockback_resistance": { "value": 1.0 }, "minecraft:behavior.float": { "priority": 0 }, "minecraft:behavior.dig": { "priority": 1, "duration": 5.5, "idle_time": 60.0, "vibration_is_disturbance": true, "suspicion_is_disturbance": true, "digs_in_daylight": false, "on_start": { "event": "on_digging_event", "target": "self" } }, "minecraft:behavior.roar": { "priority": 2, "duration": 4.2 }, "minecraft:behavior.sonic_boom": { "priority": 3, "duration": 3.0, "speed_multiplier": 1.2, "attack_damage": 10, "attack_range_horizontal": 15, "attack_range_vertical": 20, "attack_cooldown": 2, "knockback_vertical_strength": 0.5, "knockback_horizontal_strength": 2.5, "knockback_height_cap": 0.5, "duration_until_attack_sound": 1.7, "charge_sound": "sonic_charge", "attack_sound": "sonic_boom" }, "minecraft:behavior.melee_attack": { "priority": 4, "speed_multiplier": 1.2, "melee_fov": 360 }, "minecraft:behavior.investigate_suspicious_location": { "priority": 5, "speed_multiplier": 0.7 }, "minecraft:behavior.sniff": { "priority": 6, "duration": 4.16, "sniffing_radius": 24.0, "suspicion_radius_horizontal" : 6.0, "suspicion_radius_vertical": 20.0, "cooldown_range": [ 5.0, 10.0 ] }, "minecraft:behavior.random_stroll": { "priority": 9, "speed_multiplier": 0.5 }, "minecraft:behavior.random_look_around": { "priority": 11 }, "minecraft:physics": {}, "minecraft:mob_effect": { "effect_range": 20, "effect_time": 13, "mob_effect": "darkness", "cooldown_time": 6, "entity_filter": { "all_of": [ { "test": "is_family", "subject": "other", "value": "player" }, { "operator": "not", "test": "has_ability", "subject" : "other", "value" : "invulnerable" } ] } }, "minecraft:follow_range": 30, "minecraft:fire_immune": {}, "minecraft:nameable": {}, "minecraft:loot": { "table": "loot_tables/entities/warden.json" } }, "events": { "minecraft:spawn_emerging": { "add": { "component_groups": [ "emerging" ] } }, "minecraft:emerged": { "add": { "component_groups": [ "pushable" ] }, "remove": { "component_groups": [ "emerging" ] } }, "minecraft:entity_spawned": { "add": { "component_groups": [ "pushable" ] } }, "on_digging_event": { "remove": { "component_groups": [ "pushable" ] } } } } }
Resource Pack:
{ "format_version": "1.10.0", "minecraft:client_entity": { "description": { "identifier": "minecraft:player", "materials": { "default": "warden", "bioluminescent_layer": "warden_bioluminescent_layer" }, "textures": { "default": "textures/entity/steve.png", "bioluminescent_layer": "textures/entity/1.png", "spots_1": "textures/entity/5.png", "spots_2": "textures/entity/4.png", "tendrils": "textures/entity/6.png", "heart": "textures/entity/2.png" }, "geometry": { "default": "geometry.warden" }, "scripts": { "pre_animation": [ "variable.animation_speed = Math.min(0.5, 3.0 * query.modified_move_speed);", "variable.anim_pos_mod = 49.388962;", "variable.bob = query.life_time * 20;", "variable.modified_bob = variable.bob * 0.1 * 57.2958;", "variable.modified_bob_sin = math.sin(variable.modified_bob);", "variable.modified_bob_cos = math.cos(variable.modified_bob);", "variable.pi = 180;", "variable.halfpi = variable.pi / 2.0;", "variable.tendril_animation_length = 0.5;", "variable.head_x_rot = (68.7549 * math.cos(query.modified_distance_moved * variable.anim_pos_mod + variable.halfpi) * math.min(0.35, variable.animation_speed)) + (math.sin(variable.bob * 5.72958) * 0.06);", "variable.head_z_rot = (17.1887 * math.sin(query.modified_distance_moved * variable.anim_pos_mod) * variable.animation_speed) + (Math.cos(variable.bob * 5.72958) * 0.06);", "variable.body_x_rot = (57.2958 * math.cos(query.modified_distance_moved * variable.anim_pos_mod) * math.min(0.35, variable.animation_speed)) + (math.cos(variable.bob * 5.72958) * 0.025);", "variable.body_z_rot = (5.72958 * math.sin(query.modified_distance_moved * variable.anim_pos_mod) * variable.animation_speed) + (math.sin(variable.bob * 5.72958) * 0.025);", "variable.left_leg_x_rot = 57.2958 * math.cos(query.modified_distance_moved * variable.anim_pos_mod) * variable.animation_speed;", "variable.right_leg_x_rot = 57.2958 * math.cos(query.modified_distance_moved * variable.anim_pos_mod + variable.pi) * variable.animation_speed;", "variable.left_arm_x_rot = -(45.8366 * math.cos(query.modified_distance_moved * variable.anim_pos_mod) * variable.animation_speed);", "variable.right_arm_x_rot = -(45.8366 * math.sin(query.modified_distance_moved * variable.anim_pos_mod) * variable.animation_speed);", "variable.vibration_phase = query.time_since_last_vibration_detection;", "variable.tendril_animation = variable.vibration_phase 0.0" }, "sonic_boom_controller" ] }, "animations": { "emerge": "animation.warden.emerge", "sniff": "animation.warden.sniff", "sniff_controller": "controller.animation.warden.sniff", "dig": "animation.warden.dig", "roar": "animation.warden.roar", "roar_controller": "controller.animation.warden.roar", "shiver": "animation.warden.shiver", "shiver_controller": "controller.animation.warden.shiver", "base_pose": "animation.humanoid.base_pose.v1.0", "look_at_target": "animation.warden.look_at_target.default", "move": "animation.warden.move", "melee_attack": "animation.warden.attack", "melee_attack_controller": "controller.animation.warden.melee_attacking", "bob": "animation.warden.bob", "swimming": "animation.humanoid.swimming.v1.0", "sonic_boom": "animation.warden.sonic_boom", "sonic_boom_controller": "controller.animation.warden.sonic_boom" }, "render_controllers": [ "controller.render.warden", "controller.render.warden_bioluminescent_layer", "controller.render.warden_spots_1", "controller.render.warden_spots_2", "controller.render.warden_tendrils", "controller.render.warden_heart" ], "enable_attachables": true, "spawn_egg": { "base_color": "#0F4649", "overlay_color": "#39D6E0" }, "sound_effects": { "emerge": "mob.warden.emerge", "sniff": "mob.warden.sniff", "dig": "mob.warden.dig", "roar": "mob.warden.roar", "clicking": "mob.warden.clicking" }, "particle_effects": { "digging": "minecraft:warden_dig" } } } }
Can someone help me?
visible_bounds_offset
in the geometry for the warden which by default has a value of2.25
on the y-axis.