Some checks failed
Deploy VitePress to AliYun OSS / build-and-deploy (push) Has been cancelled
192 lines
12 KiB
Markdown
192 lines
12 KiB
Markdown
# 3.7
|
||
|
||
2025.12.31:版本号(V3.7 BE1.21.50)包括Mod PC包,手机测试版启动器,和服务器引擎。
|
||
|
||
示例Demo:<a href="../../../mcguide/20-玩法开发/13-模组SDK编程/60-Demo示例.html" rel="noopenner">前往此处下载</a>
|
||
|
||
## 一、更新时间表
|
||
|
||
1. 在2025年12月31日上线3.7第一个Beta版。
|
||
2. 在2026年1月14日上线3.7第二个Beta版。
|
||
3. 在2026年1月28日上线3.7稳定版。有以下注意事项:
|
||
- 3.7稳定包,会提供RenderDragon渲染龙、Opengl两个包体
|
||
- 渲染龙版本仅会在Java经典版中的基岩版(非基岩互通版和手机版)上线,基岩互通版和手机端仍然使用 OpenGL
|
||
- 为了确保您的模组、光影等内容后续能够兼容基岩版,您可以通过3.7稳定版渲染龙包进行测试兼容开发
|
||
4. 在2026年2月1日,全渠道将更新3.7版本玩家包体,玩家将陆续更新到3.7版本,请开发者合理安排更新节奏。
|
||
|
||
## 二、重要功能更新
|
||
|
||
1. **物理系统**
|
||
|
||
> 注意:物理系列的接口为实验性内容,在后期版本中可能会存在接口变更、开发环境变更等情况。请各位开发者合理安排开发内容与正式版本,避免后续版本物理系统更新后出现模组失效的情况
|
||
|
||
- 新增创建物理刚体,开发者可以给实体创建自定义刚体,并给刚体添加力、碰撞盒,设置其位置、四元数旋转等,同时新增支持刚体碰撞盒之间碰撞检测、以及适用于刚体的射线检测
|
||
- 物理系统相关教程请见[物理的使用指南](../../../mcguide/20-玩法开发/13-模组SDK编程/60-Demo示例.md)
|
||
|
||
2. **PC按键绑定**
|
||
|
||
- 新增自定义手柄按键(GamepadKeyMappings)的注册和获取,同时新增事件支持在按下自定义手柄按键时、自定义手柄按键绑定发生改变时触发
|
||
- 新增自定义按键映射(CustomKeyMapping)的注册和获取,同时新增事件支持在玩家按下自定义按键时、自定义按键绑定发生改变时触发
|
||
|
||
3. **客户端实体**
|
||
|
||
- 对 CreateClientEntityByTypeStr 创建的客户端实体,接口创建的客户端实体进行了优化,对实体使用的一系列渲染、模型、材质、动画等接口,也支持对客户端实体使用
|
||
- 新增[GetEntitiesAroundForClientEntity](../接口/实体/属性.md#getentitiesaroundforcliententity)(客户端)
|
||
- 新增[GetEntitiesInSquareAreaForClientEntity](../接口/实体/属性.md#getentitiesinsquareareaforcliententity)(客户端)接口,用于获取区域内的客户端实体
|
||
- 新增[SetRotForClientEntity](../接口/实体/属性.md#setrotforcliententity)(客户端),设置客户端实体头与水平方向的俯仰角度和竖直方向的旋转角度
|
||
- 新增[SetPosForClientEntity](../接口/实体/属性.md#setposforcliententity)(客户端),设置客户端实体位置
|
||
|
||
4. **新增其他接口**
|
||
|
||
- 新增[EntityUseItemToPos](../接口/世界/行为.md#entityuseitemtopos)(服务端),模拟实体对某个坐标使用指定物品
|
||
- 新增[UseItemToEntity](../接口/世界/行为.md#useitemtoentity)(服务端),模拟对某个实体使用物品
|
||
- 新增[GetRecipeByRecipeId](../接口/世界/方块管理.md#getrecipebyrecipeid)(客户端),可以根据配方id查询配方内容
|
||
|
||
5. **接口优化**
|
||
|
||
- [AddEffectToEntity](../接口/实体/状态效果.md#addeffecttoentity)(服务端)接口持续时间支持设置浮点型
|
||
- [UseItemAttackEntity](../接口/世界/行为.md#useitemattackentity)(服务端)接口增加damageFormula参数,可传入计算公式来修改伤害值
|
||
- 调整[ItemPushInCustomContainerServerEvent](../事件/方块.md#itempushincustomcontainerserverevent)(服务端)、[ItemPullOutCustomContainerServerEvent](../事件/方块.md#itempulloutcustomcontainerserverevent)(服务端),增加容器方块所在维度的参数
|
||
|
||
::: warning 特别注意
|
||
**3.7同步微软版本后变更内容较多,以下为官方整理的重要变更,请开发者们注意适配。**
|
||
:::
|
||
|
||
- 微软在1.21.50继续修改了部分方块ID,如光源方块、虫蚀类方块等,详见[3.7版本物品id变更](../../../mcguide/20-玩法开发/13-模组SDK编程/Python脚本开发/103-3.7版本物品id变更.md),请开发者注意适配
|
||
- 3.7 版本同步微软后,将会移除假日创作者实验。使用实验性功能的内容可能无法正常运行。开发者可以使用网易组件+Mod API,可以复刻大部分内容
|
||
- **极限模式说明**:以下接口不能在极限模式使用,同样原版指令也将不会生效,请开发者注意使用场景
|
||
- `SetPlayerGameType` 设置玩家游戏模式
|
||
- `SetGameRulesInfoServer` 设置游戏规则
|
||
- `SetGameDifficulty` 设置游戏难度
|
||
- `SetDefaultGameType` 设置默认游戏模式
|
||
- **原版UI变更**:原版界面Json路径有所修改,如果开发者修改原版Json界面,则需要重新调整路径。以下文件具有变更,请开发者注意适配
|
||
- ui_common.json
|
||
- play_screen.json
|
||
- gameplay_common.json
|
||
- start_screen.json
|
||
- pause_screen.json
|
||
- settings_screen.json
|
||
- hud_screen.json
|
||
- inventory_screen.json
|
||
- inventory_screen_pocket.json
|
||
- general_section.json
|
||
- world_section.json
|
||
- controls_section.json
|
||
- command_block_screen.json
|
||
|
||
## 三、API更新
|
||
|
||
- 新增
|
||
|
||
1. 新增[EntityUseItemToPos](../接口/世界/行为.md#entityuseitemtopos)(服务端),模拟实体对某个坐标使用指定物品。
|
||
|
||
1. 新增[UseItemToEntity](../接口/世界/行为.md#useitemtoentity)(服务端),模拟对某个实体使用物品。
|
||
|
||
1. 新增[CreatePxActor](../接口/物理.md#createpxactor)(服务端),给实体创建自定义刚体
|
||
|
||
1. 新增[AddBoxGeometry](../接口/物理.md#addboxgeometry)(服务端),给自定义刚体创建盒形碰撞体
|
||
|
||
1. 新增[SetRigidBodyFlag](../接口/物理.md#setrigidbodyflag)(服务端),设置自定义刚体的行为
|
||
|
||
1. 新增[SetRigidDynamicLockFlags](../接口/物理.md#setrigiddynamiclockflags)(服务端),设置自定义刚体的约束
|
||
|
||
1. 新增[SetActorFlag](../接口/物理.md#setactorflag)(服务端),设置物理实体的行为开关
|
||
|
||
1. 新增[SetKinematicTarget](../接口/物理.md#setkinematictarget)(服务端),设置运动学刚体的目标变换
|
||
|
||
1. 新增[SetGlobalPose](../接口/物理.md#setglobalpose)(服务端),设置自定义刚体的变换(直接瞬移)
|
||
|
||
1. 新增[AddForce](../接口/物理.md#addforce)(服务端),给自定义刚体添加力
|
||
|
||
1. 新增[GetQuaternion](../接口/物理.md#getquaternion)(服务端),获取自定义刚体的四元数旋转
|
||
|
||
1. 新增[Raycast](../接口/物理.md#raycast)(服务端),射线检测
|
||
|
||
1. 新增[GetRecipeByRecipeId](../接口/世界/方块管理.md#getrecipebyrecipeid)(服务端),根据配方id查询配方内容。
|
||
|
||
1. 新增[GetEntitiesAroundForClientEntity](../接口/实体/属性.md#getentitiesaroundforcliententity)(客户端),获取区域内的客户端实体列表
|
||
|
||
1. 新增[GetEntitiesInSquareAreaForClientEntity](../接口/实体/属性.md#getentitiesinsquareareaforcliententity)(客户端),获取区域内的客户端实体列表
|
||
|
||
1. 新增[GetQuaternion](../接口/物理.md#getquaternion)(客户端),获取自定义刚体的四元数旋转
|
||
|
||
1. 新增[Raycast](../接口/物理.md#raycast)(客户端),射线检测
|
||
|
||
1. 新增[GetKeyMappings](../接口/游戏设置.md#getkeymappings)(客户端),获取指定的自定义按键映射配置
|
||
|
||
1. 新增[RegisterCustomKeyMapping](../接口/游戏设置.md#registercustomkeymapping)(客户端),注册自定义按键映射
|
||
|
||
1. 新增[GetGamepadKeyMappings](../接口/游戏设置.md#getgamepadkeymappings)(客户端),获取自定义手柄按键映射
|
||
|
||
1. 新增[RegisterCustomGamepadMapping](../接口/游戏设置.md#registercustomgamepadmapping)(客户端),注册自定义手柄按键映射
|
||
|
||
1. 新增[SetPosForClientEntity](../接口/实体/属性.md#setposforcliententity)(客户端),设置客户端实体位置。
|
||
|
||
1. 新增[GetRecipeByRecipeId](../接口/世界/方块管理.md#getrecipebyrecipeid)(客户端),根据配方id查询配方内容。
|
||
|
||
1. 新增[SetRotForClientEntity](../接口/实体/属性.md#setrotforcliententity)(客户端),设置客户端实体头与水平方向的俯仰角度和竖直方向的旋转角度。
|
||
|
||
1. 新增[PhysxTouchServerEvent](../事件/物理.md#physxtouchserverevent)(服务端),给自定义刚体添加的碰撞体,与其他碰撞体或原版生物发生碰撞/结束碰撞时触发
|
||
|
||
1. 新增[OnCustomKeyPressInGame](../事件/游戏设置.md#oncustomkeypressingame)(客户端),当玩家按下自定义按键时触发
|
||
|
||
1. 新增[OnCustomKeyChangedEvent](../事件/游戏设置.md#oncustomkeychangedevent)(客户端),当自定义按键绑定发生改变时触发
|
||
|
||
1. 新增[OnCustomGamepadPressInGame](../事件/游戏设置.md#oncustomgamepadpressingame)(客户端),当玩家按下自定义手柄按键时触发
|
||
|
||
1. 新增[OnCustomGamepadChangedEvent](../事件/游戏设置.md#oncustomgamepadchangedevent)(客户端),当自定义手柄按键绑定发生改变时触发
|
||
|
||
1. 新增[PhysxTouchClientEvent](../事件/物理.md#physxtouchclientevent)(客户端),给自定义刚体添加的碰撞体,与其他碰撞体或原版生物发生碰撞/结束碰撞时触发
|
||
|
||
1. 新增[ActorDamageCause](../枚举值/ActorDamageCause.md),新增MaceSmash类型
|
||
|
||
1. 新增[BiomeType](../枚举值/BiomeType.md),新增pale_garden(苍白花园)类型
|
||
|
||
1. 新增[EntityType](../枚举值/EntityType.md),新增Creaking(嘎枝)类型
|
||
|
||
1. 新增[OpenContainerId](../枚举值/OpenContainerId.md),新增DynamicContainer类型
|
||
|
||
1. 新增[PxActorFlag](../枚举值/PxActorFlag.md),物理实体行为枚举
|
||
|
||
1. 新增[PxEventMask](../枚举值/PxEventMask.md),碰撞事件枚举
|
||
|
||
1. 新增[PxForceMode](../枚举值/PxForceMode.md),添加力的模式
|
||
|
||
1. 新增[PxRigidBodyFlag](../枚举值/PxRigidBodyFlag.md),自定义刚体行为枚举
|
||
|
||
1. 新增[PxRigidDynamicLockFlag](../枚举值/PxRigidDynamicLockFlag.md),自定义刚体约束枚举
|
||
|
||
1. 新增[RenderLayer](../枚举值/RenderLayer.md),补充原版发光方块渲染时的材质类型
|
||
|
||
- 调整
|
||
|
||
1. 调整[AddEffectToEntity](../接口/实体/状态效果.md#addeffecttoentity)(服务端),持续时间支持浮点型
|
||
|
||
1. 调整[CanSee](../接口/实体/属性.md#cansee)(服务端),增加angleX、angleY的描述
|
||
|
||
1. 调整[SetGameDifficulty](../接口/世界/行为.md#setgamedifficulty)(服务端),极限模式不可修改游戏难度
|
||
|
||
1. 调整[SetDefaultGameType](../接口/世界/行为.md#setdefaultgametype)(服务端),极限模式不可修改默认游戏模式
|
||
|
||
1. 调整[SetGameRulesInfoServer](../接口/世界/游戏规则.md#setgamerulesinfoserver)(服务端),极限模式不可修改cheat_info部分的游戏规则
|
||
|
||
1. 调整[UseItemAttackEntity](../接口/世界/行为.md#useitemattackentity)(服务端),增加damageFormula参数,可传入计算公式来修改伤害值。
|
||
|
||
1. 调整[SetPlayerGameType](../接口/玩家/游戏模式.md#setplayergametype)(服务端),极限模式不可修改玩家个人游戏模式
|
||
|
||
1. 调整GetNotRenderAtAll(客户端),新增支持CreateClientEntityByTypeStr创建的客户端实体。
|
||
|
||
1. 调整SetNotRenderAtAll(客户端),新增支持CreateClientEntityByTypeStr创建的客户端实体。
|
||
|
||
1. 调整ResetActorRender(客户端),新增支持CreateClientEntityByTypeStr创建的客户端实体。
|
||
|
||
1. 调整多个客户端渲染、模型、材质、动画相关接口,新增支持CreateClientEntityByTypeStr创建的客户端实体。详见官方文档。
|
||
|
||
1. 调整[ItemPushInCustomContainerServerEvent](../事件/方块.md#itempushincustomcontainerserverevent)(服务端),增加容器方块所在维度的参数
|
||
|
||
1. 调整[ItemPullOutCustomContainerServerEvent](../事件/方块.md#itempulloutcustomcontainerserverevent)(服务端),增加容器方块所在维度的参数
|
||
|
||
- 废弃(将在未来不可用)
|
||
|
||
1. 废弃OpenVoiceGui,语言转文字功能已移除
|