更新3.4API
This commit is contained in:
@@ -1508,7 +1508,7 @@ method in mod.server.component.entityDefinitionsCompServer.EntityDefinitionsComp
|
||||
| bool | 是否为自然生成的,调用失败返回None |
|
||||
|
||||
- 备注
|
||||
- 一些自然生成的生物拥有持久性(例如末影龙、随大型结构生成的生物),则IsNaturallySpawned会返回False,详见<a href="https://minecraft.fandom.com/zh/wiki/%E7%94%9F%E6%88%90#%E5%9F%BA%E5%B2%A9%E7%89%88_2">基岩版持久性生物介绍</a>
|
||||
- 一些自然生成的生物拥有持久性(例如末影龙、随大型结构生成的生物),则IsNaturallySpawned会返回False,详见<a href="https://zh.minecraft.wiki/w/%E7%94%9F%E6%88%90#%E5%9F%BA%E5%B2%A9%E7%89%88_2">基岩版持久性生物介绍</a>
|
||||
|
||||
- 示例
|
||||
|
||||
@@ -2452,7 +2452,7 @@ method in mod.server.component.attrCompServer.AttrCompServer
|
||||
|
||||
- 描述
|
||||
|
||||
设置实体不会因为离玩家太远而被[清除](https://minecraft.fandom.com/zh/wiki/%E7%94%9F%E6%88%90#.E5.9F.BA.E5.B2.A9.E7.89.88_2)
|
||||
设置实体不会因为离玩家太远而被[清除](https://zh.minecraft.wiki/w/%E7%94%9F%E6%88%90#%E6%B8%85%E9%99%A4)
|
||||
|
||||
- 参数
|
||||
|
||||
@@ -2532,7 +2532,7 @@ method in mod.server.component.posCompServer.PosComponentServer
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(int,int,int) | xyz值 |
|
||||
| pos | tuple(float,float,float) | xyz值 |
|
||||
|
||||
- 返回值
|
||||
|
||||
@@ -2735,7 +2735,7 @@ method in mod.server.component.collisionBoxCompServer.CollisionBoxComponentServe
|
||||
|
||||
- 描述
|
||||
|
||||
设置实体的包围盒
|
||||
设置实体的包围盒。设置过大会导致游戏卡顿。实体的scale的立方乘以包围盒的体积不可超过32768
|
||||
|
||||
- 参数
|
||||
|
||||
|
||||
@@ -474,6 +474,7 @@ method in mod.client.component.actorRenderCompClient.ActorRenderCompClient
|
||||
| bool | 是否成功 |
|
||||
|
||||
- 备注
|
||||
- 调用该接口后需要调用[RebuildRenderForOneActor](#rebuildrenderforoneactor)才会生效
|
||||
- 某些动画资源可能用到了molang表达式,在添加动画时请务必确保这些molang表达式也存在。
|
||||
|
||||
- 示例
|
||||
@@ -658,6 +659,9 @@ method in mod.client.component.actorRenderCompClient.ActorRenderCompClient
|
||||
| :--- | :--- |
|
||||
| bool | 是否成功 |
|
||||
|
||||
- 备注
|
||||
- 调用该接口后需要调用[RebuildRenderForOneActor](#rebuildrenderforoneactor)才会生效
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
@@ -1104,6 +1108,7 @@ method in mod.client.component.actorRenderCompClient.ActorRenderCompClient
|
||||
| :--- | :--- | :--- |
|
||||
| entityId | str | 实体Id |
|
||||
| paramTypeStr | str | 渲染参数类型,可选类型有"textures","geometry","materials","animations","render_controllers","particle_effects","sound_effects" |
|
||||
| getValue | bool | 是否获取详细值,默认为False。该参数对render_controllers无效 |
|
||||
|
||||
- 返回值
|
||||
|
||||
@@ -1111,6 +1116,9 @@ method in mod.client.component.actorRenderCompClient.ActorRenderCompClient
|
||||
| :--- | :--- |
|
||||
| list(str) | 参数列表,如获取失败则返回None |
|
||||
|
||||
- 备注
|
||||
- 无法用于获取Player的ColorTexture
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
|
||||
@@ -119,7 +119,7 @@ sidebarDepth: 1
|
||||
| [SetMobStrengthMax](属性.md#setmobstrengthmax) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物强度的最大值,截止至网易2.9版本,只对羊驼有效,强度越大羊驼驮运的箱子时格子数量越多,[SetMobStrength](属性.md#setmobstrength)无法超过SetMobStrengthMax的值。由于引擎限制,在羊驼被打时候会reload组件,strengthMax会恢复成llama.json中的配置值(minecraft:strength) |
|
||||
| [SetName](属性.md#setname) | <span style="display:inline;color:#ff5555">服务端</span> | 用于设置生物的自定义名称,跟原版命名牌作用相同,玩家和新版流浪商人暂不支持 |
|
||||
| [SetOutOfControl](属性.md#setoutofcontrol) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体是否处于失控状态,截止至网易2.9版本,只对船有效 |
|
||||
| [SetPersistent](属性.md#setpersistent) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体不会因为离玩家太远而被[清除](https://minecraft.fandom.com/zh/wiki/%E7%94%9F%E6%88%90#.E5.9F.BA.E5.B2.A9.E7.89.88_2) |
|
||||
| [SetPersistent](属性.md#setpersistent) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体不会因为离玩家太远而被[清除](https://zh.minecraft.wiki/w/%E7%94%9F%E6%88%90#%E6%B8%85%E9%99%A4) |
|
||||
| [SetPlayerLookAtPos](属性.md#setplayerlookatpos) | <span style="display:inline;color:#7575f9">客户端</span> | 设置本地玩家看向某个位置 |
|
||||
| [SetPos](属性.md#setpos) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体位置 |
|
||||
| [SetRecoverTotalAirSupplyTime](属性.md#setrecovertotalairsupplytime) | <span style="display:inline;color:#ff5555">服务端</span> | 设置恢复最大氧气量的时间,单位秒 |
|
||||
@@ -127,7 +127,7 @@ sidebarDepth: 1
|
||||
| [SetRot](属性.md#setrot) | <span style="display:inline;color:#7575f9">客户端</span> | 设置实体头与水平方向的俯仰角度和竖直方向的旋转角度 <a href="../../../../mcguide/20-玩法开发/10-基本概念/10-Vector3.html">MC坐标系说明</a> |
|
||||
| [SetSheared](属性.md#setsheared) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体是否被剃毛,截止至网易2.9版本,只对羊有效 |
|
||||
| [SetSitting](属性.md#setsitting) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物是否坐下 |
|
||||
| [SetSize](属性.md#setsize) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体的包围盒 |
|
||||
| [SetSize](属性.md#setsize) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体的包围盒。设置过大会导致游戏卡顿。实体的scale的立方乘以包围盒的体积不可超过32768 |
|
||||
| [SetTradeLevel](属性.md#settradelevel) | <span style="display:inline;color:#ff5555">服务端</span> | 设置村民的交易等级 |
|
||||
| [SetVariant](属性.md#setvariant) | <span style="display:inline;color:#ff5555">服务端</span> | 设置实体的变种属性值 |
|
||||
| [isEntityInLava](属性.md#isentityinlava) | <span style="display:inline;color:#7575f9">客户端</span> | 实体是否在岩浆中 |
|
||||
@@ -188,7 +188,7 @@ sidebarDepth: 1
|
||||
| [SetEntityShareablesItems](行为.md#setentityshareablesitems) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物可分享/可拾取的物品列表 |
|
||||
| [SetEntityTamed](行为.md#setentitytamed) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物驯服,需要配合 entityEvent组件使用。该类驯服不包含骑乘功能。 |
|
||||
| [SetJumpPower](行为.md#setjumppower) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物跳跃力度,0.42表示正常水平 |
|
||||
| [SetLeashHolder](行为.md#setleashholder) | <span style="display:inline;color:#ff5555">服务端</span> | 为实体添加牵引者,与原版拴绳的作用相同,详见<a href="https://minecraft.fandom.com/zh/wiki/%E6%8B%B4%E7%BB%B3#%E6%8B%B4%E8%B5%B7%E7%94%9F%E7%89%A9">基岩版栓绳介绍</a> |
|
||||
| [SetLeashHolder](行为.md#setleashholder) | <span style="display:inline;color:#ff5555">服务端</span> | 为实体添加牵引者,与原版拴绳的作用相同,详见<a href="https://zh.minecraft.wiki/w/%E6%8B%B4%E7%BB%B3">基岩版栓绳介绍</a> |
|
||||
| [SetLootDropped](行为.md#setlootdropped) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物是否生成掉落物 |
|
||||
| [SetMobKnockback](行为.md#setmobknockback) | <span style="display:inline;color:#ff5555">服务端</span> | 设置击退的初始速度,需要考虑阻力的影响 |
|
||||
| [SetMotion](行为.md#setmotion) | <span style="display:inline;color:#ff5555">服务端</span> | 设置生物(不含玩家)的瞬时移动方向向量 |
|
||||
|
||||
@@ -1951,7 +1951,7 @@ method in mod.server.component.entityDefinitionsCompServer.EntityDefinitionsComp
|
||||
|
||||
- 描述
|
||||
|
||||
为实体添加牵引者,与原版拴绳的作用相同,详见<a href="https://minecraft.fandom.com/zh/wiki/%E6%8B%B4%E7%BB%B3#%E6%8B%B4%E8%B5%B7%E7%94%9F%E7%89%A9">基岩版栓绳介绍</a>
|
||||
为实体添加牵引者,与原版拴绳的作用相同,详见<a href="https://zh.minecraft.wiki/w/%E6%8B%B4%E7%BB%B3">基岩版栓绳介绍</a>
|
||||
|
||||
- 参数
|
||||
|
||||
|
||||
Reference in New Issue
Block a user