diff --git a/behaviors/entities/apatosaurus.json b/behaviors/entities/apatosaurus.json index 73d0d740..a951ce0d 100644 --- a/behaviors/entities/apatosaurus.json +++ b/behaviors/entities/apatosaurus.json @@ -992,6 +992,12 @@ "subject": "self", "operator": "!=", "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_baby" } ] }, diff --git a/behaviors/entities/parasaurolophus.json b/behaviors/entities/parasaurolophus.json index 2cbf83d0..df0ce178 100644 --- a/behaviors/entities/parasaurolophus.json +++ b/behaviors/entities/parasaurolophus.json @@ -294,8 +294,7 @@ "minecraft:behavior.nearest_attackable_target": { "priority": 2, "reselect_targets": true, - "within_radius": 5, - "must_see": true, + "within_radius": 16, "entity_types": [ { "filters": { diff --git a/behaviors/entities/stegosaurus.json b/behaviors/entities/stegosaurus.json index 0548d6c3..4424b5b4 100644 --- a/behaviors/entities/stegosaurus.json +++ b/behaviors/entities/stegosaurus.json @@ -308,9 +308,7 @@ "rift:default_targets": { "minecraft:behavior.nearest_attackable_target": { "priority": 2, - "reselect_targets": true, "within_radius": 25.0, - "must_see": true, "entity_types": [ { "filters": { @@ -323,7 +321,7 @@ ] } }, - "rift:attack_forced_attack_entity": { + "rift:attack_forced_attack_entity_adult": { "minecraft:behavior.nearest_attackable_target": { "priority": 2, "entity_types": [ @@ -338,7 +336,26 @@ ] }, "minecraft:on_target_escape": { - "event": "rift:no_force_attacked", + "event": "rift:no_force_attacked_adult", + "target": "self" + } + }, + "rift:attack_forced_attack_entity_baby": { + "minecraft:behavior.nearest_attackable_target": { + "priority": 2, + "entity_types": [ + { + "filters": { + "test": "is_family", + "subject": "other", + "value": "isForcedAttacking" + }, + "max_dist": 25 + } + ] + }, + "minecraft:on_target_escape": { + "event": "rift:no_force_attacked_baby", "target": "self" } }, @@ -655,10 +672,47 @@ "subject": "self", "operator": "!=", "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_baby" } ] }, - "event": "rift:on_force_attacked", + "event": "rift:on_force_attacked_adult", + "target": "self" + } + }, + { + "on_damage": { + "filters": { + "all_of": [ + { + "test": "is_family", + "subject": "other", + "value": "forcedAttack" + }, + { + "test": "has_target", + "subject": "self", + "value": false + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "value": "minecraft:is_baby" + } + ] + }, + "event": "rift:on_force_attacked_baby", "target": "self" } } @@ -1254,10 +1308,10 @@ ] } }, - "rift:on_force_attacked": { + "rift:on_force_attacked_adult": { "add": { "component_groups": [ - "rift:attack_forced_attack_entity" + "rift:attack_forced_attack_entity_adult" ] }, "remove": { @@ -1266,34 +1320,31 @@ ] } }, - "rift:no_force_attacked": { - "sequence": [ - { - "remove": { - "component_groups": [ - "rift:attack_forced_attack_entity" - ] - } - }, - { - "filters": { - "test": "has_component", - "subject": "self", - "operator": "!=", - "value": "minecraft:is_baby" - }, - "add": { - "component_groups": [ - "rift:default_targets" - ] - }, - "run_command": { - "command": [ - "say test" - ] - } - } - ] + "rift:no_force_attacked_adult": { + "add": { + "component_groups": [ + "rift:default_targets" + ] + }, + "remove": { + "component_groups": [ + "rift:attack_forced_attack_entity_adult" + ] + } + }, + "rift:on_force_attacked_baby": { + "add": { + "component_groups": [ + "rift:attack_forced_attack_entity_baby" + ] + } + }, + "rift:no_force_attacked_baby": { + "remove": { + "component_groups": [ + "rift:attack_forced_attack_entity_baby" + ] + } } } } diff --git a/behaviors/entities/triceratops.json b/behaviors/entities/triceratops.json index 7d1b6ca2..0d0cdcc5 100644 --- a/behaviors/entities/triceratops.json +++ b/behaviors/entities/triceratops.json @@ -378,9 +378,10 @@ ] } }, - "rift:attack_forced_attack_entity": { + "rift:attack_forced_attack_entity_adult": { "minecraft:behavior.nearest_attackable_target": { "priority": 2, + "within_radius": 35, "entity_types": [ { "filters": { @@ -393,7 +394,27 @@ ] }, "minecraft:on_target_escape": { - "event": "rift:no_force_attacked", + "event": "rift:no_force_attacked_adult", + "target": "self" + } + }, + "rift:attack_forced_attack_entity_baby": { + "minecraft:behavior.nearest_attackable_target": { + "priority": 2, + "within_radius": 35, + "entity_types": [ + { + "filters": { + "test": "is_family", + "subject": "other", + "value": "isForcedAttacking" + }, + "max_dist": 35 + } + ] + }, + "minecraft:on_target_escape": { + "event": "rift:no_force_attacked_baby", "target": "self" } }, @@ -1070,10 +1091,47 @@ "subject": "self", "operator": "!=", "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_baby" + } + ] + }, + "event": "rift:on_force_attacked_adult", + "target": "self" + } + }, + { + "on_damage": { + "filters": { + "all_of": [ + { + "test": "is_family", + "subject": "other", + "value": "forcedAttack" + }, + { + "test": "has_target", + "subject": "self", + "value": false + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "value": "minecraft:is_baby" } ] }, - "event": "rift:on_force_attacked", + "event": "rift:on_force_attacked_baby", "target": "self" } } @@ -1463,7 +1521,7 @@ "rift:triceratops_adult_wild", "rift:triceratops_adult_calm", "rift:default_targets", - "rift:attack_forced_attack_entity" + "rift:attack_forced_attack_entity_adult" ] } }, @@ -1746,10 +1804,10 @@ ] } }, - "rift:on_force_attacked": { + "rift:on_force_attacked_adult": { "add": { "component_groups": [ - "rift:attack_forced_attack_entity" + "rift:attack_forced_attack_entity_adult" ] }, "remove": { @@ -1758,28 +1816,31 @@ ] } }, - "rift:no_force_attacked": { - "sequence": [ - { - "remove": { - "component_groups": [ - "rift:attack_forced_attack_entity" - ] - } - }, - { - "filters": { - "test": "has_component", - "operator": "!=", - "value": "minecraft:is_baby" - }, - "add": { - "component_groups": [ - "rift:default_targets" - ] - } - } - ] + "rift:no_force_attacked_adult": { + "add": { + "component_groups": [ + "rift:default_targets" + ] + }, + "remove": { + "component_groups": [ + "rift:attack_forced_attack_entity_adult" + ] + } + }, + "rift:on_force_attacked_baby": { + "add": { + "component_groups": [ + "rift:attack_forced_attack_entity_baby" + ] + } + }, + "rift:no_force_attacked_baby": { + "remove": { + "component_groups": [ + "rift:attack_forced_attack_entity_baby" + ] + } } } } diff --git a/behaviors/entities/utahraptor.json b/behaviors/entities/utahraptor.json index 9252938d..3c56c265 100644 --- a/behaviors/entities/utahraptor.json +++ b/behaviors/entities/utahraptor.json @@ -412,7 +412,7 @@ ] }, "minecraft:on_target_escape": { - "event": "rift:no_force_attacked", + "event": "rift:no_force_attacked_adult", "target": "self" } }, @@ -1080,10 +1080,16 @@ "subject": "self", "operator": "!=", "value": "minecraft:is_tamed" + }, + { + "test": "has_component", + "subject": "self", + "operator": "!=", + "value": "minecraft:is_baby" } ] }, - "event": "rift:on_force_attacked", + "event": "rift:on_force_attacked_adult", "target": "self" } } @@ -1892,7 +1898,7 @@ ] } }, - "rift:on_force_attacked": { + "rift:on_force_attacked_adult": { "add": { "component_groups": [ "rift:attack_forced_attack_entity" @@ -1904,28 +1910,17 @@ ] } }, - "rift:no_force_attacked": { - "sequence": [ - { - "remove": { - "component_groups": [ - "rift:attack_forced_attack_entity" - ] - } - }, - { - "filters": { - "test": "has_component", - "operator": "!=", - "value": "minecraft:is_baby" - }, - "add": { - "component_groups": [ - "rift:default_targets" - ] - } - } - ] + "rift:no_force_attacked_adult": { + "add": { + "component_groups": [ + "rift:default_targets" + ] + }, + "remove": { + "component_groups": [ + "rift:attack_forced_attack_entity" + ] + } } } }