From 10c3636853a292aabca309eca02e287618afb438 Mon Sep 17 00:00:00 2001 From: Hell13Cat <46496367+Hell13Cat@users.noreply.github.com> Date: Thu, 10 Feb 2022 21:40:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=82=D1=83=D1=80=D0=B5=D0=BB=D1=8C=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .mcattributes | 3 +- behavior_pack/entities/imoo_turel.json | 197 ++++++++++++++++++ .../loot_tables/entities/imoo_turel.json | 23 ++ behavior_pack/manifest.json | 6 +- resource_pack/manifest.json | 6 +- 5 files changed, 228 insertions(+), 7 deletions(-) create mode 100644 behavior_pack/entities/imoo_turel.json create mode 100644 behavior_pack/loot_tables/entities/imoo_turel.json diff --git a/.mcattributes b/.mcattributes index 2effa0f..a3a5967 100644 --- a/.mcattributes +++ b/.mcattributes @@ -1,2 +1,3 @@ diagnostic.disable.minecraft.manifest.module.missing=true -diagnostic.disable.minecraft.manifest.module.missing=true \ No newline at end of file +diagnostic.disable.minecraft.manifest.module.missing=true +diagnostic.disable.behaviorpack.loot_table.missing=true \ No newline at end of file diff --git a/behavior_pack/entities/imoo_turel.json b/behavior_pack/entities/imoo_turel.json new file mode 100644 index 0000000..996302f --- /dev/null +++ b/behavior_pack/entities/imoo_turel.json @@ -0,0 +1,197 @@ +{ + "format_version": "1.16.0", + "minecraft:entity": { + "description": { + "identifier": "imoo:turel", + "is_spawnable": true, + "is_summonable": true, + "is_experimental": false + }, + "component_groups": { + "mode_switcher": { + "minecraft:target_nearby_sensor": { + "inside_range": 2.0, + "outside_range": 3.0, + "must_see": true, + "on_inside_range": { + "event": "switch_to_melee", + "target": "self" + }, + "on_outside_range": { + "event": "switch_to_ranged", + "target": "self" + } + } + }, + "ranged_mode": { + "minecraft:shooter": { + "def": "minecraft:arrow" + }, + "minecraft:behavior.ranged_attack": { + "priority": 3, + "burst_shots": 3, + "burst_interval": 0.3, + "charge_charged_trigger": 0.0, + "charge_shoot_trigger": 4.0, + "attack_interval_min": 3.0, + "attack_interval_max": 5.0, + "attack_radius": 16.0 + } + }, + "melee_mode": { + "minecraft:attack": { + "damage": 6 + }, + "minecraft:behavior.melee_attack": { + "priority": 3 + } + } + }, + "components": { + "minecraft:is_hidden_when_invisible": { + }, + "minecraft:experience_reward": { + "on_death": "query.last_hit_by_player ? 10 : 0" + }, + "minecraft:loot": { + "table": "loot_tables/entities/imoo_turel.json" + }, + "minecraft:collision_box": { + "width": 0.5, + "height": 1.8 + }, + "minecraft:damage_sensor": { + "triggers": { + "cause": "fall", + "deals_damage": false + } + }, + "minecraft:movement": { + "value": 0 + }, + "minecraft:navigation.walk": { + "can_path_over_water": true, + "avoid_water": true, + "avoid_damage_blocks": true + }, + "minecraft:movement.basic": { + }, + "minecraft:jump.static": { + }, + "minecraft:can_climb": { + }, + "minecraft:health": { + "value": 10000, + "max": 10000 + }, + "minecraft:follow_range": { + "value": 48, + "max": 48 + }, + "minecraft:fire_immune": { + }, + "minecraft:nameable": { + + }, + "minecraft:despawn": { + "despawn_from_distance": {} + }, + "minecraft:behavior.float": { + "priority": 0 + }, + "minecraft:behavior.hurt_by_target": { + "priority": 1 + }, + "minecraft:behavior.nearest_attackable_target": { + "priority": 2, + "must_see": true, + "entity_types": [ + { + "filters": { + "all_of": [ + { + "test": "is_family", + "subject": "other", + "value": "monster" + }, + { + "test": "is_family", + "subject": "other", + "operator": "!=", + "value": "creeper" + } + ] + }, + "max_dist": 48.0 + } + ] + }, + "minecraft:behavior.random_stroll": { + "priority": 4, + "speed_multiplier": 1.0 + }, + "minecraft:behavior.random_look_around": { + "priority": 5 + }, + "minecraft:type_family": { + "family": [ "blaze", "monster", "mob" ] + }, + "minecraft:physics": { + }, + "minecraft:pushable": { + "is_pushable": true, + "is_pushable_by_piston": true + }, + "minecraft:on_hurt": { + "event": "minecraft:on_hurt_event", + "target": "self" + }, + "minecraft:on_hurt_by_player": { + "event": "minecraft:on_hurt_event", + "target": "self" + }, + "minecraft:conditional_bandwidth_optimization": { + } + }, + "events": { + "minecraft:entity_spawned": { + "add": { + "component_groups": [ + "mode_switcher" + ] + } + }, + "switch_to_melee": { + "remove": { + "component_groups": [ + "ranged_mode" + ] + }, + "add": { + "component_groups": [ + "melee_mode" + ] + } + }, + "switch_to_ranged": { + "remove": { + "component_groups": [ + "melee_mode" + ] + }, + "add": { + "component_groups": [ + "ranged_mode" + ] + } + }, + "minecraft:on_hurt_event": { + "add": { + "component_groups": [ + "mode_switcher" + ] + } + } + } + } +} \ No newline at end of file diff --git a/behavior_pack/loot_tables/entities/imoo_turel.json b/behavior_pack/loot_tables/entities/imoo_turel.json new file mode 100644 index 0000000..fcdcbc1 --- /dev/null +++ b/behavior_pack/loot_tables/entities/imoo_turel.json @@ -0,0 +1,23 @@ +{ + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "item", + "name": "imoo:turel_add", + "weight": 1, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/behavior_pack/manifest.json b/behavior_pack/manifest.json index 9785877..d425562 100644 --- a/behavior_pack/manifest.json +++ b/behavior_pack/manifest.json @@ -7,7 +7,7 @@ "version": [ 0, 5, - 17 + 18 ], "min_engine_version": [ 1, @@ -23,7 +23,7 @@ "version": [ 0, 5, - 17 + 18 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 5, - 17 + 18 ] } ] diff --git a/resource_pack/manifest.json b/resource_pack/manifest.json index c8a0514..1bb2c3d 100644 --- a/resource_pack/manifest.json +++ b/resource_pack/manifest.json @@ -7,7 +7,7 @@ "version": [ 0, 5, - 17 + 18 ], "min_engine_version": [ 1, @@ -23,7 +23,7 @@ "version": [ 0, 5, - 17 + 18 ] } ], @@ -33,7 +33,7 @@ "version": [ 0, 5, - 17 + 18 ] } ]