内科専門医 今日もマイクラ処方中

Minecraftの医学的有効性を検証中

MENU

エンティティJSONの編集: 攻撃性の編集 (day253)

3. 攻撃性の編集

必要なものは

minecraft:behavior.nearest_attackable_target

Entity Documentation - minecraft:behavior.nearest_attackable_target | Microsoft Docs

minecraft:behavior.melee_attack

Entity Documentation - minecraft:behavior.melee_attack | Microsoft Docs

 

下記がzombieのもの。適宜修正して使用。

   "minecraft:behavior.nearest_attackable_target": {
                "priority": 2,
                "must_see": true,
                "reselect_targets": true,
                "within_radius": 25.0,
                "must_see_forget_duration": 17.0,
                "entity_types": [
                  {
                    "filters": {
                      "any_of": [
                        { "test": "is_family", "subject": "other", "value": "player" },
                        { "test": "is_family", "subject": "other", "value": "snowgolem" },
                        { "test": "is_family", "subject": "other", "value": "irongolem" }
                      ]
                    },
                    "max_dist": 35
                  },
                  {
                    "filters": {
                      "any_of": [
                        { "test": "is_family", "subject": "other", "value": "villager" },
                        { "test": "is_family", "subject": "other", "value": "wandering_trader" }
                      ]
                    },
                    "max_dist": 35,
                    "must_see": false
                  },
                  {
                    "filters": {
                      "all_of": [
                        { "test": "is_family", "subject": "other", "value": "baby_turtle" },
                        { "test": "in_water", "subject": "other", "operator": "!=", "value": true }
                      ]
                    },
                    "max_dist": 35
                  }
                ]
              },
            "minecraft:behavior.melee_attack": {
                "priority": 3
            },
            "minecraft:attack": {
                "damage": 3
            }