更新3.3

This commit is contained in:
boybook
2025-03-18 14:46:12 +08:00
parent e0e8ad3192
commit 481c844a80
11938 changed files with 149901 additions and 23781 deletions

View File

@@ -0,0 +1,37 @@
---
front:
hard: 入门
time: 40分钟
---
# 自定义生物模型详解
[示例Demo](../99-下载内容.html#示例demo)中的包含CustomHumanModelDemo和CustomPigModelDemo。其中
修改玩家模型的demo为CustomHumanModelDemo
- 修改玩家模型
修改原版猪生物模型的demo为CustomPigModelClientMod
由于修改猪为存客户端逻辑因此不需要Spigot插件即可
- 50%几率生成黄皮肤猪(修改原生生物模型)
## 修改玩家模型流程
- 自定义模型以及json详细参数详见
[自定义生物](../../../20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.md)
- 具体生效逻辑为:
![示例1](../res/SpigotCustomModel/customModel2.png)
- 最终效果图如下:
![示例2](../res/spigotPlugin/plugin14.png)
## 修改原生猪模型流程
- 具体生效逻辑为:
- 初始化molang变量
- 当生成生物时根据生物entityid创建molang变量最终赋值
![示例3](../res/SpigotCustomModel/customModel3.png)
- 赋值后由于自定义猪的render_controller中根据猪molang值判断若符合条件则为变色猪
- 最终效果如下:
![示例1](../res/SpigotCustomModel/customModel1.png)