255 lines
35 KiB
Markdown
255 lines
35 KiB
Markdown
---
|
||
sidebarDepth: 1
|
||
---
|
||
# 索引
|
||
|
||
包括玩家属性与行为的接口,玩家的获取见[世界/实体管理](../世界/索引.md#实体管理)。玩家也属于实体,因此[实体](../实体/索引.md)分类下的接口同样适用于玩家
|
||
|
||
---
|
||
|
||
- [属性](#属性)
|
||
- [行为](#行为)
|
||
- [渲染](#渲染)
|
||
- [背包](#背包)
|
||
- [摄像机](#摄像机)
|
||
- [动画](#动画)
|
||
- [游戏模式](#游戏模式)
|
||
- [权限](#权限)
|
||
- [导航](#导航)
|
||
|
||
### 属性
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [AddPlayerExperience](属性.md#addplayerexperience) | <span style="display:inline;color:#ff5555">服务端</span> | 增加玩家经验值 |
|
||
| [AddPlayerLevel](属性.md#addplayerlevel) | <span style="display:inline;color:#ff5555">服务端</span> | 修改玩家等级 |
|
||
| [CollectOnlineClientData](属性.md#collectonlineclientdata) | <span style="display:inline;color:#ff5555">服务端</span> | 收集在线玩家客户端数据,用于判断玩家是否作弊 |
|
||
| [GetArmorValue](属性.md#getarmorvalue) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家护甲值 |
|
||
| [GetEnchantmentSeed](属性.md#getenchantmentseed) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家的附魔种子,该种子会决定附魔台上准备附魔的装备的附魔项 |
|
||
| [GetPlayerCurLevelExp](属性.md#getplayercurlevelexp) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家当前等级需要的经验值 |
|
||
| [GetPlayerExp](属性.md#getplayerexp) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家当前等级下的经验值 |
|
||
| [GetPlayerExp](属性.md#getplayerexp) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家当前等级下的经验值 |
|
||
| [GetPlayerHealthLevel](属性.md#getplayerhealthlevel) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家健康临界值,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效。原版默认值为18 |
|
||
| [GetPlayerHealthTick](属性.md#getplayerhealthtick) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家自然恢复速度,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效。原版默认值为80刻(即每4秒)恢复1点血量 |
|
||
| [GetPlayerHunger](属性.md#getplayerhunger) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。<br>1)增加方法:吃食物。<br>2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。 |
|
||
| [GetPlayerHunger](属性.md#getplayerhunger) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家饥饿度,展示在UI饥饿度进度条上,初始值为20,即每一个鸡腿代表2个饥饿度。 **饱和度(saturation)** :玩家当前饱和度,初始值为5,最大值始终为玩家当前饥饿度(hunger),该值直接影响玩家**饥饿度(hunger)**。<br>1)增加方法:吃食物。<br>2)减少方法:每触发一次**消耗事件**,该值减少1,如果该值不大于0,直接把玩家 **饥饿度(hunger)** 减少1。 |
|
||
| [GetPlayerLevel](属性.md#getplayerlevel) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家等级 |
|
||
| [GetPlayerMaxExhaustionValue](属性.md#getplayermaxexhaustionvalue) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家foodExhaustionLevel的归零值,常量值,默认为4。**消耗度(exhaustion)**是指玩家当前消耗度水平,初始值为0,该值会随着玩家一系列动作(如跳跃)的影响而增加,当该值大于最大消耗度(maxExhaustion)后归零,并且把饱和度(saturation)减少1(为了说明饥饿度机制,我们将此定义为**消耗事件**) |
|
||
| [GetPlayerStarveLevel](属性.md#getplayerstarvelevel) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家饥饿临界值,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效。原版默认值为1 |
|
||
| [GetPlayerStarveTick](属性.md#getplayerstarvetick) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家饥饿掉血速度,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效。原版默认值为80刻(即每4秒)扣除1点血量 |
|
||
| [GetPlayerTotalExp](属性.md#getplayertotalexp) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家的总经验值 |
|
||
| [GetPlayerTotalExp](属性.md#getplayertotalexp) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家的总经验值 |
|
||
| [IsPlayerNaturalRegen](属性.md#isplayernaturalregen) | <span style="display:inline;color:#ff5555">服务端</span> | 是否开启玩家自然恢复,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效。原版默认开启 |
|
||
| [IsPlayerNaturalStarve](属性.md#isplayernaturalstarve) | <span style="display:inline;color:#ff5555">服务端</span> | 是否开启玩家饥饿掉血,当饥饿值小于饥饿临界值时会自动恢复血量,开启饥饿值且开启饥饿掉血时有效。原版默认开启 |
|
||
| [SetEnchantmentSeed](属性.md#setenchantmentseed) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家的附魔种子,该种子会决定附魔台上准备附魔的装备的附魔项 |
|
||
| [SetPlayerHealthLevel](属性.md#setplayerhealthlevel) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家健康临界值,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效.原版默认值为18 |
|
||
| [SetPlayerHealthTick](属性.md#setplayerhealthtick) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家自然恢复速度,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效.原版默认值为80刻(即每4秒)恢复1点血量 |
|
||
| [SetPlayerHunger](属性.md#setplayerhunger) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家饥饿度。 |
|
||
| [SetPlayerMaxExhaustionValue](属性.md#setplayermaxexhaustionvalue) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家**最大消耗度(maxExhaustion)**,通过调整 **最大消耗度(maxExhaustion)** 的大小,就可以调整 **饥饿度(hunger)** 的消耗速度,当 **最大消耗度(maxExhaustion)** 很大时,饥饿度可以看似一直不下降 |
|
||
| [SetPlayerNaturalRegen](属性.md#setplayernaturalregen) | <span style="display:inline;color:#ff5555">服务端</span> | 设置是否开启玩家自然恢复,当饥饿值大于等于健康临界值时会自动恢复血量,开启饥饿值且开启自然恢复时有效.原版默认开启 |
|
||
| [SetPlayerNaturalStarve](属性.md#setplayernaturalstarve) | <span style="display:inline;color:#ff5555">服务端</span> | 设置是否开启玩家饥饿掉血,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效.原版默认开启 |
|
||
| [SetPlayerPrefixAndSuffixName](属性.md#setplayerprefixandsuffixname) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家前缀和后缀名字 |
|
||
| [SetPlayerStarveLevel](属性.md#setplayerstarvelevel) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家饥饿临界值,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效。原版默认值为1 |
|
||
| [SetPlayerStarveTick](属性.md#setplayerstarvetick) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家饥饿掉血速度,当饥饿值小于饥饿临界值时会自动扣除血量,开启饥饿值且开启饥饿掉血时有效.原版默认值为80刻(即每4秒)扣除1点血量 |
|
||
| [SetPlayerTotalExp](属性.md#setplayertotalexp) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家的总经验值 |
|
||
| [Swing](属性.md#swing) | <span style="display:inline;color:#7575f9">客户端</span> | 本地玩家播放原版攻击动作 |
|
||
| [getUid](属性.md#getuid) | <span style="display:inline;color:#7575f9">客户端</span> | 获取本地玩家的uid |
|
||
|
||
### 行为
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [AddPlayerAroundEntityMotion](行为.md#addplayeraroundentitymotion) | <span style="display:inline;color:#ff5555">服务端</span> | 给玩家添加对实体环绕运动器 |
|
||
| [AddPlayerAroundPointMotion](行为.md#addplayeraroundpointmotion) | <span style="display:inline;color:#ff5555">服务端</span> | 给玩家添加对点环绕运动器 |
|
||
| [AddPlayerTrackMotion](行为.md#addplayertrackmotion) | <span style="display:inline;color:#ff5555">服务端</span> | 给玩家添加轨迹运动器 |
|
||
| [AddPlayerVelocityMotion](行为.md#addplayervelocitymotion) | <span style="display:inline;color:#ff5555">服务端</span> | 给玩家添加速度运动器 |
|
||
| [BeginSprinting](行为.md#beginsprinting) | <span style="display:inline;color:#7575f9">客户端</span> | 使本地玩家进入并保持向前疾跑/冲刺状态 |
|
||
| [ChangePlayerDimension](行为.md#changeplayerdimension) | <span style="display:inline;color:#ff5555">服务端</span> | 传送玩家 |
|
||
| [ChangePlayerFlyState](行为.md#changeplayerflystate) | <span style="display:inline;color:#ff5555">服务端</span> | 给予/取消飞行能力, 并根据enterFly参数确定是否进入飞行状态 |
|
||
| [EnableKeepInventory](行为.md#enablekeepinventory) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家死亡不掉落物品 |
|
||
| [EndSprinting](行为.md#endsprinting) | <span style="display:inline;color:#7575f9">客户端</span> | 使本地玩家结束向前疾跑/冲刺状态 |
|
||
| [GetEntityRider](行为.md#getentityrider) | <span style="display:inline;color:#ff5555">服务端</span> | 获取骑乘者正在骑乘的实体的id。 |
|
||
| [GetEntityRider](行为.md#getentityrider) | <span style="display:inline;color:#7575f9">客户端</span> | 获取骑乘者正在骑乘的实体的id。 |
|
||
| [GetInteracteCenterOffset](行为.md#getinteractecenteroffset) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家[服务端交互中心](../../../1-ModAPI/更新信息/2.8.md#玩家摄像机)的偏移 |
|
||
| [GetIsBlocking](行为.md#getisblocking) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家激活盾牌状态 |
|
||
| [GetPickCenterOffset](行为.md#getpickcenteroffset) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家设置的第三人称下客户端交互中心的偏移 |
|
||
| [GetPickRange](行为.md#getpickrange) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家客户端的交互距离 |
|
||
| [GetPlayerDestroyTotalTime](行为.md#getplayerdestroytotaltime) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家破坏方块需要的时间,受玩家状态(急迫、潮涌、挖掘疲劳)和手持物及手持物附魔(效率)影响 |
|
||
| [GetPlayerDestroyTotalTime](行为.md#getplayerdestroytotaltime) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家破坏方块需要的时间,受玩家状态(急迫、潮涌、挖掘疲劳)和手持物及手持物附魔(效率)影响 |
|
||
| [GetPlayerExhaustionRatioByType](行为.md#getplayerexhaustionratiobytype) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家某行为饥饿度消耗倍率 |
|
||
| [GetPlayerInteracteRange](行为.md#getplayerinteracterange) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家服务端的交互距离 |
|
||
| [GetPlayerMotions](行为.md#getplayermotions) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家身上的所有运动器 |
|
||
| [GetPlayerRespawnPos](行为.md#getplayerrespawnpos) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家复活点 |
|
||
| [GetRelevantPlayer](行为.md#getrelevantplayer) | <span style="display:inline;color:#ff5555">服务端</span> | 获取附近玩家id列表 |
|
||
| [IsEntityRiding](行为.md#isentityriding) | <span style="display:inline;color:#ff5555">服务端</span> | 检查玩家是否骑乘。 |
|
||
| [IsInScaffolding](行为.md#isinscaffolding) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家是否与脚手架有交叉 |
|
||
| [IsOnLadder](行为.md#isonladder) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家是否与梯子/藤蔓有交叉 |
|
||
| [IsPlayerCanFly](行为.md#isplayercanfly) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家能否飞行 |
|
||
| [IsPlayerFlying](行为.md#isplayerflying) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家是否在飞行 |
|
||
| [OpenWorkBench](行为.md#openworkbench) | <span style="display:inline;color:#ff5555">服务端</span> | 在玩家当前位置打开工作台UI,不依赖于工作台方块 |
|
||
| [PickUpItemEntity](行为.md#pickupitementity) | <span style="display:inline;color:#ff5555">服务端</span> | 某个Player拾取物品ItemEntity |
|
||
| [PlayerAttackEntity](行为.md#playerattackentity) | <span style="display:inline;color:#ff5555">服务端</span> | 玩家使用手持武器攻击某个生物 |
|
||
| [PlayerDestoryBlock](行为.md#playerdestoryblock) | <span style="display:inline;color:#ff5555">服务端</span> | 使用手上工具破坏方块 |
|
||
| [PlayerUseItemToEntity](行为.md#playeruseitemtoentity) | <span style="display:inline;color:#ff5555">服务端</span> | 玩家使用手上物品对某个生物使用 |
|
||
| [PlayerUseItemToPos](行为.md#playeruseitemtopos) | <span style="display:inline;color:#ff5555">服务端</span> | 模拟玩家对某个坐标使用物品 |
|
||
| [RemovePlayerMotion](行为.md#removeplayermotion) | <span style="display:inline;color:#ff5555">服务端</span> | 移除玩家身上的运动器 |
|
||
| [SetBanPlayerFishing](行为.md#setbanplayerfishing) | <span style="display:inline;color:#ff5555">服务端</span> | 设置是否屏蔽玩家钓鱼功能,屏蔽后玩家可以正常抛甩鱼竿,但无法钓起任何物品 |
|
||
| [SetInteracteCenterOffset](行为.md#setinteractecenteroffset) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家服务端交互中心的偏移 |
|
||
| [SetPickCenterOffset](行为.md#setpickcenteroffset) | <span style="display:inline;color:#7575f9">客户端</span> | 设置第三人称下,玩家客户端交互中心的偏移 |
|
||
| [SetPickRange](行为.md#setpickrange) | <span style="display:inline;color:#7575f9">客户端</span> | 设置玩家客户端的交互距离 |
|
||
| [SetPickUpArea](行为.md#setpickuparea) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家的拾取物品范围,设置后该玩家的拾取物品范围会在原版拾取范围的基础上进行改变。 |
|
||
| [SetPlayerAttackSpeedAmplifier](行为.md#setplayerattackspeedamplifier) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家攻击速度倍数,1.0表示正常水平,1.2表示速度减益20%,0.8表示速度增益20% |
|
||
| [SetPlayerExhaustionRatioByType](行为.md#setplayerexhaustionratiobytype) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家某行为饥饿度消耗倍率 |
|
||
| [SetPlayerInteracteRange](行为.md#setplayerinteracterange) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家服务端的交互距离 |
|
||
| [SetPlayerJumpable](行为.md#setplayerjumpable) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家是否可跳跃 |
|
||
| [SetPlayerMotion](行为.md#setplayermotion) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家的瞬时移动方向向量(可解决SetMotion闪现问题) |
|
||
| [SetPlayerMovable](行为.md#setplayermovable) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家是否可移动 |
|
||
| [SetPlayerRespawnPos](行为.md#setplayerrespawnpos) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家复活的位置与维度 |
|
||
| [StartPlayerMotion](行为.md#startplayermotion) | <span style="display:inline;color:#ff5555">服务端</span> | 启动玩家身上的某个运动器 |
|
||
| [StopPlayerMotion](行为.md#stopplayermotion) | <span style="display:inline;color:#ff5555">服务端</span> | 停止玩家身上的某个运动器 |
|
||
| [isGliding](行为.md#isgliding) | <span style="display:inline;color:#7575f9">客户端</span> | 是否鞘翅飞行 |
|
||
| [isInWater](行为.md#isinwater) | <span style="display:inline;color:#7575f9">客户端</span> | 是否在水中 |
|
||
| [isMoving](行为.md#ismoving) | <span style="display:inline;color:#7575f9">客户端</span> | 是否在行走 |
|
||
| [isRiding](行为.md#isriding) | <span style="display:inline;color:#7575f9">客户端</span> | 是否骑乘 |
|
||
| [isSneaking](行为.md#issneaking) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家是否处于潜行状态 |
|
||
| [isSneaking](行为.md#issneaking) | <span style="display:inline;color:#7575f9">客户端</span> | 是否潜行 |
|
||
| [isSprinting](行为.md#issprinting) | <span style="display:inline;color:#7575f9">客户端</span> | 是否在疾跑 |
|
||
| [isSwimming](行为.md#isswimming) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家是否处于游泳状态。 |
|
||
| [isSwimming](行为.md#isswimming) | <span style="display:inline;color:#7575f9">客户端</span> | 是否游泳 |
|
||
| [setMoving](行为.md#setmoving) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否行走,只能设置本地玩家(只适用于移动端) |
|
||
| [setSneaking](行为.md#setsneaking) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否潜行,只能设置本地玩家(只适用于移动端) |
|
||
| [setSprinting](行为.md#setsprinting) | <span style="display:inline;color:#7575f9">客户端</span> | 设置行走模式为疾跑/冲刺,只能设置本地玩家(只适用于移动端) |
|
||
| [setUsingShield](行为.md#setusingshield) | <span style="display:inline;color:#7575f9">客户端</span> | 激活盾牌状态 |
|
||
|
||
### 渲染
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [AddPlayerAnimation](渲染.md#addplayeranimation) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家渲染动画 |
|
||
| [AddPlayerAnimationController](渲染.md#addplayeranimationcontroller) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家渲染动画控制器 |
|
||
| [AddPlayerAnimationIntoState](渲染.md#addplayeranimationintostate) | <span style="display:inline;color:#7575f9">客户端</span> | 在玩家的动画控制器中的状态添加动画或者动画控制器 |
|
||
| [AddPlayerGeometry](渲染.md#addplayergeometry) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家渲染几何体 |
|
||
| [AddPlayerParticleEffect](渲染.md#addplayerparticleeffect) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家特效资源 |
|
||
| [AddPlayerRenderController](渲染.md#addplayerrendercontroller) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家<a href="../../../../mcguide/20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.html#_7-自定义渲染控制器">渲染控制器</a> |
|
||
| [AddPlayerRenderMaterial](渲染.md#addplayerrendermaterial) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家渲染需要的<a href="../../../../mcguide/20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.html#_3-自定义材质">材质</a> |
|
||
| [AddPlayerScriptAnimate](渲染.md#addplayerscriptanimate) | <span style="display:inline;color:#7575f9">客户端</span> | 在玩家的客户端实体定义(minecraft:client_entity)json中的scripts/animate节点添加动画/动画控制器 |
|
||
| [AddPlayerSoundEffect](渲染.md#addplayersoundeffect) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家音效资源 |
|
||
| [AddPlayerTexture](渲染.md#addplayertexture) | <span style="display:inline;color:#7575f9">客户端</span> | 增加玩家渲染贴图 |
|
||
| [RebuildPlayerRender](渲染.md#rebuildplayerrender) | <span style="display:inline;color:#7575f9">客户端</span> | 重建玩家的数据渲染器 |
|
||
| [RemovePlayerAnimationController](渲染.md#removeplayeranimationcontroller) | <span style="display:inline;color:#7575f9">客户端</span> | 移除玩家渲染动画控制器 |
|
||
| [RemovePlayerGeometry](渲染.md#removeplayergeometry) | <span style="display:inline;color:#7575f9">客户端</span> | 删除玩家渲染几何体 |
|
||
| [RemovePlayerRenderController](渲染.md#removeplayerrendercontroller) | <span style="display:inline;color:#7575f9">客户端</span> | 删除玩家<a href="../../../../mcguide/20-玩法开发/15-自定义游戏内容/3-自定义生物/01-自定义基础生物.html#_7-自定义渲染控制器">渲染控制器</a> |
|
||
| [ResetSkin](渲染.md#resetskin) | <span style="display:inline;color:#7575f9">客户端</span> | 还原默认皮肤 |
|
||
| [SetPlayerItemInHandVisible](渲染.md#setplayeriteminhandvisible) | <span style="display:inline;color:#7575f9">客户端</span> | 设置是否隐藏玩家的手持物品模型显示 |
|
||
| [SetSkin](渲染.md#setskin) | <span style="display:inline;color:#7575f9">客户端</span> | 更换原版自定义皮肤 |
|
||
|
||
### 背包
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [AddEnchantToInvItem](背包.md#addenchanttoinvitem) | <span style="display:inline;color:#ff5555">服务端</span> | 给物品栏的物品添加附魔信息 |
|
||
| [AddModEnchantToInvItem](背包.md#addmodenchanttoinvitem) | <span style="display:inline;color:#ff5555">服务端</span> | 给物品栏中物品添加自定义附魔信息 |
|
||
| [ChangePlayerItemTipsAndExtraId](背包.md#changeplayeritemtipsandextraid) | <span style="display:inline;color:#ff5555">服务端</span> | 修改玩家物品的自定义tips和自定义标识符 |
|
||
| [ChangeSelectSlot](背包.md#changeselectslot) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家当前选中快捷栏物品的index |
|
||
| [GetCarriedItem](背包.md#getcarrieditem) | <span style="display:inline;color:#7575f9">客户端</span> | 获取右手物品的信息 |
|
||
| [GetInvItemEnchantData](背包.md#getinvitemenchantdata) | <span style="display:inline;color:#ff5555">服务端</span> | 获取物品栏的物品附魔信息 |
|
||
| [GetInvItemModEnchantData](背包.md#getinvitemmodenchantdata) | <span style="display:inline;color:#ff5555">服务端</span> | 获取物品栏的物品自定义附魔信息 |
|
||
| [GetOffhandItem](背包.md#getoffhanditem) | <span style="display:inline;color:#7575f9">客户端</span> | 获取左手物品的信息 |
|
||
| [GetPlayerAllItems](背包.md#getplayerallitems) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家指定的槽位的批量物品信息 |
|
||
| [GetPlayerAllItems](背包.md#getplayerallitems) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家指定的槽位的批量物品信息,支持获取盔甲栏,副手以及主手物品,背包物品仅支持本地玩家 |
|
||
| [GetPlayerItem](背包.md#getplayeritem) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家物品,支持获取背包,盔甲栏,副手以及主手物品 |
|
||
| [GetPlayerItem](背包.md#getplayeritem) | <span style="display:inline;color:#7575f9">客户端</span> | 获取玩家物品,支持获取背包(本地玩家),盔甲栏,副手以及主手物品 |
|
||
| [GetSelectSlotId](背包.md#getselectslotid) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家当前选中槽位 |
|
||
| [GetSlotId](背包.md#getslotid) | <span style="display:inline;color:#7575f9">客户端</span> | 获取当前手持的快捷栏的槽id |
|
||
| [RemoveEnchantToInvItem](背包.md#removeenchanttoinvitem) | <span style="display:inline;color:#ff5555">服务端</span> | 给物品栏的物品移除附魔信息 |
|
||
| [RemoveModEnchantToInvItem](背包.md#removemodenchanttoinvitem) | <span style="display:inline;color:#ff5555">服务端</span> | 给物品栏中物品移除自定义附魔信息 |
|
||
| [SetInvItemExchange](背包.md#setinvitemexchange) | <span style="display:inline;color:#ff5555">服务端</span> | 交换玩家背包物品 |
|
||
| [SetInvItemNum](背包.md#setinvitemnum) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家背包物品数目 |
|
||
| [SetPlayerAllItems](背包.md#setplayerallitems) | <span style="display:inline;color:#ff5555">服务端</span> | 添加批量物品信息到指定槽位 |
|
||
| [SpawnItemToPlayerCarried](背包.md#spawnitemtoplayercarried) | <span style="display:inline;color:#ff5555">服务端</span> | 生成物品到玩家右手 |
|
||
| [SpawnItemToPlayerInv](背包.md#spawnitemtoplayerinv) | <span style="display:inline;color:#ff5555">服务端</span> | 生成物品到玩家背包 |
|
||
|
||
### 摄像机
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [AddCameraAroundEntityMotion](摄像机.md#addcameraaroundentitymotion) | <span style="display:inline;color:#7575f9">客户端</span> | 给相机添加对实体环绕运动器 |
|
||
| [AddCameraAroundPointMotion](摄像机.md#addcameraaroundpointmotion) | <span style="display:inline;color:#7575f9">客户端</span> | 给相机添加对点环绕运动器 |
|
||
| [AddCameraTrackMotion](摄像机.md#addcameratrackmotion) | <span style="display:inline;color:#7575f9">客户端</span> | 给相机添加轨迹运动器 |
|
||
| [AddCameraVelocityMotion](摄像机.md#addcameravelocitymotion) | <span style="display:inline;color:#7575f9">客户端</span> | 给相机添加速度运动器 |
|
||
| [DepartCamera](摄像机.md#departcamera) | <span style="display:inline;color:#7575f9">客户端</span> | 分离玩家与摄像机 |
|
||
| [GetCameraAnchor](摄像机.md#getcameraanchor) | <span style="display:inline;color:#7575f9">客户端</span> | 获取相机锚点 |
|
||
| [GetCameraMotions](摄像机.md#getcameramotions) | <span style="display:inline;color:#7575f9">客户端</span> | 获取相机上的所有运动器 |
|
||
| [GetCameraOffset](摄像机.md#getcameraoffset) | <span style="display:inline;color:#7575f9">客户端</span> | 获取摄像机偏移量 |
|
||
| [GetCameraPitchLimit](摄像机.md#getcamerapitchlimit) | <span style="display:inline;color:#7575f9">客户端</span> | 获取摄像机上下角度限制值 |
|
||
| [GetCameraRotation](摄像机.md#getcamerarotation) | <span style="display:inline;color:#7575f9">客户端</span> | 获取摄像机的朝向 |
|
||
| [GetForward](摄像机.md#getforward) | <span style="display:inline;color:#7575f9">客户端</span> | 返回相机向前的方向 |
|
||
| [GetFov](摄像机.md#getfov) | <span style="display:inline;color:#7575f9">客户端</span> | 获取视野大小 |
|
||
| [GetFpHeight](摄像机.md#getfpheight) | <span style="display:inline;color:#7575f9">客户端</span> | 获取本地玩家当前状态下,第一人称视角时的摄像机高度偏移量。游泳时,滑翔时以及普通状态下会有所不同 |
|
||
| [GetPerspective](摄像机.md#getperspective) | <span style="display:inline;color:#7575f9">客户端</span> | 获取当前的视角模式 |
|
||
| [GetPosition](摄像机.md#getposition) | <span style="display:inline;color:#7575f9">客户端</span> | 返回相机中心 |
|
||
| [IsModCameraLockPitch](摄像机.md#ismodcameralockpitch) | <span style="display:inline;color:#7575f9">客户端</span> | 是否锁定摄像机上下角度 |
|
||
| [IsModCameraLockYaw](摄像机.md#ismodcameralockyaw) | <span style="display:inline;color:#7575f9">客户端</span> | 是否锁定摄像机左右角度 |
|
||
| [LockCamera](摄像机.md#lockcamera) | <span style="display:inline;color:#7575f9">客户端</span> | 锁定摄像机 |
|
||
| [LockModCameraPitch](摄像机.md#lockmodcamerapitch) | <span style="display:inline;color:#7575f9">客户端</span> | 锁定摄像机上下角度(第三人称下生效,锁定后不能上下调整视角) |
|
||
| [LockModCameraYaw](摄像机.md#lockmodcamerayaw) | <span style="display:inline;color:#7575f9">客户端</span> | 锁定摄像机左右角度(第三人称下生效,锁定后不能通过鼠标左右调整视角) |
|
||
| [LockPerspective](摄像机.md#lockperspective) | <span style="display:inline;color:#7575f9">客户端</span> | 锁定玩家的视角模式 |
|
||
| [RemoveCameraMotion](摄像机.md#removecameramotion) | <span style="display:inline;color:#7575f9">客户端</span> | 移除相机上的某个运动器 |
|
||
| [ResetCameraBindActorId](摄像机.md#resetcamerabindactorid) | <span style="display:inline;color:#7575f9">客户端</span> | 将摄像机重新绑定回主角身上 |
|
||
| [SetCameraAnchor](摄像机.md#setcameraanchor) | <span style="display:inline;color:#7575f9">客户端</span> | 设置相机锚点 |
|
||
| [SetCameraBindActorId](摄像机.md#setcamerabindactorid) | <span style="display:inline;color:#7575f9">客户端</span> | 将摄像机绑定到目标实体身上(调用者与目标必须在同一个dimension,同时需要在加载范围之内,若绑定后目标离开了范围或者死亡,则会自动解除绑定) |
|
||
| [SetCameraDistanceFixed](摄像机.md#setcameradistancefixed) | <span style="display:inline;color:#7575f9">客户端</span> | 设置相机弹簧臂固定,即设置当相机遇到阻挡时是否压缩与人物之间的距离 |
|
||
| [SetCameraOffset](摄像机.md#setcameraoffset) | <span style="display:inline;color:#7575f9">客户端</span> | 设置摄像机偏移量 |
|
||
| [SetCameraPitchLimit](摄像机.md#setcamerapitchlimit) | <span style="display:inline;color:#7575f9">客户端</span> | 设置摄像机上下角度限制值,默认是(-90,90) |
|
||
| [SetCameraPos](摄像机.md#setcamerapos) | <span style="display:inline;color:#7575f9">客户端</span> | 设置相机中心的位置 |
|
||
| [SetCameraRotation](摄像机.md#setcamerarotation) | <span style="display:inline;color:#7575f9">客户端</span> | 设定摄像机的朝向 |
|
||
| [SetFov](摄像机.md#setfov) | <span style="display:inline;color:#7575f9">客户端</span> | 设置视野大小 |
|
||
| [SetPerspective](摄像机.md#setperspective) | <span style="display:inline;color:#7575f9">客户端</span> | 设置视角模式 |
|
||
| [SetPlayerFovScale](摄像机.md#setplayerfovscale) | <span style="display:inline;color:#7575f9">客户端</span> | 将渲染实际使用的fov变为设置中的fov乘以fovScale,fovScale越接近0,其效果越接近原版望远镜效果 |
|
||
| [SetSpeedFovLock](摄像机.md#setspeedfovlock) | <span style="display:inline;color:#7575f9">客户端</span> | 是否锁定相机视野fov,锁定后不随速度变化而变化 |
|
||
| [StartCameraMotion](摄像机.md#startcameramotion) | <span style="display:inline;color:#7575f9">客户端</span> | 启动相机上的某个运动器 |
|
||
| [StopCameraMotion](摄像机.md#stopcameramotion) | <span style="display:inline;color:#7575f9">客户端</span> | 停止相机上的某个运动器 |
|
||
| [UnDepartCamera](摄像机.md#undepartcamera) | <span style="display:inline;color:#7575f9">客户端</span> | 绑定玩家与摄像机 |
|
||
| [UnLockCamera](摄像机.md#unlockcamera) | <span style="display:inline;color:#7575f9">客户端</span> | 解除摄像机锁定 |
|
||
|
||
### 动画
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [PlayTpAnimation](动画.md#playtpanimation) | <span style="display:inline;color:#7575f9">客户端</span> | 第三人称视角播放玩家通用动作 |
|
||
| [StopAnimation](动画.md#stopanimation) | <span style="display:inline;color:#7575f9">客户端</span> | 停止播放玩家通用动作 |
|
||
|
||
### 游戏模式
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [GetPlayerGameType](游戏模式.md#getplayergametype) | <span style="display:inline;color:#ff5555">服务端</span> | 获取指定玩家的游戏模式 |
|
||
| [GetPlayerGameType](游戏模式.md#getplayergametype) | <span style="display:inline;color:#7575f9">客户端</span> | 获取指定玩家的游戏模式 |
|
||
| [SetPlayerGameType](游戏模式.md#setplayergametype) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家个人游戏模式 |
|
||
|
||
### 权限
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [GetPlayerAbilities](权限.md#getplayerabilities) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家具体权限 |
|
||
| [GetPlayerOperation](权限.md#getplayeroperation) | <span style="display:inline;color:#ff5555">服务端</span> | 获取玩家权限类型信息 |
|
||
| [SetAttackMobsAbility](权限.md#setattackmobsability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否攻击生物 |
|
||
| [SetAttackPlayersAbility](权限.md#setattackplayersability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否攻击其他玩家 |
|
||
| [SetBuildAbility](权限.md#setbuildability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否放置方块,该接口的设置会存档,且只影响生存模式 |
|
||
| [SetMineAbility](权限.md#setmineability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否摧毁方块,该接口的设置会存档,且只影响生存模式 |
|
||
| [SetOpenContainersAbility](权限.md#setopencontainersability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否打开容器 |
|
||
| [SetOperateDoorsAndSwitchesAbility](权限.md#setoperatedoorsandswitchesability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否与门和开关交互 |
|
||
| [SetOperatorCommandAbility](权限.md#setoperatorcommandability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家是否具有操作员命令权限 |
|
||
| [SetPermissionLevel](权限.md#setpermissionlevel) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家权限等级 |
|
||
| [SetPlayerMute](权限.md#setplayermute) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家是否禁言,该接口的设置不存档 |
|
||
| [SetTeleportAbility](权限.md#setteleportability) | <span style="display:inline;color:#ff5555">服务端</span> | 设置玩家能否使用TP指令 |
|
||
|
||
### 导航
|
||
|
||
| 接口 | <div style="width: 3em"></div> | 描述 |
|
||
| --- | --- | --- |
|
||
| [GetNavPath](导航.md#getnavpath) | <span style="display:inline;color:#7575f9">客户端</span> | 获取本地玩家到目标点的寻路路径,开发者可以通过该接口定制自定义的导航系统。 |
|
||
| [StartNavTo](导航.md#startnavto) | <span style="display:inline;color:#7575f9">客户端</span> | 我们提供了一个基于GetNavPath的导航系统实现,做法是在路径上生成序列帧以引导玩家通向目标点,并且当玩家偏离路径会重新进行导航。 |
|
||
| [StopNav](导航.md#stopnav) | <span style="display:inline;color:#7575f9">客户端</span> | 终止当前的导航 |
|
||
|