我的世界如何使用数据包预设让其他模组生物适配EFM

根据作者所说,以后版本的史诗战斗除了1.12.2以外将只支持数据包的编写。

史诗战斗通常不兼容其他mod,尤其是实体。因此,您必须手动定义实体的模型、动画和其他属性值,好在作者提供了预设可以使用。我将讲解如何编写数据包并使用作者的预设来让其他mod的生物拥有史诗战斗的动作。

(注意,目前所教的方法目前仅限于有与包括玩家在内的原版生物相同模版,或纯粹是套用原版生物或玩家模型的模组生物,有着独特模型的生物并不支持数据包改写)

首先新建一个文件夹(自己起名,命名为数据包的名字),然后在里面创先一个txt文件,命名为“pack”,里面写上如下代码

{
"pack":{
"pack_format":6,
"description":"A short description on your pack"
}
}

根据自身的版本填上相应的数字,代码里是6所以是1.16.2-1.16.5版本。

之后保存退出,并将txt文件的后缀改为mcmeta,改完后文件应该是pack.mcmeta

之后再新建文件夹并形成如下路径(只需要文件夹套文件夹并命名,最里面是json文件)

data/modid/epicfight_mobpatch/entityname.json

其中”modid”就是模组的id名称,”entityname”就是你想要修改的生物名字,比如阿图姆模组的法老王就是“atum:pharaoh”,”modid”就是”atum”,”entityname”就是”pharaoh”。可以用“/summom”指令查看。json文件通过修改txt文件的后缀得到。

之后用记事本的方式打开json文件,在文件中写入代码,就可以为你想要获得史诗战斗动作的生物编写数据了。(如果看了自定义武器的那篇教程应该会很好理解)

首先,作者提供了各种预设。可以让mod生物直接引用原版生物的史诗战斗动作。(但是注意该生物必须与原版的某生物模型相同)

只需要把以下代码复制进json文件中。

{
"preset": "minecraft:skeleton"
}

就可以让mod生物拥有骷髅的史诗战斗动作。(阿图姆的法老王如不修改材质,则不匹配骷髅的模型,此处只是举例)

同理,将“skeleton”换成其他原版生物的id就能将该生物写上史诗战斗动作。

目前支持的预设有如下几种

之后只需要把文件夹放入以下路径或直接在新建世界时导入数据包就能运行了。(压缩后放入也能运行,不过要注意压缩文件打开后就要能看到pack和data文件,否则无法运行)

以下是目前我发现的适合这套简单编写方式的模组:

Villager Recruits(适合玩家预设),阿图姆(用僵尸,玩家,骷髅预设能覆盖几乎所有生物),残暴与掠夺(掠夺者预设),Human Companions(玩家预设),中世纪生物(玩家预设)

最后给大家分享一个作者提供的特殊玩家预设,可以让与玩家模型相同的生物拥有复杂的史诗战斗动作(翻滚,假动作,垫布,侧身砍等)直接将以下代码复制进json文件就能运行。(也可以到discord下载作者写好的json文件)

{
    "model": "epicfight:entity/biped",
    "renderer": "player",
    "isHumanoid": true,
    "faction": "villager",
    "attributes": {
        "impact": 1.0,
        "armor_negation": 0.0,
        "max_strikes": 1,
        "chasing_speed": 0.70
    },
    "default_livingmotions": {
        "idle": "epicfight:biped/living/idle",
        "walk": "epicfight:biped/living/walk",
        "chase": "epicfight:biped/living/walk",
        "death": "epicfight:biped/living/death"
    },
    "humanoid_weapon_motions": [
          {
            "weapon_categories": ["axe", "hoe", "pickaxe", "shovel", "sword"],
            "style":"common",
            "livingmotions": {
                "chase": "epicfight:illager/chase",
                        "walk": "epicfight:biped/living/walk"
            }
          },
              {
                  "weapon_categories": ["spear"],
                  "style":"common",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/run_holding_weapon",
                        "walk": "epicfight:biped/living/hold_spear"
                  }
              },
              {
                  "weapon_categories": ["spear", "trident"],
                  "style":"one_hand",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/run_holding_weapon",
                        "walk": "epicfight:biped/living/walk"
                  }
              },
              {
                  "weapon_categories": ["tachi"],
                  "style":"two_hand",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/hold_tachi",
                        "walk": "epicfight:biped/living/hold_tachi"
                  }
              },
              {
                  "weapon_categories": ["greatsword"],
                  "style":"two_hand",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/walk_twohand",
                        "walk": "epicfight:biped/living/walk_twohand"
                  }
              },
              {
                  "weapon_categories": ["longsword"],
                  "style":"two_hand",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/hold_longsword",
                        "walk": "epicfight:biped/living/hold_longsword"
                  }
              },
              {
                  "weapon_categories": ["katana"],
                  "style":"two_hand",
                  "livingmotions": {
                        "chase": "epicfight:biped/living/hold_katana",
                        "walk": "epicfight:biped/living/hold_katana"
                  }
              },
              {
            "weapon_categories": ["sword"],
            "style":"two_hand",
            "livingmotions": {
                "chase": "epicfight:biped/living/walk",
                        "walk": "epicfight:biped/living/walk"
            }
          }
    ],
    "stun_animations": {
        "short": "epicfight:biped/combat/hit_short",
        "long": "epicfight:biped/combat/hit_long",
        "knockdown": "epicfight:biped/combat/knockdown",
        "fall": "epicfight:biped/living/landing"
    },
    "combat_behavior": [
        {
            "weapon_categories": ["sword"],
            "style": "common",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:illager/swing_axe2"
                        }
                              ]                
                },
                {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:illager/swing_axe3"
                        }
                              ]                
                },              
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                              ]                
                },
                {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                              ]                
                },
                {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                              ]                
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/skill/sweeping_edge"
                        }
                              ]                
                }
            ]
        },
            {
            "weapon_categories": ["spear"],
            "style": "two_hand",
            "behavior_series": [
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_spear_twohand1"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_spear_twohand2"
                        }
                    ]
                },
                           {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_spear_twohand3"
                        }
                    ]
                },
                           {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 15.0}
                            ],
                            "animation": "epicfight:biped/skill/spear_slash"
                        }
                    ]
                }
            ]
        },
{
            "weapon_categories": ["axe"],
            "style": "common",
            "behavior_series": [
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:illager/swing_axe2"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:illager/swing_axe3"
                        }
                    ]
                },
                           {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:illager/swing_axe1"
                        }
                    ]
                },
                           {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 15.0}
                            ],
                            "animation": "epicfight:biped/skill/guillotine_axe"
                        }
                    ]
                }
            ]
         },
             {
            "weapon_categories": ["spear", "trident"],
            "style": "one_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_spear_onehand"
                        }
                    ]
                },
                           {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}, {"predicate":"random_chance","chance":0.5}
                            ],
                            "animation": "epicfight:biped/skill/spear_thrust"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["tachi"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 0.085,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_tachi_special"
                        }
                               ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_longsword1"
                                    }
                               ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_longsword2"
                        }
                    ]
                },
                        {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.3,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/skill/lethal_slicing_once"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["greatsword"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 0.15,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 14.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_greatsword1"
                        }
                               ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/greatsword_auto1"
                                    },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/combat/greatsword_auto2"
                                    }
                    ]
                },
{
                    "weight": 0.2,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        },
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 14.0}
                            ],
                            "animation": "epicfight:biped/skill/giant_whirlwind"
                        }
                               ]                
                }
            ]
        },
            {
            "weapon_categories": ["dagger"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 6.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_dagger_twohand2"
                        }
                               ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_dagger_twohand1"
                                    }
                    ]
                },
                        {
                    "weight": 0.65,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
{
                    "weight": 0.65,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": true,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/skill/blade_rush_first"
                        },
 {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/skill/blade_rush_second"
                        },
 {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/skill/blade_rush_third"
                        },
 {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:biped/skill/blade_rush_finisher"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["dagger"],
            "style": "one_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_dagger_onehand1"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_dagger_onehand2"
                                    },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_dagger_onehand3"
                                    }
                    ]
                },
                        {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
 {
                    "weight": 0.65,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
 {
                    "weight": 0.65,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.05,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 9.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/eviscerate_first"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/eviscerate_second"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["longsword"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_longsword1"
                        }
                               ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_longsword2"
                        }
                    ]
                },
                        {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.2,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 12.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/eviscerate_first"
                        },
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 10.0}
                            ],
                            "animation": "epicfight:biped/combat/longsword_auto3"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["katana"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_katana1"
                        },
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_katana2"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_katana3"
                        }
                    ]
                },
                        {
                    "weight": 0.6,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.6,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
{
                    "weight": 0.05,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/skill/fatal_draw_dash"
                        }
                    ]
                }
            ]
        },
            {
            "weapon_categories": ["sword"],
            "style": "two_hand",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_sword_dual3"
                        }
                              ]                
                },
                        {
                    "weight": 1.0,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                        {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_sword_dual1"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/combat/mob_sword_dual2"
                        }
                    ]
                },
                        {
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
{
                    "weight": 0.1,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
{
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 8.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        },
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 7.0}
                            ],
                            "animation": "epicfight:biped/skill/dancing_edge"
                        }
                    ]
                }
            ]
        },
        {
            "weapon_categories": ["fist"],
            "style": "common",
            "behavior_series": [
                {
                    "weight": 1.0,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 8.0, "max": 10.0}
                            ],
                            "animation": "epicfight:enderman/rush_kick"
                        }
                    ]
                },
{
                    "weight": 0.8,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 6.0}
                            ],
                            "animation": "epicfight:enderman/knee"
                        }
                    ]
                },
{
                    "weight": 0.8,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 6.0, "max": 8.0}
                            ],
                            "animation": "epicfight:zombie/attack1"
                        }
                    ]
                },
{
                    "weight": 0.8,
                    "canBeInterrupted": true,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 6.0, "max": 8.0}
                            ],
                            "animation": "epicfight:zombie/attack2"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_backward"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/roll_forward"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_right"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_left"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_forward"
                        }
                    ]
                },
{
                    "weight": 0.5,
                    "canBeInterrupted": false,
                    "looping": false,
                    "behaviors": [
                                    {
                            "conditions": [
                                {"predicate":"within_eye_height"}, {"predicate":"within_distance", "min": 0.0, "max": 5.0}
                            ],
                            "animation": "epicfight:biped/skill/step_backward"
                        }
                    ]
                }
            ]
        }
    ]
}

以上就是此次教程的全部内容,

如果有人想知道如何编写代码来让每个生物拥有独一无二的攻击动作,或如何制作材质包让模型很接近原版生物的mod生物匹配预设,

我会再做一期详细讲解代码每个参数的意思以及如何编辑,当然如此复杂的编辑个人并不建议用记事本进行。

(如果我坑了,可以到作者的Github去详细了解。)

Copyright © 2018-2023 PHP源码网 版权所有
PHP源码网 » 我的世界如何使用数据包预设让其他模组生物适配EFM

提供最优质的资源集合

立即查看 了解详情