11891 lines
435 KiB
JSON
11891 lines
435 KiB
JSON
{
|
||
"server.serverEvent": [
|
||
{
|
||
"name": "PlayerInventoryOpenScriptServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "某个客户端打开物品背包界面时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "客户端对应的玩家entity的唯一ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否是创造模式背包界面",
|
||
"param_name": "isCreative",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增某个客户端打开物品背包界面的事件",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerSpawnMobEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "游戏内自动生成生物,以及使用api生成生物时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "生成实体的命名空间",
|
||
"param_name": "identifier",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "生成实体的类型,参考[EntityType](../枚举值/EntityType.md)",
|
||
"param_name": "type",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "生成怪物是否是幼年怪",
|
||
"param_name": "baby",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "生成实体坐标x",
|
||
"param_name": "x",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "生成实体坐标y",
|
||
"param_name": "y",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "生成实体坐标z",
|
||
"param_name": "z",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "生成实体的维度,默认值为0(0为主世界,1为地狱,2为末地)",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "生成实体的命名空间,通过MOD API生成的生物在这个参数也能获取到真正的命名空间,而不是以custom开头的",
|
||
"param_name": "realIdentifier",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消生成该实体",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增realIdentifier参数",
|
||
"operation": "调整",
|
||
"version": "1.25",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "新增entityId返回参数",
|
||
"operation": "调整",
|
||
"version": "2.4",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ProjectileDoHitEffectEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当抛射物碰撞时触发该事件",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "抛射物id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞目标类型,'ENTITY'或是'BLOCK'",
|
||
"param_name": "hitTargetType",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞目标id",
|
||
"param_name": "targetId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "撞击在方块上的面id,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "hitFace",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞x坐标",
|
||
"param_name": "x",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "碰撞y坐标",
|
||
"param_name": "y",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "碰撞z坐标",
|
||
"param_name": "z",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "碰撞是方块时,方块x坐标",
|
||
"param_name": "blockPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞是方块时,方块y坐标",
|
||
"param_name": "blockPosY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞是方块时,方块z坐标",
|
||
"param_name": "blockPosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "创建者id",
|
||
"param_name": "srcId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消这个碰撞事件,若取消可以设置为True",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerChatEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家发送聊天信息时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家名称",
|
||
"param_name": "username",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家发送的聊天消息内容",
|
||
"param_name": "message",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消这个聊天事件,若取消可以设置为True",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否把聊天消息发送给指定在线玩家,而不是广播给所有在线玩家,若只发送某些玩家可以设置为True",
|
||
"param_name": "bChatById",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否禁言,仅apollo可用。true:被禁言,玩家聊天会提示“你已被管理员禁言”。",
|
||
"param_name": "bForbid",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "接收聊天消息的玩家id列表,bChatById为True时生效",
|
||
"param_name": "toPlayerIds",
|
||
"param_type": "list(str)"
|
||
},
|
||
{
|
||
"param_comment": "设置当前玩家在网易聊天界面中的前缀,字数限制4,从字符串头部开始取。前缀文本输入非字符串格式时会被置为空。若cancel为True,会取消掉本次的前缀修改",
|
||
"param_name": "gameChatPrefix",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "设置当前玩家在网易聊天界面中前缀颜色rgb的r值,范围为[0,1]。颜色数值输入其他格式时会被置为0。若cancel为True,会取消掉本次的颜色修改",
|
||
"param_name": "gameChatPrefixColorR",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "设置当前玩家在网易聊天界面中前缀颜色rgb的g值,范围为[0,1]。颜色数值输入其他格式时会被置为0。若cancel为True,会取消掉本次的颜色修改",
|
||
"param_name": "gameChatPrefixColorG",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "设置当前玩家在网易聊天界面中前缀颜色rgb的b值,范围为[0,1]。颜色数值输入其他格式时会被置为0。若cancel为True,会取消掉本次的颜色修改",
|
||
"param_name": "gameChatPrefixColorB",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增网易聊天界面的前缀文本、前缀颜色相关参数",
|
||
"operation": "调整",
|
||
"version": "2.6",
|
||
"author": "wangjian18"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DamageEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体受到伤害时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "伤害源id",
|
||
"param_name": "srcId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "投射物id",
|
||
"param_name": "projectileId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被伤害id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害值(被伤害吸收前的值),允许修改,设置为0则此次造成的伤害为0",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "受到伤害时,扣除黄心前,实体拥有的黄心血量(见[AttrType枚举](../枚举值/AttrType.md)的ABSORPTION)",
|
||
"param_name": "absorption",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否击退被攻击者,允许修改,设置该值为False则不产生击退",
|
||
"param_name": "knock",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否点燃被伤害者,允许修改,设置该值为True产生点燃效果",
|
||
"param_name": "ignite",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增“伤害吸收生命值”参数",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
},
|
||
{
|
||
"comment": "新增浮点伤害值",
|
||
"operation": "调整",
|
||
"version": "2.5",
|
||
"author": "huangxiaojie03"
|
||
},
|
||
{
|
||
"comment": "增加ignite参数注意事项",
|
||
"operation": "调整",
|
||
"version": "2.9",
|
||
"author": "xusifan"
|
||
},
|
||
{
|
||
"comment": "新增customTag参数,用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型,damage_f字段在未来的版本将会移除",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ActuallyHurtServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体实际受到伤害时触发,相比于DamageEvent,该伤害为经过护甲及buff计算后,实际的扣血量",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "伤害源id",
|
||
"param_name": "srcId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "投射物id",
|
||
"param_name": "projectileId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被伤害id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害值(被伤害吸收后的值),允许修改,设置为0则此次造成的伤害为0,若设置数值和原来一样则视为没有修改",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体受击后,剩余的无懈可击帧数,在无懈可击时间内,damage和damage_f为超过上次伤害的部分",
|
||
"param_name": "invulnerableTime",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体上次受到的伤害",
|
||
"param_name": "lastHurt",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增浮点伤害值",
|
||
"operation": "调整",
|
||
"version": "2.5",
|
||
"author": "huangxiaojie03"
|
||
},
|
||
{
|
||
"comment": "新增customTag参数,用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型,damage_f字段在未来的版本将会移除,新增invulnerableTime与lastHurt参数",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerAttackEntityEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家攻击时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "受击者id",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害值:引擎传过来的值是0 允许脚本层修改为其他数",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "脚本是否设置伤害值:1表示是;0 表示否",
|
||
"param_name": "isValid",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消该次攻击,默认不取消",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否支持击退效果,默认支持,当不支持时将屏蔽武器击退附魔效果",
|
||
"param_name": "isKnockBack",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "本次攻击是否产生暴击,不支持修改",
|
||
"param_name": "isCrit",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增isCrit参数,用于判断本次攻击是否产生暴击",
|
||
"operation": "调整",
|
||
"version": "3.0",
|
||
"author": "qyk"
|
||
},
|
||
{
|
||
"comment": "damage支持浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPlayerGetExperienceOrbEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家获取经验球时触发的事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "经验球经验值",
|
||
"param_name": "experienceValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消(开发者传入)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerEntityTryPlaceBlockEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当生物试图放置方块时触发该事件。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标,支持修改",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标,支持修改",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标,支持修改",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称,支持修改",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值,支持修改",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "试图放置方块的生物ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "默认为False,在脚本层设置为True就能取消该方块的放置",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数,新增朝向参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "添加可以修改放置方块信息的逻辑,添加clickX,clickY,clickZ参数",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "chenyuekai"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "CommandEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家请求执行指令时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "指令字符串",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPlayerTryDestroyBlockEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当玩家即将破坏方块时,服务端线程触发该事件。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块被敲击的面向id,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "试图破坏方块的玩家ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "默认为False,在脚本层设置为True就能取消该方块的破坏",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否生成掉落物,默认为True,在脚本层设置为False就能取消生成掉落物",
|
||
"param_name": "spawnResources",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "参数新增方块被敲击的面向id,维度id以及是否生成掉落物",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DestroyBlockEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当方块已经被玩家破坏时触发该事件。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块被敲击的面向id,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "破坏方块的玩家ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "掉落物实体id列表",
|
||
"param_name": "dropEntityIds",
|
||
"param_type": "list(str)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增掉落物实体id列表",
|
||
"operation": "调整",
|
||
"version": "3.0",
|
||
"author": "bailei"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPreBlockPatternEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:用方块组合生成生物,在放置最后一个组成方块时触发该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许继续生成。若设为False,可阻止生成生物",
|
||
"param_name": "enable",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "即将生成生物的名字,如\"minecraft:pig\"",
|
||
"param_name": "entityWillBeGenerated",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerBlockUseEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家右键点击新版自定义方块(或者通过接口AddBlockItemListenForUseEvent增加监听的MC原生游戏方块)时服务端抛出该事件(该事件tick执行,需要注意效率问题)。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "aux",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可拦截与方块交互的逻辑。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增itemDict, face参数",
|
||
"operation": "调整",
|
||
"version": "2.8",
|
||
"author": "lzy"
|
||
},
|
||
{
|
||
"comment": "新增clickX,clickY,clickZ参数,可获取点击点的比例位置",
|
||
"operation": "调整",
|
||
"version": "3.2",
|
||
"author": "lrz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPlayerTryTouchEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家即将捡起物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品实体的Id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触碰的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "设置为True时将取消本次拾取",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "取消拾取后重新设置该物品的拾取cd,小于15帧将视作15帧,大于等于97813帧将视作无法拾取",
|
||
"param_name": "pickupDelay",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerPickupArrowServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家即将捡起抛射物时触发,包括使用\"netease:pick_up\"的自定义抛射物",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "抛射物Id",
|
||
"param_name": "arrowId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触碰的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "设置为True时将取消本次拾取",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "取消拾取后重新设置该物品的拾取cd,小于15帧将视作15帧,大于等于97813帧将视作无法拾取,每秒30帧",
|
||
"param_name": "pickupDelay",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家即将捡起箭矢时触发",
|
||
"operation": "新增",
|
||
"version": "3.1",
|
||
"author": "liruizhi"
|
||
},
|
||
{
|
||
"comment": "调整文档,补充说明抛射物也受此接口监听",
|
||
"operation": "调整",
|
||
"version": "3.2",
|
||
"author": "lrz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "StepOnBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体刚移动至一个新实心方块时触发。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续物理交互事件",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发的entity的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "重大触发机制调整、备注说明更新",
|
||
"operation": "调整",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "StepOffBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体移动离开一个实心方块时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发的entity的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增实体移动离开一个实心方块时触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "MobGriefingBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "环境生物改变方块时触发,触发的时机与mobgriefing游戏规则影响的行为相同",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续物理交互事件",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发的entity的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerInteractServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家可以与实体交互时。如果是鼠标控制模式,则当准心对着实体时触发。如果是触屏模式,则触发时机与屏幕下方的交互按钮显示的时机相同。玩家真正与实体发生交互的事件见[PlayerDoInteractServerEvent](#playerdointeractserverevent)",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否取消触发,默认为False,若设为True,可阻止触发后续的实体交互事件",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "主动与实体互动的玩家的唯一ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "当前玩家手持物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "被动的实体的唯一ID",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerFeedEntityServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家喂养生物时触发,例如玩家手持小麦喂养牛、玩家手持胡萝卜喂养幼年猪。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "主动喂养生物的玩家的唯一ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被喂养生物的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "当前玩家手持物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "是否取消触发,默认为False,若设为True,可阻止触发后续的生物喂养逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "调整备注,新增使用时注意事项",
|
||
"operation": "调整",
|
||
"version": "3.0",
|
||
"author": "lidi"
|
||
},
|
||
{
|
||
"comment": "玩家喂养生物时触发,例如玩家手持小麦喂养牛、玩家手持胡萝卜喂养幼年猪。",
|
||
"operation": "新增",
|
||
"version": "2.9",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerNamedEntityServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家用命名牌重命名实体时触发,例如玩家手持命名牌对羊修改名字、玩家手持命名牌对盔甲架修改名字。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "主动命名实体的玩家的唯一ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被命名实体的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体当前的名字",
|
||
"param_name": "preName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体重命名后的名字",
|
||
"param_name": "afterName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消触发,默认为False,若设为True,可阻止触发后续的实体命名逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家用命名牌重命名实体时触发,例如玩家手持命名牌对羊修改名字、玩家手持命名牌对盔甲架修改名字。",
|
||
"operation": "新增",
|
||
"version": "2.9",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "StartRidingServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:一个实体即将骑乘另外一个实体",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续的实体交互事件",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "骑乘者的唯一ID",
|
||
"param_name": "actorId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被骑乘实体的唯一ID",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "WillTeleportToServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体即将传送或切换维度",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续的传送",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "实体的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "传送前所在的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送后的目标维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送前所在的x坐标",
|
||
"param_name": "fromX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送前所在的y坐标",
|
||
"param_name": "fromY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送前所在的z坐标",
|
||
"param_name": "fromZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送目标地点的x坐标",
|
||
"param_name": "toX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送目标地点的y坐标",
|
||
"param_name": "toY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送目标地点的z坐标",
|
||
"param_name": "toZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "传送理由,详情见MinecraftEnum.EntityTeleportCause",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "补完参数说明中缺失的部分",
|
||
"operation": "调整",
|
||
"version": "1.22",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "切维度接口以及changedimension指令现在会触发该事件。修复了tp指令触发时,toDimensionId异常的问题。",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PistonActionServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:活塞或者粘性活塞推送/缩回影响附近方块时",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续的事件",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "推送时=expanding;缩回时=retracting",
|
||
"param_name": "action",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "活塞的朝向,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "pistonFacing",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞的运动方向,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "pistonMoveFacing",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞方块所在的维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞方块的x坐标",
|
||
"param_name": "pistonX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞方块的y坐标",
|
||
"param_name": "pistonY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞方块的z坐标",
|
||
"param_name": "pistonZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "活塞运动影响到产生被移动效果的方块坐标[x,y,z],均为int类型",
|
||
"param_name": "blockList",
|
||
"param_type": "list[[x,y,z],...]"
|
||
},
|
||
{
|
||
"param_comment": "活塞运动影响到产生被破坏效果的方块坐标[x,y,z],均为int类型",
|
||
"param_name": "breakBlockList",
|
||
"param_type": "list[[x,y,z],...]"
|
||
},
|
||
{
|
||
"param_comment": "活塞运动影响到产生被移动或被破坏效果的实体的ID列表",
|
||
"param_name": "entityList",
|
||
"param_type": "list[string,...]"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChestBlockTryPairWithServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:两个并排的小箱子方块准备组合为一个大箱子方块时",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止小箱子组合成为一个大箱子",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "小箱子方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "小箱子方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "小箱子方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "将要与之组合的另外一个小箱子方块x坐标",
|
||
"param_name": "otherBlockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "将要与之组合的另外一个小箱子方块y坐标",
|
||
"param_name": "otherBlockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "将要与之组合的另外一个小箱子方块z坐标",
|
||
"param_name": "otherBlockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "两个并排的小箱子方块组合为一个大箱子事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChangeSwimStateServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体开始或者结束游泳时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "事件触发前,实体是否在游泳状态",
|
||
"param_name": "formState",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "事件触发后,实体是否在游泳状态",
|
||
"param_name": "toState",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体开始游泳/结束游泳事件",
|
||
"operation": "新增",
|
||
"version": "1.17",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChangeLevelUpCostServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:获取玩家下一个等级升级经验时,用于重载玩家的升级经验,每个等级在重置之前都只会触发一次",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家当前等级",
|
||
"param_name": "level",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "当前等级升级到下个等级需要的经验值,当设置升级经验小于1时会被强制调整到1",
|
||
"param_name": "levelUpCostExp",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True,重载玩家升级经验才会生效",
|
||
"param_name": "changed",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "限制自定义升级经验的范围,不允许升级经验小于等于0",
|
||
"operation": "调整",
|
||
"version": "1.23.0.release20210819",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityRemoveEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体被删除时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加触发时机描述",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnKnockBackServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体被击退时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "MobDieEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体死亡时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源id",
|
||
"param_name": "attacker",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增cause与customTag参数,cause用于标明伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md),customTag用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnGroundServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体着地事件。实体,掉落的物品,点燃的TNT掉落地面时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "服务端实体着地事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "xusifan"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityMotionStartServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体运动器开始事件。实体(包含玩家)添加运动器后,运动器开始运行时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "运动器id",
|
||
"param_name": "motionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体运动器开始事件",
|
||
"operation": "新增",
|
||
"version": "2.4",
|
||
"author": "wangdingdong"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityMotionStopServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体运动器停止事件。实体(包含玩家)添加运动器并开始运行后,运动器自动停止时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "运动器id",
|
||
"param_name": "motionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否移除该运动器,设置为False则保留,默认为True,即运动器停止后自动移除,该参数设置只对非玩家实体有效",
|
||
"param_name": "remove",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体运动器停止事件",
|
||
"operation": "新增",
|
||
"version": "2.4",
|
||
"author": "wangdingdong"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "GlobalCommandServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务端全局命令事件,包括聊天栏发送、SetCommand接口、命令方块(矿车)、行为包动画执行命令",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "执行命令的实体id, 如果没有此键,则是命令方块执行的命令",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "将要被执行的命令",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "执行命令的实体或方块的方块坐标",
|
||
"param_name": "blockPos",
|
||
"param_type": "tuple(int,int,int)"
|
||
},
|
||
{
|
||
"param_comment": "执行命令的实体或方块所在维度id",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消命令执行",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "服务端全局命令事件",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "chenyuekai"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "FurnaceBurnFinishedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务端熔炉烧制触发事件。熔炉, 高炉,烟熏炉烧出物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当新物品为空时,此项属性为None",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "服务端熔炉烧制触发事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "huangxiaojie03"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityLoadScriptEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "数据库加载实体自定义数据时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "该事件的参数为长度为2的list,而非dict,其中list的第一个元素为实体id",
|
||
"param_name": "args",
|
||
"param_type": "list"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityStartRidingEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当实体骑乘上另一个实体时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "乘骑者实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被乘骑者实体id",
|
||
"param_name": "rideId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityStopRidingEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当实体停止骑乘时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "坐骑id",
|
||
"param_name": "rideId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否下坐骑",
|
||
"param_name": "exitFromRider",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "坐骑是否将要销毁",
|
||
"param_name": "entityIsBeingDestroyed",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否换乘坐骑",
|
||
"param_name": "switchingRides",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消(需要与客户端事件一同取消)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "支持取消实体下马功能",
|
||
"operation": "调整",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AttackAnimBeginServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当攻击动作开始时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AttackAnimEndServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当攻击动作结束时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "JumpAnimBeginServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当跳跃动作开始时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "WalkAnimBeginServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当走路动作开始时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "WalkAnimEndServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当走路动作结束时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnScriptTickServer",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务器tick时触发,1秒有30个tick",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "LoadServerAddonScriptsAfter",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务器加载完mod时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ExplosionServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当发生爆炸时触发。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "爆炸导致的被破坏方块坐标(x,y,z),cancel是一个bool值",
|
||
"param_name": "blocks",
|
||
"param_type": "list[[x,y,z,cancel],...]"
|
||
},
|
||
{
|
||
"param_comment": "受伤实体id列表,当该爆炸创建者id为None时,victims也为None",
|
||
"param_name": "victims",
|
||
"param_type": "list/None"
|
||
},
|
||
{
|
||
"param_comment": "爆炸创建者id",
|
||
"param_name": "sourceId",
|
||
"param_type": "str/None"
|
||
},
|
||
{
|
||
"param_comment": "爆炸位置[x,y,z]",
|
||
"param_name": "explodePos",
|
||
"param_type": "list"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnFireHurtEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "生物受到火焰伤害时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "受伤实体id",
|
||
"param_name": "victim",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "火焰创建者id",
|
||
"param_name": "src",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "着火时间,单位秒, 不支持修改",
|
||
"param_name": "fireTime",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否取消此处火焰伤害",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否取消点燃效果",
|
||
"param_name": "cancelIgnite",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增着火时间参数fireTime和取消伤害参数cancel",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "新增cancelIgnite参数,支持取消点燃效果",
|
||
"operation": "调整",
|
||
"version": "2.9",
|
||
"author": "xusifan"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ProjectileCritHitEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当抛射物与头部碰撞时触发该事件。注:需调用OpenPlayerCritBox开启玩家爆头后才能触发。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "抛射物id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞目标id",
|
||
"param_name": "targetId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerHurtEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家受伤害前触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "受击玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源实体id,若没有实体攻击,例如高空坠落,id为-1",
|
||
"param_name": "attacker",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增cause与customTag参数,cause用于标明伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md),customTag用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerTeleportEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家传送时触发该事件,如:玩家使用末影珍珠或tp指令时。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerDieEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家死亡时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源id",
|
||
"param_name": "attacker",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增cause与customTag参数,cause用于标明伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md),customTag用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AddExpEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家增加经验时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "增加的经验值",
|
||
"param_name": "addExp",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AddLevelEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当玩家升级时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "增加的等级值",
|
||
"param_name": "addLevel",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "新的等级",
|
||
"param_name": "newLevel",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DelServerPlayerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:删除玩家时触发该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否是切服时退出服务器,仅用于Apollo。如果是True,则表示切服时退出服务器;若是False,则表示退出网络游戏",
|
||
"param_name": "isTransfer",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "玩家的netease uid,玩家的唯一标识",
|
||
"param_name": "uid",
|
||
"param_type": "int/long"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增触发时机描述",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerIntendLeaveServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:即将删除玩家时触发该事件,此时可以通过各种API获取玩家的当前状态。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "即将删除玩家事件,此时可以通过各种API获取玩家的当前状态。",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AddServerPlayerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家加入时触发该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否是切服时进入服务器,仅用于Apollo。如果是True,则表示切服时加入服务器,若是False,则表示登录进入网络游戏",
|
||
"param_name": "isTransfer",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否是断线重连,仅用于Apollo。如果是True,则表示本次登录是断线重连,若是False,则表示本次是正常登录或者转服",
|
||
"param_name": "isReconnect",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否从手机端登录,仅用于Apollo。如果是True,则表示本次登录是从手机端登录,若是False,则表示本次登录是从PC端登录",
|
||
"param_name": "isPeUser",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "切服传入参数,仅用于Apollo。调用【TransferToOtherServer】或【TransferToOtherServerById】传入的切服参数",
|
||
"param_name": "transferParam",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "仅用于Apollo,玩家的netease uid,玩家的唯一标识",
|
||
"param_name": "uid",
|
||
"param_type": "int/long"
|
||
},
|
||
{
|
||
"param_comment": "仅用于Apollo,当前客户端连接的proxy服务器id",
|
||
"param_name": "proxyId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增isPeUser关键字,表示此次登录是否从手机端登录,仅Apollo网络服可用",
|
||
"operation": "调整",
|
||
"version": "2.0.pcpe",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ClientLoadAddonsFinishServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:客户端mod加载完成时,服务端触发此事件。服务器可以使用此事件,往客户端发送数据给其初始化。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerRespawnEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家复活时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerRespawnFinishServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家复活完毕时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家复活完毕事件",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerSpinAttackServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家开始/结束快速旋转攻击时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家的entityId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否在水中或雨中",
|
||
"param_name": "isInWaterOrRain",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否骑乘状态",
|
||
"param_name": "isRiding",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "True时代表开始快速旋转攻击;False时代表结束快速旋转攻击",
|
||
"param_name": "isStart",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家开始/结束快速旋转攻击事件",
|
||
"operation": "新增",
|
||
"version": "1.23.0.release20210805",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerCheatSpinAttackServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家开始/结束快速旋转攻击并且不符合发送快速旋转攻击条件时触发(装备激流附魔的三叉戟、在水中或雨中,且未骑乘)",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家的entityId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "True时代表开始快速旋转攻击;False时代表结束快速旋转攻击",
|
||
"param_name": "isStart",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家开始/结束快速旋转攻击并且不符合发送快速旋转攻击条件",
|
||
"operation": "新增",
|
||
"version": "1.23.0.release20210805",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnOffhandItemChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家切换副手物品时触发该事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "旧物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当旧物品为空时,此项属性为None",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "新物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当新物品为空时,此项属性为None",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "玩家 entityId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增关键字oldItemDict、newItemDict",
|
||
"operation": "调整",
|
||
"version": "1.19",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "新增备注:切换耐久度不同的相同物品,不会触发该事件",
|
||
"operation": "调整",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnCarriedNewItemChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家切换主手物品时触发该事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "旧物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当旧物品为空时,此项属性为None",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "新物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当新物品为空时,此项属性为None",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "玩家 entityId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增关键字oldItemDict、newItemDict",
|
||
"operation": "调整",
|
||
"version": "1.19",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增备注:切换耐久度不同的相同物品,不会触发该事件",
|
||
"operation": "调整",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnNewArmorExchangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家切换盔甲时触发该事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "槽位id",
|
||
"param_name": "slot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "旧装备的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当旧物品为空时,此项属性为None",
|
||
"param_name": "oldArmorDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "新装备的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>,当新物品为空时,此项属性为None",
|
||
"param_name": "newArmorDict",
|
||
"param_type": "dict/None"
|
||
},
|
||
{
|
||
"param_comment": "玩家 entityId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增关键字oldArmorDict、newArmorDict",
|
||
"operation": "调整",
|
||
"version": "1.19",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "修改当装备为空时,关键字oldArmorDict、newArmorDict的内容说明",
|
||
"operation": "调整",
|
||
"version": "1.22",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "新增避免在该事件内调用修改盔甲接口的说明",
|
||
"operation": "调整",
|
||
"version": "2.8",
|
||
"author": "wj"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPostBlockPatternEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:用方块组合生成生物,生成生物之后触发该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生成生物的id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "生成生物的名字,如\"minecraft:pig\"",
|
||
"param_name": "entityGenerated",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerItemTryUseEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家点击右键尝试使用物品时服务端抛出的事件。注:如果需要取消物品的使用需要同时在ClientItemTryUseEvent和ServerItemTryUseEvent中将cancel设置为True才能正确取消。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "设为True可取消物品的使用",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增使用场景的描述",
|
||
"operation": "调整",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "cancel设置为true后不再触发ItemUseAfterServerEvent",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerItemUseOnEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家在对方块使用物品之前服务端抛出的事件。注:如果需要取消物品的使用需要同时在ClientItemUseOnEvent和ServerItemUseOnEvent中将ret设置为True才能正确取消。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "方块 x 坐标值",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 y 坐标值",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 z 坐标值",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "blockAuxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "设为True可取消物品的使用",
|
||
"param_name": "ret",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "修改触发时机描述。物品相关参数改为物品信息字典。",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
},
|
||
{
|
||
"comment": "新增维度id,blockName,以及blockAuxValue参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ItemUseOnAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家在对方块使用物品之后服务端抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "方块 x 坐标值",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 y 坐标值",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 z 坐标值",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "blockAuxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "对方块使用物品之后的服务端事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
},
|
||
{
|
||
"comment": "新增维度id,blockName,以及blockAuxValue参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ShearsUseToBlockBeforeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体手持剪刀对方块使用时,有剪刀特殊效果的方块会在服务端线程触发该事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物identifier,包含命名空间及名称",
|
||
"param_name": "dropName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物数量",
|
||
"param_name": "dropCount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的实体id,目前仅玩家会触发",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家触发时的维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消剪刀效果",
|
||
"param_name": "cancelShears",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加实体手持剪刀对方块使用时事件,可取消剪刀效果",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ItemUseAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家在使用物品之后服务端抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "使用物品之后的服务端事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "InventoryItemChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家背包物品变化时服务端抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "背包槽位",
|
||
"param_name": "slot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化前槽位中的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "变化后槽位中的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家背包物品变化时的服务端事件",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "CraftItemOutputChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家从容器拿出生成物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "生成的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "当前界面类型,类型含义见:[容器类型枚举](../枚举值/ContainerType.md)",
|
||
"param_name": "screenContainerType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消生成物品",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增当前界面类型参数",
|
||
"operation": "调整",
|
||
"version": "2.1",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "UIContainerItemChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "合成容器物品发生变化时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "容器槽位,含义见:[容器类型枚举](../枚举值/PlayerUISlot.md)",
|
||
"param_name": "slot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "旧物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "生成的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增合成容器物品变化事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ContainerItemChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "容器物品变化事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "容器坐标",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(int,int,int)/None"
|
||
},
|
||
{
|
||
"param_comment": "容器类型,类型含义见:[容器类型枚举](../枚举值/ContainerType.md)",
|
||
"param_name": "containerType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "容器槽位",
|
||
"param_name": "slot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "旧物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "新物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增容器物品变化事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "jishaobin"
|
||
},
|
||
{
|
||
"comment": "增加获取维度id信息",
|
||
"operation": "调整",
|
||
"version": "2.4",
|
||
"author": "huangxiaojie03"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AddEntityServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务端侧创建新实体,或实体从存档加载时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否为幼儿",
|
||
"param_name": "isBaby",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "实体类型,即实体identifier",
|
||
"param_name": "engineTypeStr",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品identifier(仅当物品实体时存在该字段)",
|
||
"param_name": "itemName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品附加值(仅当物品实体时存在该字段)",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "当实体为物品实体时增加参数itemName和auxValue",
|
||
"operation": "调整",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityTickServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体tick时触发。该事件为20帧每秒。需要使用AddEntityTickEventWhiteList添加触发该事件的实体类型白名单。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体identifier",
|
||
"param_name": "identifier",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体tick事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "添加实体identifier参数",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ActorUseItemServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家使用物品生效之前服务端抛出的事件(比较特殊不走该事件的例子:1)染料对有水的炼药锅使用;2)盔甲架装备盔甲)",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "使用物品的方法,详见[ItemUseMethodEnum枚举](../枚举值/ItemUseMethodEnum.md)",
|
||
"param_name": "useMethod",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "修改触发时机描述。物品相关参数改为物品信息字典。",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "jishaobin/czh"
|
||
},
|
||
{
|
||
"comment": "喝牛奶支持触发该事件",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ActorAcquiredItemServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家获得物品时服务端抛出的事件(有些获取物品方式只会触发客户端事件,有些获取物品方式只会触发服务端事件,在使用时注意一点。)",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "获得物品玩家实体id",
|
||
"param_name": "actor",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品给予者玩家实体id,如果不存在给予者的话,这里为空字符串",
|
||
"param_name": "secondaryActor",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "获得的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "获得物品的方法,详见[ItemAcquisitionMethod枚举](../枚举值/ItemAcquisitionMethod.md)",
|
||
"param_name": "acquireMethod",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerJoinMessageEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:准备显示“xxx加入游戏”的玩家登录提示文字时服务端抛出的事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家昵称",
|
||
"param_name": "name",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否显示提示文字,允许修改。True:不显示提示",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "玩家加入游戏的提示文字,允许修改",
|
||
"param_name": "message",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerLeftMessageServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:准备显示“xxx离开游戏”的玩家离开提示文字时服务端抛出的事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家昵称",
|
||
"param_name": "name",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否显示提示文字,允许修改。True:不显示提示",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "玩家离开游戏的提示文字,允许修改",
|
||
"param_name": "message",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家离开发送消息时触发",
|
||
"operation": "新增",
|
||
"version": "1.18.0.release20200917",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DimensionChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家维度改变时服务端抛出",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度改变前的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度改变后的维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置x",
|
||
"param_name": "fromX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Y",
|
||
"param_name": "fromY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Z",
|
||
"param_name": "fromZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置x",
|
||
"param_name": "toX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Y",
|
||
"param_name": "toY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Z",
|
||
"param_name": "toZ",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlaceNeteaseStructureFeatureEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:首次生成地形时,结构特征即将生成时服务端抛出该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "结构名称,可修改",
|
||
"param_name": "structureName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "结构坐标最小方块所在的x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "结构坐标最小方块所在的y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "结构坐标最小方块所在的z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该feature所放置区块的生物群系类型",
|
||
"param_name": "biomeType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该feature所放置区块的生物群系名称",
|
||
"param_name": "biomeName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True时可阻止该结构的放置",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "structureName参数可修改",
|
||
"operation": "调整",
|
||
"version": "3.2",
|
||
"author": "czk"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlaceNeteaseLargeFeatureServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:网易版大型结构即将生成时服务端抛出该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "中心结构放置坐标(x, z)",
|
||
"param_name": "pos",
|
||
"param_type": "tuple"
|
||
},
|
||
{
|
||
"param_comment": "中心结构顺时针旋转角度",
|
||
"param_name": "rot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "大型结构递归深度",
|
||
"param_name": "depth",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "中心池的identifier",
|
||
"param_name": "centerPool",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否允许生成过结构的地方是否可以继续生成结构",
|
||
"param_name": "ignoreFitInContext",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "设置为True时可阻止该大型结构的放置",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "触发时机:网易版大型结构即将生成时服务端抛出该事件",
|
||
"operation": "新增",
|
||
"version": "2.9",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "CustomCommandTriggerServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "自定义命令触发事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "自定义命令名称,对应json中的name字段",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "自定义命令参数,详情见下方",
|
||
"param_name": "args",
|
||
"param_type": "list(dict)"
|
||
},
|
||
{
|
||
"param_comment": "表示是哪条变体,范围[0, 9],对应json中args键中的数字,未配置变体则为0",
|
||
"param_name": "variant",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发源的信息,详情见下方",
|
||
"param_name": "origin",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "设置自定义命令是否执行失败,默认为False,如果执行失败,返回信息以红色字体显示",
|
||
"param_name": "return_failed",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "设置返回给玩家或命令方块的信息,也支持通过语言文件(.lang)定义,默认值为commands.custom.success(自定义命令执行成功)",
|
||
"param_name": "return_msg_key",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增自定义命令触发事件",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "chenyuekai"
|
||
},
|
||
{
|
||
"comment": "新增参数变体返回参数",
|
||
"operation": "新增",
|
||
"version": "3.3",
|
||
"author": "chenyuekai"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerEatFoodServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家吃下食物时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "食物物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "食物增加的饥饿值,可修改",
|
||
"param_name": "hunger",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "食物的营养价值,回复饱和度 = 食物增加的饥饿值 * 食物的营养价值 * 2,饱和度最大不超过当前饥饿值,可修改",
|
||
"param_name": "nutrition",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加饥饿度参数,可修改",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "lidi"
|
||
},
|
||
{
|
||
"comment": "支持蛋糕、牛奶触发该事件",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerBlockEntityTickEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:自定义方块配置了netease:block_entity组件并设tick为true,方块在玩家的模拟距离(新建存档时可以设置,默认为4个区块)内,或者在tickingarea内的时候触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "该方块名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "该方块所在的维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ServerPlaceBlockEntityEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:手动放置或通过接口创建含自定义方块实体的方块时触发,此时可向该方块实体中存放数据",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "该方块名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "该方块所在的维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块的z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChunkGeneratedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:区块创建完成时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "该区块所在的维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该区块中的自定义方块实体列表,通常是由自定义特征生成的自定义方块,没有自定义方块实体时该值为None",
|
||
"param_name": "blockEntityData",
|
||
"param_type": "[{\"blockName\":str,\"posX\":int,\"posY\":int,\"posZ\":int}...]/None"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityDefinitionsEventServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:生物定义json文件中设置的event触发时同时触发。生物行为变更事件",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生物id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触发的事件名称",
|
||
"param_name": "eventName",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "NewOnEntityAreaEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:通过RegisterEntityAOIEvent注册过AOI事件后,当有实体进入或离开注册感应区域时触发该事件。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "注册感应区域名称",
|
||
"param_name": "name",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "进入该感应区域的实体id列表",
|
||
"param_name": "enteredEntities",
|
||
"param_type": "list[str]"
|
||
},
|
||
{
|
||
"param_comment": "离开该感应区域的实体id列表",
|
||
"param_name": "leftEntities",
|
||
"param_type": "list[str]"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "RegisterEntityAOIEvent注册过AOI事件后,当有实体进入或离开注册感应区域时触发该事件;回调参数类型是dict",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnPlayerHitBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:通过OpenPlayerHitBlockDetection打开方块碰撞检测后,当玩家碰撞到方块时触发该事件。监听玩家着地请使用客户端的OnGroundClientEvent。客户端和服务端分别作碰撞检测,可能两个事件返回的略有差异。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "碰撞到方块的玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的identifier",
|
||
"param_name": "blockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增维度id以及auxValue参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnMobHitBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:通过OpenMobHitBlockDetection打开方块碰撞检测后,当生物(不包括玩家)碰撞到方块时触发该事件。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "碰撞到方块的生物Id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的identifier",
|
||
"param_name": "blockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物和方块碰撞事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "gmy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnMobHitMobServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:通过OpenPlayerHitMobDetection打开生物碰撞检测后,当生物间(包含玩家)碰撞时触发该事件。注:客户端和服务端分别作碰撞检测,可能两个事件返回的略有差异。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "当前生物的id",
|
||
"param_name": "mobId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "当前生物碰撞到的其他所有生物id的list",
|
||
"param_name": "hittedMobList",
|
||
"param_type": "list[str]"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物碰撞事件",
|
||
"operation": "新增",
|
||
"version": "2.2",
|
||
"author": "wdd"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockRandomTickServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:自定义方块配置<a href=\"../../../mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/1-JSON组件.html#netease-random-tick\">netease:random_tick</a>随机tick时",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块亮度",
|
||
"param_name": "brightness",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockNeighborChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:自定义方块周围的方块发生变化时,需要配置netease:neighborchanged_sendto_script,详情请查阅《自定义农作物》文档",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化方块x坐标",
|
||
"param_name": "neighborPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化方块y坐标",
|
||
"param_name": "neighborPosY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化方块z坐标",
|
||
"param_name": "neighborPosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块变化前的identifier,包含命名空间及名称",
|
||
"param_name": "fromBlockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块变化前附加值",
|
||
"param_name": "fromBlockAuxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块变化后的identifier,包含命名空间及名称",
|
||
"param_name": "toBlockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块变化后附加值",
|
||
"param_name": "toAuxValue",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AddEffectServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体获得状态效果时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体获得状态效果的名字",
|
||
"param_name": "effectName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "状态效果的持续时间,单位秒",
|
||
"param_name": "effectDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "状态效果的放大倍数",
|
||
"param_name": "effectAmplifier",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "状态造成的伤害值(真实扣除生命值的量)。只有持续时间为0时有用",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增伤害参数damage",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "WillAddEffectServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体即将获得状态效果前",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体获得状态效果的名字",
|
||
"param_name": "effectName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "状态效果的持续时间,单位秒",
|
||
"param_name": "effectDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "状态效果的放大倍数",
|
||
"param_name": "effectAmplifier",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "状态将会造成的伤害值,如药水;需要注意,该值不一定是最终的伤害值,例如被伤害吸收效果扣除。只有持续时间为0时有用",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体即将获得状态效果",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "xltang"
|
||
},
|
||
{
|
||
"comment": "新增伤害参数damage",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "RemoveEffectServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体身上状态效果被移除时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被移除状态效果的名字",
|
||
"param_name": "effectName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被移除状态效果的剩余持续时间,单位秒",
|
||
"param_name": "effectDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "被移除状态效果的放大倍数",
|
||
"param_name": "effectAmplifier",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "RefreshEffectServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:实体身上状态效果更新时触发,更新条件1、新增状态等级较高,更新状态等级及时间;2、新增状态等级不变,时间较长,更新状态持续时间",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "更新状态效果的名字",
|
||
"param_name": "effectName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "更新后状态效果剩余持续时间,单位秒",
|
||
"param_name": "effectDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "更新后的状态效果放大倍数",
|
||
"param_name": "effectAmplifier",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "状态造成的伤害值,如药水",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增伤害参数damage",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ItemReleaseUsingServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:释放正在使用的物品时",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "蓄力剩余时间(当物品缺少\"minecraft:maxduration\"组件时,蓄力剩余时间为负数)",
|
||
"param_name": "durationLeft",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "最大蓄力时长",
|
||
"param_name": "maxUseDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消,需要同时取消客户端事件[ItemReleaseUsingClientEvent](#itemreleaseusingclientevent)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "如果要在该事件的回调中修改当前使用槽位的物品,需设置这个参数为True,否则将修改物品失败,例如修改耐久度或者替换成新物品",
|
||
"param_name": "changeItem",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "释放正在使用的物品事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增changeItem参数,如果要在该事件的回调中修改当前使用槽位的物品,需设置这个参数为True,否则将修改物品失败",
|
||
"operation": "调整",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerDropItemServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家丢弃物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品entityId",
|
||
"param_name": "itemEntityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增玩家丢弃物品事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DimensionChangeFinishServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家维度改变完成后服务端抛出",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度改变前的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度改变后的维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": " 改变后的位置x,y,z,其中y值为脚底加上角色的身高值",
|
||
"param_name": "toPos",
|
||
"param_type": "tuple(float,float,float)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增玩家改变维度事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockStrengthChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:自定义机械元件方块红石信号量发生变化时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化后的红石信号量",
|
||
"param_name": "newStrength",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加维度参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ActorHurtServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:生物(包括玩家)受伤时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生物Id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害值(被伤害吸收后的值),不可修改",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "被伤害吸收效果吸收的伤害值",
|
||
"param_name": "absorbedDamage",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"param_name": "customTag",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物受伤事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "新增浮点伤害值",
|
||
"operation": "调整",
|
||
"version": "2.5",
|
||
"author": "huangxiaojie03"
|
||
},
|
||
{
|
||
"comment": "新增customTag参数,用于接收使用[Hurt接口](../接口/实体/行为.md#hurt)传入的自定义伤害类型",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockRemoveServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:监听该事件的方块在销毁时触发,可以通过[ListenOnBlockRemoveEvent](#listenonblockremoveevent)方法进行监听,或者通过json组件<a href=\"../../../mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/1-JSON组件.html#netease-listen-block-remove\">netease:listen_block_remove</a>进行配置",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该方块所在的维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "可以动态对方块的该事件进行监听",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "自定义方块被移除时触发",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityPlaceBlockAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当生物成功放置方块后触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "fullName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "试图放置方块的生物ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物成功放置方块后触发",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增朝向参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "SpawnProjectileServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:抛射物生成时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "抛射物的实体id",
|
||
"param_name": "projectileId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "抛射物的identifier",
|
||
"param_name": "projectileIdentifier",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "发射者的实体id,没有发射者时为-1",
|
||
"param_name": "spawnerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "抛射物生成事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityDieLoottableServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:生物死亡掉落物品时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "死亡实体的entityId",
|
||
"param_name": "dieEntityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源的entityId",
|
||
"param_name": "attacker",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "掉落物品列表,每个元素为一个itemDict,格式可参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemList",
|
||
"param_type": "list(dict)"
|
||
},
|
||
{
|
||
"param_comment": "默认为False,如果需要修改掉落列表需将该值设为True",
|
||
"param_name": "dirty",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物死亡掉落物品事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "lidi"
|
||
},
|
||
{
|
||
"comment": "支持修改itemDict中的userData,userData必须为NBT数据格式,格式可参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#NBT数据格式#NBT数据格式\">NBT数据格式</a>",
|
||
"operation": "调整",
|
||
"version": "3.0",
|
||
"author": "qyk"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityDieLoottableAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:生物死亡掉落物品之后",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "死亡实体的entityId",
|
||
"param_name": "dieEntityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源的entityId",
|
||
"param_name": "attacker",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "掉落物品列表,每个元素为一个itemDict,格式可参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemList",
|
||
"param_type": "list(dict)"
|
||
},
|
||
{
|
||
"param_comment": "掉落物品entityId列表",
|
||
"param_name": "itemEntityIdList",
|
||
"param_type": "list(str)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物死亡掉落物品之后事件",
|
||
"operation": "新增",
|
||
"version": "2.11",
|
||
"author": "wkm"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnContainerFillLoottableServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:随机奖励箱第一次打开根据loottable生成物品时",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "奖励箱子所读取的loottable的json路径",
|
||
"param_name": "loottable",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "打开奖励箱子的玩家的playerId",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "掉落物品列表,每个元素为一个itemDict,格式可参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemList",
|
||
"param_type": "list"
|
||
},
|
||
{
|
||
"param_comment": "默认为False,如果需要修改掉落列表需将该值设为True",
|
||
"param_name": "dirty",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "适配使用刷子刷可疑的沙子",
|
||
"operation": "新增",
|
||
"version": "2.12",
|
||
"author": "xgb"
|
||
},
|
||
{
|
||
"comment": "随机奖励箱填充事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChunkLoadedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:服务端区块加载完成时",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "区块所在维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的x坐标,对应方块X坐标区间为[x * 16, x * 16 + 15]",
|
||
"param_name": "chunkPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的z坐标,对应方块Z坐标区间为[z * 16, z * 16 + 15]",
|
||
"param_name": "chunkPosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "随区块加载而加载进世界的自定义方块实体的坐标的列表,列表元素dict包含posX,posY,posZ三个int表示自定义方块实体的坐标,blockName表示方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockEntities",
|
||
"param_type": "list(dict)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "在监听白名单内的服务端区块加载完成事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "liaoyi"
|
||
},
|
||
{
|
||
"comment": "该事件不再需要添加区块白名单",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "添加blockEntities字段",
|
||
"operation": "调整",
|
||
"version": "2.8",
|
||
"author": "yangzhiwei"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ChunkAcquireDiscardedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "服务端区块即将被卸载时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "区块所在维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的x坐标,对应方块X坐标区间为[x * 16, x * 16 + 15]",
|
||
"param_name": "chunkPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的z坐标,对应方块Z坐标区间为[z * 16, z * 16 + 15]",
|
||
"param_name": "chunkPosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "随区块卸载而从世界移除的实体id的列表。注意事件触发时已经无法获取到这些实体的信息,仅供脚本资源回收用。",
|
||
"param_name": "entities",
|
||
"param_type": "list(str)"
|
||
},
|
||
{
|
||
"param_comment": "随区块卸载而从世界移除的自定义方块实体的坐标的列表,列表元素dict包含posX,posY,posZ三个int表示自定义方块实体的坐标,blockName表示方块的identifier,包含命名空间及名称。注意事件触发时已经无法获取到这些方块实体的信息,仅供脚本资源回收用。",
|
||
"param_name": "blockEntities",
|
||
"param_type": "list(dict)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "在监听白名单内的服务端区块即将被卸载事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "liaoyi"
|
||
},
|
||
{
|
||
"comment": "该事件不再需要注册区块白名单。事件参数添加了随区块卸载而从世界移除的实体以及自定义方块实体列表",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "GameTypeChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "当默认游戏模式或个人游戏模式发生变化时服务端触发,如果个人游戏模式不为默认时,修改默认游戏模式也会同时修改个人游戏模式,此时会触发两次该事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id,[SetDefaultGameType](../接口/世界/游戏规则.md#SetDefaultGameType)接口改变游戏模式时该参数为空字符串",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "切换前的游戏模式",
|
||
"param_name": "oldGameType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "切换后的游戏模式",
|
||
"param_name": "newGameType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "个人游戏模式发生变化事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "更新事件触发时机描述及备注",
|
||
"operation": "调整",
|
||
"version": "2.12",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "HopperTryPullInServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当漏斗上方连接容器后,容器往漏斗开始输入物品时触发,事件仅触发一次",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "漏斗位置x",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "漏斗位置y",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "漏斗位置z",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置x",
|
||
"param_name": "abovePosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置y",
|
||
"param_name": "abovePosY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置z",
|
||
"param_name": "abovePosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否允许容器往漏斗加东西(要关闭此交互,需先监听此事件再放置容器)",
|
||
"param_name": "canHopper",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "漏斗放在容器下方,放置成功时触发事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "更正事件触发时机描述为:当漏斗上方连接容器后,容器往漏斗开始输入物品时触发,事件仅触发一次",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "xujiarong"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "HopperTryPullOutServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当漏斗以毗邻的方式连接容器时,即从旁边连接容器时,漏斗向容器开始输出物品时触发,事件仅触发一次",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "漏斗位置x",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "漏斗位置y",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "漏斗位置z",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置x",
|
||
"param_name": "attachedPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置y",
|
||
"param_name": "attachedPosY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "交互的容器位置z",
|
||
"param_name": "attachedPosZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否允许漏斗往容器加东西(要关闭此交互,需先监听此事件再放置容器)",
|
||
"param_name": "canHopper",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "漏斗放在容器旁边,放置成功时触发事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "更正事件触发时机描述为:当漏斗以毗邻的方式连接容器时,即从旁边连接容器时,漏斗向容器开始输出物品时触发,事件仅触发一次",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "xujiarong"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ShearsDestoryBlockBeforeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家手持剪刀破坏方块时,有剪刀特殊效果的方块会在服务端线程触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物identifier,包含命名空间及名称",
|
||
"param_name": "dropName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物数量",
|
||
"param_name": "dropCount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家触发时的维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消剪刀效果",
|
||
"param_name": "cancelShears",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加玩家手持剪刀破坏方块时事件,可取消剪刀效果",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "CommandBlockUpdateEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家尝试修改命令方块的内置命令时",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家的uid",
|
||
"param_name": "playerUid",
|
||
"param_type": "int/long"
|
||
},
|
||
{
|
||
"param_comment": "企图修改的命令方块中的命令内容字符串",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否以方块坐标的形式定位命令方块,当为True时下述的blockX/blockY/blockZ有意义,当为False时,下述的victimId有意义",
|
||
"param_name": "isBlock",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置x,当isBlock为True时有效",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置y,当isBlock为True时有效",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置z,当isBlock为True时有效",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块对应的逻辑实体的唯一id,当isBlock为False时有效",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可以阻止玩家修改命令方块的内置命令",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家尝试修改命令方块的内置命令时触发事件",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "CommandBlockContainerOpenEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家点击命令方块,尝试打开命令方块的设置界面",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否以方块坐标的形式定位命令方块,当为True时下述的blockX/blockY/blockZ有意义,当为False时,下述的victimId有意义",
|
||
"param_name": "isBlock",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置x,当isBlock为True时有效",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置y,当isBlock为True时有效",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块位置z,当isBlock为True时有效",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "命令方块对应的逻辑实体的唯一id,当isBlock为False时有效",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可以阻止玩家打开命令方块的设置界面",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家点击命令方块,尝试打开命令方块的设置界面时触发事件",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "HeavyBlockStartFallingServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当重力方块变为下落的方块实体后,服务端触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "下落的方块实体id",
|
||
"param_name": "fallingBlockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "重力方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加重力方块变为下落的方块实体后触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "FallingBlockReturnHeavyBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当下落的方块实体变回普通重力方块时,服务端触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "下落的方块实体id",
|
||
"param_name": "fallingBlockId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "重力方块的identifier,包含命名空间及名称",
|
||
"param_name": "heavyBlockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "变回重力方块时,原本方块位置的identifier,包含命名空间及名称",
|
||
"param_name": "prevHereBlockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少tick",
|
||
"param_name": "fallTickAmount",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加下落的方块实体变回普通重力方块时触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "FallingBlockBreakServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当下落的方块实体被破坏时,服务端触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "下落的方块实体id",
|
||
"param_name": "fallingBlockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置x",
|
||
"param_name": "fallingBlockX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置y",
|
||
"param_name": "fallingBlockY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置z",
|
||
"param_name": "fallingBlockZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "重力方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少tick",
|
||
"param_name": "fallTickAmount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消方块物品掉落,可以在脚本层中设置",
|
||
"param_name": "cancelDrop",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加下落的方块实体被破坏时触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "FallingBlockCauseDamageBeforeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当下落的方块开始计算砸到实体的伤害时,服务端触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "下落的方块实体id",
|
||
"param_name": "fallingBlockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置x",
|
||
"param_name": "fallingBlockX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置y",
|
||
"param_name": "fallingBlockY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置z",
|
||
"param_name": "fallingBlockZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "重力方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "当前碰撞到的实体列表id,如果没有的话是None",
|
||
"param_name": "collidingEntitys",
|
||
"param_type": "list(str)"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少tick",
|
||
"param_name": "fallTickAmount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少距离",
|
||
"param_name": "fallDistance",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否计算对实体的伤害,引擎传来的值由json配置和伤害是否大于0决定,可在脚本层修改传回引擎",
|
||
"param_name": "isHarmful",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "对实体的伤害,引擎传来的值距离和json配置决定,可在脚本层修改传回引擎",
|
||
"param_name": "fallDamage",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加下落的方块计算砸实体伤害的事件,可修改部分属性",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnBeforeFallOnBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当实体刚降落到方块上时服务端触发,主要用于伤害计算",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体下降距离,可在脚本层传给引擎",
|
||
"param_name": "fallDistance",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否取消引擎对实体下降伤害的计算",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加实体刚降落到方块上时服务端触发的事件,主要用于伤害计算",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnAfterFallOnBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当实体降落到方块后服务端触发,主要用于力的计算",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动X方向的力",
|
||
"param_name": "motionX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Y方向的力",
|
||
"param_name": "motionY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Z方向的力",
|
||
"param_name": "motionZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否按脚本层传值计算力",
|
||
"param_name": "calculate",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加实体刚降落到方块上时服务端触发的事件,主要用于力的计算",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnStandOnBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当实体站立到方块上时服务端持续触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体所在维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动X方向的力",
|
||
"param_name": "motionX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Y方向的力",
|
||
"param_name": "motionY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Z方向的力",
|
||
"param_name": "motionZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "可由脚本层回传True给引擎,阻止触发后续原版逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加当实体站立到方块上时服务端持续触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
},
|
||
{
|
||
"comment": "增加了cancel、dimensionId参数,优化了备注文档说明",
|
||
"operation": "调整",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnEntityInsideBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:当实体碰撞盒所在区域有方块时,服务端持续触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体移速X方向的减速比例,可在脚本层被修改",
|
||
"param_name": "slowdownMultiX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体移速Y方向的减速比例,可在脚本层被修改",
|
||
"param_name": "slowdownMultiY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体移速Z方向的减速比例,可在脚本层被修改",
|
||
"param_name": "slowdownMultiZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "可由脚本层回传True给引擎,阻止触发后续原版逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加当实体碰撞盒所在区域有方块时服务端持续触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "StoreBuySuccServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家游戏内购买商品时服务端抛出的事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "购买商品的玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家游戏内购买商品时服务端抛出的事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "lobbyGoodBuySucServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家登录联机大厅服务器,或者联机大厅游戏内购买商品时触发。如果是玩家登录,触发时玩家客户端已经触发了UiInitFinished事件",
|
||
"doc_class_path": [
|
||
"联机大厅"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "购买商品的玩家实体id",
|
||
"param_name": "eid",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家登录时为False,玩家购买了商品时为True",
|
||
"param_name": "buyItem",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家联机大厅登录或者联机大厅游戏内购买商品时服务端抛出的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityChangeDimensionServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "实体维度改变时服务端抛出",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度改变前的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度改变后的维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置x",
|
||
"param_name": "fromX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Y",
|
||
"param_name": "fromY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Z",
|
||
"param_name": "fromZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置x",
|
||
"param_name": "toX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Y",
|
||
"param_name": "toY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Z",
|
||
"param_name": "toZ",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "实体维度改变时服务端抛出",
|
||
"operation": "新增",
|
||
"version": "1.19.0",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "StartDestroyBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家开始挖方块时触发。创造模式下不触发。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块的坐标",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(float,float,float)"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可阻止玩家进入挖方块的状态。需要与StartDestroyBlockClientEvent一起修改。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块被敲击面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家开始挖方块的事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增face参数",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "ljj"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ExtinguishFireServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家扑灭火焰时触发。下雨,倒水等方式熄灭火焰不会触发。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "火焰方块的坐标",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(float,float,float)"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可阻止玩家扑灭火焰。需要与ExtinguishFireClientEvent一起修改。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家扑灭火焰事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityEffectDamageServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "生物受到状态伤害/回复事件。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害值(伤害吸收后实际扣血量),负数表示生命回复量",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "状态类型,参考[AttributeBuffType](../枚举值/AttributeBuffType.md)",
|
||
"param_name": "attributeBuffType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "状态持续时间,单位秒(s)",
|
||
"param_name": "duration",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "状态生命时间,单位秒(s)",
|
||
"param_name": "lifeTimer",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否为立即生效状态",
|
||
"param_name": "isInstantaneous",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)",
|
||
"param_name": "cause",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物受到状态伤害事件。",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "新增cause参数,标明伤害来源,详见Minecraft枚举值文档的[ActorDamageCause](../枚举值/ActorDamageCause.md)。",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "cxz"
|
||
},
|
||
{
|
||
"comment": "damage改为浮点型",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnCommandOutputServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "Command命令执行成功事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "命令名称",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "命令返回的消息",
|
||
"param_name": "message",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "Command命令执行成功事件。",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnRainLevelChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "下雨强度发生改变",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "改变前的下雨强度",
|
||
"param_name": "oldLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的下雨强度",
|
||
"param_name": "newLevel",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "下雨强度改变事件。",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnLightningLevelChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "打雷强度发生改变",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "改变前的打雷强度",
|
||
"param_name": "oldLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的打雷强度",
|
||
"param_name": "newLevel",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "打雷强度改变事件。",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnLocalRainLevelChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "独立维度天气下雨强度发生改变时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "改变前的下雨强度",
|
||
"param_name": "oldLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的下雨强度",
|
||
"param_name": "newLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "独立天气维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "独立维度天气下雨强度发生改变时触发",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnLocalLightningLevelChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "独立维度天气打雷强度发生改变时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "改变前的打雷强度",
|
||
"param_name": "oldLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的打雷强度",
|
||
"param_name": "newLevel",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "独立天气维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "独立维度天气打雷强度发生改变时触发",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerTrySleepServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家尝试使用床睡觉",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否取消(开发者传入)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家尝试使用床睡觉。",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerSleepServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家使用床睡觉成功",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家使用床睡觉成功。",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerStopSleepServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家停止睡觉",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家停止睡觉",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnItemPutInEnchantingModelServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家将可附魔物品放到附魔台上时",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id,参数类型为str",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家放入物品的EnchantSlotType",
|
||
"param_name": "slotType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "附魔台选项",
|
||
"param_name": "options",
|
||
"param_type": "list"
|
||
},
|
||
{
|
||
"param_comment": "传入True时,附魔台选项会被新传入的options覆盖",
|
||
"param_name": "change",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家将可附魔物品放到附魔台上时的事件,可修改此时附魔台的选项",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "liaoyi"
|
||
},
|
||
{
|
||
"comment": "playerId的参数类型改为str",
|
||
"operation": "调整",
|
||
"version": "2.0",
|
||
"author": "xujiarong02"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "HealthChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "生物生命值发生变化时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "变化前的生命值",
|
||
"param_name": "from",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "变化后的生命值",
|
||
"param_name": "to",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否通过SetAttrValue或SetAttrMaxValue调用产生的变化",
|
||
"param_name": "byScript",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物生命值发生变化的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "HealthChangeBeforeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "生物生命值发生变化之前触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "变化前的生命值",
|
||
"param_name": "from",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "将要变化到的生命值,cancel设置为True时可以取消该变化,但是此参数不变",
|
||
"param_name": "to",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否通过SetAttrValue或SetAttrMaxValue调用产生的变化",
|
||
"param_name": "byScript",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否取消该变化",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物生命值发生变化之前的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "gmy"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockLiquidStateChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:方块转为含水或者脱离含水(流体)前触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否转为含水,true则转为含水,false则脱离含水",
|
||
"param_name": "turnLiquid",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "方块转为含水或者脱离含水(流体)前触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockLiquidStateChangeAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:方块转为含水或者脱离含水(流体)后触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否转为含水,true则转为含水,false则脱离含水",
|
||
"param_name": "turnLiquid",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "方块转为含水或者脱离含水(流体)后触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockSnowStateChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:方块转为含雪或者脱离含雪前触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否转为含雪,true则转为含雪,false则脱离含雪",
|
||
"param_name": "turnSnow",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块进入脱离含雪的原因,参考[SetBlockType](../枚举值/SetBlockType.md)",
|
||
"param_name": "setBlockType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "方块转为含雪或者脱离含雪前触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockSnowStateChangeAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:方块转为含雪或者脱离含雪后触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否转为含雪,true则转为含雪,false则脱离含雪",
|
||
"param_name": "turnSnow",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块进入脱离含雪的原因,参考[SetBlockType](../枚举值/SetBlockType.md)",
|
||
"param_name": "setBlockType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "方块转为含雪或者脱离含雪后触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityDroppedItemServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:生物扔出物品时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生物Id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "扔出的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "物品实体Id",
|
||
"param_name": "itemEntityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物扔出物品时触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "xiegang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "EntityPickupItemServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "有minecraft:behavior.pickup_items行为的生物拾取物品时触发该事件,例如村民拾取面包、猪灵拾取金锭",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生物Id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "拾取的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "物品给予者id(一般是玩家),如果不存在给予者的话,这里为空字符串",
|
||
"param_name": "secondaryActor",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物拾取物品时触发的事件(玩家不触发)",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "xiegang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnPlayerBlockedByShieldBeforeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家使用盾牌抵挡伤害之前触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源实体Id,没有实体返回\"-1\"",
|
||
"param_name": "sourceId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "盾牌物品字典<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "抵挡的伤害数值",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家使用盾牌抵挡伤害之前触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnPlayerBlockedByShieldAfterServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家使用盾牌抵挡伤害之后触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "伤害来源实体Id,没有实体返回\"-1\"",
|
||
"param_name": "sourceId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "盾牌物品字典<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "抵挡的伤害数值",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家使用盾牌抵挡伤害之后触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnPlayerActiveShieldServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:玩家激活/取消激活盾牌触发的事件。包括玩家持盾进入潜行状态,以及在潜行状态切换盾牌(切换耐久度不同的相同盾牌不会触发)",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "True:尝试激活,False:尝试取消激活",
|
||
"param_name": "isActive",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "盾牌物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "是否可以取消。如果玩家在潜行状态切换盾牌,则无法取消",
|
||
"param_name": "cancelable",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否取消这次激活",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家激活盾牌触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "在潜行状态切换盾牌也会触发该事件",
|
||
"operation": "调整",
|
||
"version": "2.3",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "BlockDestroyByLiquidServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:方块被水流破坏的事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "流体方块id",
|
||
"param_name": "liquidName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块id",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块所在维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "方块被水流破坏的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
},
|
||
{
|
||
"comment": "添加维度信息",
|
||
"operation": "调整",
|
||
"version": "3.3",
|
||
"author": "czk"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "FarmBlockToDirtBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:耕地退化为泥土时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "耕地退化为泥土的原因,参考[SetBlockType](../枚举值/SetBlockType.md)",
|
||
"param_name": "setBlockType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "耕地退化为泥土时触发",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "DirtBlockToGrassBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:泥土方块变成草方块时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "泥土方块变成草方块时触发",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "GrassBlockToDirtBlockServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "触发时机:草方块变成泥土方块时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "草方块变成泥土方块时触发",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerDoInteractServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家与有minecraft:interact组件的生物交互时触发该事件,例如玩家手持空桶对牛挤奶、玩家手持打火石点燃苦力怕",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "交互时使用物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "交互的生物entityId",
|
||
"param_name": "interactEntityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家与生物交互时触发的事件",
|
||
"operation": "新增",
|
||
"version": "2.1",
|
||
"author": "xiegang"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "AchievementCompleteEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家完成自定义成就时触发该事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "所属的页面的根节点成就id",
|
||
"param_name": "rootNodeId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "达成的成就id",
|
||
"param_name": "achievementId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "成就标题",
|
||
"param_name": "title",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "成就描述",
|
||
"param_name": "description",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家完成自定义成就的事件",
|
||
"operation": "新增",
|
||
"version": "2.3",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "UrgeShipEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家点击商城催促发货按钮时触发该事件",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家点击商城催促发货按钮时触发该事件",
|
||
"operation": "新增",
|
||
"version": "2.4",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "ItemDurabilityChangedServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "物品耐久度变化事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "物品拥有者的实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "变化前耐久度",
|
||
"param_name": "durabilityBefore",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化后耐久度,支持修改。但是请注意修改范围,支持范围为[-32768,32767)",
|
||
"param_name": "durability",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否支持修改,为true时支持通过durability修改,为false时不支持",
|
||
"param_name": "canChange",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品耐久度变化时触发该事件",
|
||
"operation": "新增",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "PlayerHungerChangeServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家饥饿度变化时触发该事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "变化前的饥饿度",
|
||
"param_name": "hungerBefore",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "变化后的饥饿度",
|
||
"param_name": "hunger",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "是否取消饥饿度变化",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家饥饿度变化事件",
|
||
"operation": "新增",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "OnPlayerActionServerEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家动作事件,当玩家开始/停止某些动作时触发该事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "动作事件枚举,详见Minecraft枚举值文档的[PlayerActionType](../枚举值/PlayerActionType.md)",
|
||
"param_name": "actionType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家动作事件",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
},
|
||
{
|
||
"name": "MountTamingEvent",
|
||
"path": "server.serverEvent",
|
||
"desc": "玩家通过骑乘驯服生物后触发该事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "生物id",
|
||
"param_name": "eid",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "pid",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家通过骑乘驯服生物事件",
|
||
"operation": "新增",
|
||
"version": "3.3",
|
||
"author": "lrz"
|
||
}
|
||
],
|
||
"side": "服务端"
|
||
}
|
||
],
|
||
"client.clientEvent": [
|
||
{
|
||
"name": "ClientShapedRecipeTriggeredEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家合成物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "配方id,对应配方json文件中的identifier字段",
|
||
"param_name": "recipeId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StepOnBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:实体刚移动至一个新实心方块时触发。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否允许触发,默认为False,若设为True,可阻止触发后续原版逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发的entity的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "重大触发机制调整、备注说明更新",
|
||
"operation": "调整",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
},
|
||
{
|
||
"comment": "新增维度id参数",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StepOffBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:实体移动离开一个实心方块时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发的entity的唯一ID",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增实体移动离开一个实心方块时触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StartRidingClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:一个实体即将骑乘另外一个实体",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "骑乘者的唯一ID",
|
||
"param_name": "actorId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "被骑乘实体的唯一ID",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "删除cancel参数,客户端触发事件时,玩家已经上马",
|
||
"operation": "调整",
|
||
"version": "2.3",
|
||
"author": "xusifan"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ApproachEntityClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家靠近生物时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "靠近的生物实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "LeaveEntityClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家远离生物时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "远离的生物实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnGroundClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "实体着地事件。玩家,沙子,铁砧,掉落的物品,点燃的TNT掉落地面时触发,其余实体着地不触发。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AttackAnimBeginClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "攻击动作开始时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AttackAnimEndClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "攻击动作结束时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "WalkAnimBeginClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "走路动作开始时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "WalkAnimEndClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "走路动作结束时触发",
|
||
"doc_class_path": [
|
||
"模型"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AddEntityClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端侧创建新实体时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体维度",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否为幼儿",
|
||
"param_name": "isBaby",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "实体类型",
|
||
"param_name": "engineTypeStr",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品identifier(仅当物品实体时存在该字段)",
|
||
"param_name": "itemName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品附加值(仅当物品实体时存在该字段)",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增actor实体加入玩家区块范围触发的AOI事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "RemoveEntityClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端侧实体被移除时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "移除的实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增actor实体离开玩家区块范围触发的AOI事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GetEntityByCoordEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击屏幕时触发,多个手指点在屏幕上时,只有第一个会触发。",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PushScreenEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "screen创建触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "UI名字",
|
||
"param_name": "screenName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "包含命名空间的UI名字,格式为namespace.screenName",
|
||
"param_name": "screenDef",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增screenDef参数,返回包含命名空间的UI名字",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PopScreenEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "screen移除触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "UI名字",
|
||
"param_name": "screenName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "包含命名空间的UI名字,格式为namespace.screenName",
|
||
"param_name": "screenDef",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增screenDef参数,返回包含命名空间的UI名字",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PopScreenAfterClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "screen移除触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "UI名字",
|
||
"param_name": "screenName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "包含命名空间的UI名字,格式为namespace.screenName",
|
||
"param_name": "screenDef",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增PopScreenAfterClientEvent,当弹出动作全部完成时触发",
|
||
"operation": "新增",
|
||
"version": "2.6",
|
||
"author": "cxz"
|
||
},
|
||
{
|
||
"comment": "新增screenDef参数,返回包含命名空间的UI名字",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "UiInitFinished",
|
||
"path": "client.clientEvent",
|
||
"desc": "UI初始化框架完成,此时可以创建UI",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientPlayerInventoryOpenEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "打开物品背包界面时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "是否是创造模式背包界面",
|
||
"param_name": "isCreative",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "取消打开物品背包界面",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增cancel参数",
|
||
"operation": "调整",
|
||
"version": "1.19",
|
||
"author": "why117"
|
||
},
|
||
{
|
||
"comment": "新增isCreative参数",
|
||
"operation": "调整",
|
||
"version": "1.23",
|
||
"author": "xltang"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientPlayerInventoryCloseEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "关闭物品背包界面时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientChestOpenEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "打开箱子界面时触发,包括小箱子,合并后大箱子和末影箱(实体容器不属于方块,不会触发该事件)",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "箱子位置x值",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "箱子位置y值",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "箱子位置z值",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "末影龙箱子修改为末影箱,补充实体容器相关描述",
|
||
"operation": "修复",
|
||
"version": "2.12",
|
||
"author": "qiuyukun"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientChestCloseEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "关闭箱子界面时触发,包括小箱子,合并后大箱子和末影箱(实体容器不属于方块,不会触发该事件)",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "末影龙箱子修改为末影箱,补充实体容器相关描述",
|
||
"operation": "修复",
|
||
"version": "2.12",
|
||
"author": "qiuyukun"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "CloseNeteaseShopEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "关闭商城界面时触发,包括脚本商城和Apollo插件商城",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家关闭商城界面的时候抛出的事件",
|
||
"operation": "新增",
|
||
"version": "2.6",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlayerChatButtonClickClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击聊天按钮或回车键触发呼出聊天窗口时客户端抛出的事件",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家点击聊天按钮或回车键触发呼出聊天窗口时客户端抛出的事件",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "pl"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientItemTryUseEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击右键尝试使用物品时客户端抛出的事件,可以通过设置cancel为True取消使用物品。注:如果需要取消物品的使用需要同时在ClientItemTryUseEvent和ServerItemTryUseEvent中将cancel设置为True才能正确取消。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "取消使用物品",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字段",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientItemUseOnEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家在对方块使用物品时客户端抛出的事件。注:如果需要取消物品的使用需要同时在ClientItemUseOnEvent和ServerItemUseOnEvent中将ret设置为True才能正确取消。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "方块 x 坐标值",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 y 坐标值",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块 z 坐标值",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "blockAuxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击方块的面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "设为True可取消物品的使用",
|
||
"param_name": "ret",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字段",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增blockName、blockAuxValue、face参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnCarriedNewItemChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "手持物品发生变化时,触发该事件;数量改变不会通知",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "切换后物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnItemSlotButtonClickedEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "点击快捷栏、背包栏、盔甲栏、副手栏的物品槽时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "点击的物品槽的编号,编号对应位置详见[<a href=\"https://minecraft.fandom.com/zh/wiki/%E7%89%A9%E5%93%81%E6%A0%8F\">物品栏</a>]",
|
||
"param_name": "slotIndex",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加盔甲栏、副手栏触发",
|
||
"operation": "调整",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnScriptTickClient",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端tick事件,1秒30次",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "LoadClientAddonScriptsAfter",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端加载mod完成事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "UnLoadClientAddonScriptsBefore",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端卸载mod之前触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PrimaryClientSyncSkinClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "主客户端自己更换了皮肤触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "主客户端自己更换了皮肤触发",
|
||
"operation": "新增",
|
||
"version": "2.12",
|
||
"author": "bl"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnKeyPressInGame",
|
||
"path": "client.clientEvent",
|
||
"desc": "按键按下或按键释放时触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "当前screenName",
|
||
"param_name": "screenName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "键码(注:这里的int型被转成了str型,比如\"1\"对应的就是枚举值文档中的1),详见[KeyBoardType枚举](../枚举值/KeyBoardType.md)|",
|
||
"param_name": "key",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否按下,按下为1,弹起为0",
|
||
"param_name": "isDown",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientJumpButtonPressDownEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "跳跃按钮按下事件,返回值设置参数只对当次按下事件起作用",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "设置是否执行跳跃逻辑",
|
||
"param_name": "continueJump",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientJumpButtonReleaseEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "跳跃按钮按下释放事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnClientPlayerStartMove",
|
||
"path": "client.clientEvent",
|
||
"desc": "移动按钮按下触发事件,在按住一个方向键的同时,去按另外一个方向键,不会触发第二次",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnClientPlayerStopMove",
|
||
"path": "client.clientEvent",
|
||
"desc": "移动按钮按下释放时触发事件,同时按下多个方向键,需要释放所有的方向键才会触发事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "TapBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击屏幕并松手,即将响应到游戏内时触发。仅在移动端或pc的F11模式下触发。pc的非F11模式可以监听[LeftClickBeforeClientEvent](#leftclickbeforeclientevent)事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "设置为True可拦截原版的攻击或放置响应",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家短按屏幕事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "HoldBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家长按屏幕,即将响应到游戏内时触发。仅在移动端或pc的F11模式下触发。pc的非F11模式可以监听[RightClickBeforeClientEvent](#rightclickbeforeclientevent)事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "设置为True可拦截原版的挖方块/使用物品/与实体交互响应",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家长按屏幕事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "TapOrHoldReleaseClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击屏幕后松手时触发。仅在移动端或pc的F11模式下触发。pc的非F11模式可以使用[LeftClickReleaseClientEvent](#leftclickreleaseclientevent)与[RightClickReleaseClientEvent](#rightclickreleaseclientevent)事件监听鼠标松开",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家点击屏幕松手事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "LeftClickBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家按下攻击/摧毁键时触发,例如鼠标左键、新触控攻击键、手柄右扳机键。鼠标左键仅在pc的普通控制模式(即非F11模式)下触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "设置为True可拦截原版的挖方块或攻击响应",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标左键点击事件,代替OnClickInGame事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "LeftClickReleaseClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家松开攻击/摧毁键时触发,例如鼠标左键、新触控攻击键、手柄右扳机键。鼠标左键仅在pc的普通控制模式(即非F11模式)下触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标左键松开事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "RightClickBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家按下使用物品/放置方块键时触发,例如鼠标右键、新触控交互键、手柄左扳机键",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "设置为True可拦截原版的物品使用/实体交互响应",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标右键点击事件,代替OnClickInGame事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "RightClickReleaseClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家松开使用物品/放置方块键时触发,例如鼠标右键、新触控交互键、手柄左扳机键",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标右键松开事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnBackButtonReleaseClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "返回按钮(目前特指安卓系统导航中的返回按钮)松开时触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "返回按钮松开事件",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "MouseWheelClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "鼠标滚轮滚动时触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "1为向上滚动,0为向下滚动",
|
||
"param_name": "direction",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标滚轮滚动事件",
|
||
"operation": "新增",
|
||
"version": "2.5",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnGamepadKeyPressClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "游戏手柄按键事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "当前screenName",
|
||
"param_name": "screenName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "键码,详见[GamepadKeyType枚举](../枚举值/GamepadKeyType.md)",
|
||
"param_name": "key",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否按下,按下为1,弹起为0",
|
||
"param_name": "isDown",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "游戏手柄按键事件",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnGamepadStickClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "游戏手柄摇杆事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "键码,详见[GamepadKeyType枚举](../枚举值/GamepadKeyType.md)",
|
||
"param_name": "key",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "摇杆水平方向的值,从左到右取值为 -1.0 ~ 1.0",
|
||
"param_name": "x",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "摇杆竖直方向的值,从下到上取值为 -1.0 ~ 1.0",
|
||
"param_name": "y",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "游戏手柄摇杆事件",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnGamepadTriggerClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "游戏手柄扳机事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "键码,详见[GamepadKeyType枚举](../枚举值/GamepadKeyType.md)",
|
||
"param_name": "key",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "扣动扳机的力度,取值为 0 ~ 1.0",
|
||
"param_name": "magnitude",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "游戏手柄扳机事件",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnGamepadControllerLayoutChangeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "游戏手柄按键映射改变事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "行为",
|
||
"param_name": "action",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改后的键码,详见[GamepadKeyType枚举](../枚举值/GamepadKeyType.md)",
|
||
"param_name": "newKey",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "修改前的键码,详见[GamepadKeyType枚举](../枚举值/GamepadKeyType.md)",
|
||
"param_name": "oldKey",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "游戏手柄按键映射改变事件",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnKeyboardControllerLayoutChangeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "键盘按键映射改变事件",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "行为",
|
||
"param_name": "action",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改后的键码,详见[KeyBoardType枚举](../枚举值/KeyBoardType.md)",
|
||
"param_name": "newKey",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "修改前的键码,详见[KeyBoardType枚举](../枚举值/KeyBoardType.md)",
|
||
"param_name": "oldKey",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "键盘按键映射改变事件",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnMouseMiddleDownClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "鼠标按下中键时触发",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "1为按下,0为弹起",
|
||
"param_name": "isDown",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "按下时的x坐标",
|
||
"param_name": "mousePositionX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "按下时的y坐标",
|
||
"param_name": "mousePositionY",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "鼠标中键点击事件",
|
||
"operation": "新增",
|
||
"version": "2.5",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StartUsingItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家使用物品(目前仅支持Bucket(奶桶)、Trident(三叉戟)、RangedWeapon(弓)、Food(食物)、Potion(药水)、Crossbow(弩))时抛出",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字段",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StopUsingItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家停止使用物品(目前仅支持Bucket(奶桶)、Trident(三叉戟)、RangedWeapon(弓)、Food(食物)、Potion(药水)、Crossbow(弩))时抛出",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字段",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AnvilCreateResultItemAfterClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击铁砧合成得到的物品时抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "合成后的物品显示名称",
|
||
"param_name": "itemShowName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "合成后的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "合成前的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>(铁砧内第一个物品)",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "合成所使用材料的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>(铁砧内第二个物品)",
|
||
"param_name": "materialItemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家点击铁砧合成的物品时抛出的事件",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "likaiyu"
|
||
},
|
||
{
|
||
"comment": "返回值新增合成前两个物品的物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "liaoyi"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "CraftUpdateResultItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家工作台界面更新显示可合成物品时抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "合成后的物品的[<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>]",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "解决nostate的warning",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "bailei"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GrindStoneRemovedEnchantClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击砂轮合成得到的物品时抛出的事件",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "合成前的物品<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>(砂轮内第一个物品)",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "作为合成材料的物品<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>(砂轮内第二个物品)",
|
||
"param_name": "additionalItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "合成后的物品<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "本次合成返还的经验",
|
||
"param_name": "exp",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增玩家点击砂轮合成得到的物品事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "liaoyi"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "DimensionChangeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家维度改变时客户端抛出",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度改变前的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度改变后的维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置x",
|
||
"param_name": "fromX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Y",
|
||
"param_name": "fromY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变前的位置Z",
|
||
"param_name": "fromZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置x",
|
||
"param_name": "toX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Y",
|
||
"param_name": "toY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "改变后的位置Z",
|
||
"param_name": "toZ",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "DimensionChangeFinishClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家维度改变完成后客户端抛出",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "维度改变前的维度",
|
||
"param_name": "fromDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度改变后的维度",
|
||
"param_name": "toDimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": " 改变后的位置x,y,z,其中y值为脚底加上角色的身高值",
|
||
"param_name": "toPos",
|
||
"param_type": "tuple(float,float,float)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增玩家改变维度事件",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "sutao"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ActorAcquiredItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家获得物品时客户端抛出的事件(有些获取物品方式只会触发客户端事件,有些获取物品方式只会触发服务端事件,在使用时注意一点。)",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "获得物品玩家实体id",
|
||
"param_name": "actor",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品给予者玩家实体id,如果不存在给予者的话,这里为空字符串",
|
||
"param_name": "secondaryActor",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "获取到的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "获得物品的方法,详见[ItemAcquisitionMethod](../枚举值/ItemAcquisitionMethod.md)",
|
||
"param_name": "acquireMethod",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "修复了与村民交易时会触发两次的问题",
|
||
"operation": "修复",
|
||
"version": "1.24",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ActorUseItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家使用物品时客户端抛出的事件(比较特殊不走该事件的例子:1)染料对有水的炼药锅使用;2)盔甲架装备盔甲);3)喝牛奶",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "使用物品的方法,详见[ItemUseMethodEnum枚举](../枚举值/ItemUseMethodEnum.md)",
|
||
"param_name": "useMethod",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ClientBlockUseEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家右键点击新版自定义方块(或者通过接口AddBlockItemListenForUseEvent增加监听的MC原生游戏方块)时客户端抛出该事件(该事件tick执行,需要注意效率问题)。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "aux",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可拦截与方块交互的逻辑。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "点击点的x比例位置",
|
||
"param_name": "clickX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的y比例位置",
|
||
"param_name": "clickY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "点击点的z比例位置",
|
||
"param_name": "clickZ",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增clickX,clickY,clickZ参数,可获取点击点的比例位置",
|
||
"operation": "调整",
|
||
"version": "3.2",
|
||
"author": "lrz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlayerTryDestroyBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "当玩家即将破坏方块时,客户端线程触发该事件。主要用于床,旗帜,箱子这些根据方块实体数据进行渲染的方块,一般情况下请使用ServerPlayerTryDestroyBlockEvent",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块x坐标",
|
||
"param_name": "x",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块y坐标",
|
||
"param_name": "y",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块z坐标",
|
||
"param_name": "z",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块被敲击的面向id,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "试图破坏方块的玩家ID",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "默认为False,在脚本层设置为True就能取消该方块的破坏",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "参数新增方块被敲击的面向id",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ShearsDestoryBlockBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家手持剪刀破坏方块时,有剪刀特殊效果的方块会在客户端线程触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块附加值",
|
||
"param_name": "auxData",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物identifier,包含命名空间及名称",
|
||
"param_name": "dropName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的掉落物数量",
|
||
"param_name": "dropCount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发剪刀效果的玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "玩家触发时的维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否取消剪刀效果",
|
||
"param_name": "cancelShears",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加玩家手持剪刀破坏方块时事件,可取消剪刀效果",
|
||
"operation": "新增",
|
||
"version": "1.23",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "FallingBlockCauseDamageBeforeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当下落的方块开始计算砸到实体的伤害时,客户端触发该事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "下落的方块实体id",
|
||
"param_name": "fallingBlockId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置x",
|
||
"param_name": "fallingBlockX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置y",
|
||
"param_name": "fallingBlockY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体位置z",
|
||
"param_name": "fallingBlockZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "重力方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "当前碰撞到的实体列表id(客户端只能获取到玩家),如果没有的话是None",
|
||
"param_name": "collidingEntitys",
|
||
"param_type": "list(str)"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少tick",
|
||
"param_name": "fallTickAmount",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "下落的方块实体持续下落了多少距离",
|
||
"param_name": "fallDistance",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "客户端始终为false,因为客户端不会计算伤害值",
|
||
"param_name": "isHarmful",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "对实体的伤害",
|
||
"param_name": "fallDamage",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加下落的方块计算砸实体伤害的事件,可修改部分属性",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnAfterFallOnBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当实体降落到方块后客户端触发,主要用于力的计算",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动X方向的力",
|
||
"param_name": "motionX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Y方向的力",
|
||
"param_name": "motionY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Z方向的力",
|
||
"param_name": "motionZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否按脚本层传值计算力",
|
||
"param_name": "calculate",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加实体刚降落到方块上时客户端触发的事件,主要用于力的计算",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnStandOnBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当实体站立到方块上时客户端持续触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体所在维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体位置x",
|
||
"param_name": "posX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置y",
|
||
"param_name": "posY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体位置z",
|
||
"param_name": "posZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动X方向的力",
|
||
"param_name": "motionX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Y方向的力",
|
||
"param_name": "motionY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "瞬时移动Z方向的力",
|
||
"param_name": "motionZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "可由脚本层回传True给引擎,阻止触发后续原版逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加当实体站立到方块上时客户端持续触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.24",
|
||
"author": "likaiyu"
|
||
},
|
||
{
|
||
"comment": "新增cancel、dimensionId参数",
|
||
"operation": "调整",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnEntityInsideBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当实体碰撞盒所在区域有方块时,客户端持续触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "实体所在维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "实体移速X方向的减速比例",
|
||
"param_name": "slowdownMultiX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体移速Y方向的减速比例",
|
||
"param_name": "slowdownMultiY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "实体移速Z方向的减速比例",
|
||
"param_name": "slowdownMultiZ",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "方块位置x",
|
||
"param_name": "blockX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置y",
|
||
"param_name": "blockY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块位置z",
|
||
"param_name": "blockZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "可由脚本层回传True给引擎,阻止触发后续原版逻辑",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加当实体碰撞盒所在区域有方块时客户端持续触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnMusicStopClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "音乐停止时,当玩家调用StopCustomMusic来停止自定义背景音乐时,会触发该事件",
|
||
"doc_class_path": [
|
||
"音效"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "音乐名称",
|
||
"param_name": "musicName",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlaySoundClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "播放场景音效或UI音效时触发",
|
||
"doc_class_path": [
|
||
"音效"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "即资源包中sounds/sound_definitions.json中的key",
|
||
"param_name": "name",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "音效播放的位置。UI音效为(0,0,0)",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(float,float,float)"
|
||
},
|
||
{
|
||
"param_comment": "音量,范围为0-1",
|
||
"param_name": "volume",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "播放速度,正常速度为1",
|
||
"param_name": "pitch",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "设为True可屏蔽该次音效播放",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "播放场景音效或UI音效事件",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlayMusicClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "播放背景音乐时触发",
|
||
"doc_class_path": [
|
||
"音效"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "即资源包中sounds/music_definitions.json中的event_name,并且对应sounds/sound_definitions.json中的key",
|
||
"param_name": "name",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "设为True可屏蔽该次音效播放",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "播放背景音乐事件",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnPlayerHitBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:通过OpenPlayerHitBlockDetection打开方块碰撞检测后,当玩家碰撞到方块时触发该事件。玩家着地时会触发OnGroundClientEvent,而不是该事件。客户端和服务端分别作碰撞检测,可能两个事件返回的结果略有差异。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "碰撞到方块的玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块x坐标",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块y坐标",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块z坐标",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的identifier",
|
||
"param_name": "blockId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "碰撞方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增auxValue参数",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnMobHitMobClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:通过OpenPlayerHitMobDetection打开生物碰撞检测后,当生物间(包含玩家)碰撞时触发该事件。注:客户端和服务端分别作碰撞检测,可能两个事件返回的略有差异。",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "当前生物的id",
|
||
"param_name": "mobId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "当前生物碰撞到的其他所有生物id的list",
|
||
"param_name": "hittedMobList",
|
||
"param_type": "list[str]"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物碰撞事件",
|
||
"operation": "新增",
|
||
"version": "2.2",
|
||
"author": "wdd"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnLocalPlayerStopLoading",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家进入存档,出生点地形加载完成时触发。该事件触发时可以进行切换维度的操作。",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "加载完成的玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ItemReleaseUsingClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:释放正在使用的物品",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "蓄力剩余时间(当物品缺少\"minecraft:maxduration\"组件时,蓄力剩余时间为负数)",
|
||
"param_name": "durationLeft",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "使用的物品的<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "最大蓄力时长",
|
||
"param_name": "maxUseDuration",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消,需要同时取消服务端事件[ItemReleaseUsingServerEvent](#itemreleaseusingserverevent)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "释放正在使用的物品事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
},
|
||
{
|
||
"comment": "物品相关参数改为物品信息字典",
|
||
"operation": "调整",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "InventoryItemChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家背包物品变化时客户端抛出的事件。",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家实体id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "背包槽位",
|
||
"param_name": "slot",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "变化前槽位中的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "oldItemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "变化后槽位中的物品,格式参考<a href=\"../../../mcguide/20-玩法开发/10-基本概念/1-我的世界基础概念.html#物品信息字典#物品信息字典\">物品信息字典</a>",
|
||
"param_name": "newItemDict",
|
||
"param_type": "dict"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家背包物品变化时的客户端事件",
|
||
"operation": "新增",
|
||
"version": "1.22",
|
||
"author": "jishaobin"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "EntityStopRidingEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当实体停止骑乘时",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "id",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "坐骑id",
|
||
"param_name": "rideId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "是否下坐骑",
|
||
"param_name": "exitFromRider",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "坐骑是否将要销毁",
|
||
"param_name": "entityIsBeingDestroyed",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "是否换乘坐骑",
|
||
"param_name": "switchingRides",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "设置为True可以取消(需要与服务端事件一同取消)",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "支持取消下马操作",
|
||
"operation": "调整",
|
||
"version": "1.18",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GridComponentSizeChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:UI grid组件里格子数目发生变化时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "grid网格所在的路径(从UI根节点算起)",
|
||
"param_name": "path",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增grid控件size大小发生变化触发的事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
},
|
||
{
|
||
"comment": "增加path参数,grid网格所在的路径(从UI根节点算起)",
|
||
"operation": "调整",
|
||
"version": "2.9",
|
||
"author": "hdy"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AddPlayerAOIClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家加入游戏或者其余玩家进入当前玩家视野时触发的事件,替换AddPlayerEvent",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加客户端玩家进入区块的AOI事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AddPlayerCreatedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家进入当前玩家所在的区块AOI后,玩家皮肤数据异步加载完成后触发的事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加客户端其他玩家进入区块AOI后资源加载完成的事件",
|
||
"operation": "新增",
|
||
"version": "2.3",
|
||
"author": "wdd"
|
||
},
|
||
{
|
||
"comment": "调整事件触发时机,并对localPlayer也起效",
|
||
"operation": "调整",
|
||
"version": "2.4",
|
||
"author": "wangdingdong"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "RemovePlayerAOIClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家离开当前玩家视野时触发的事件",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加客户端玩家离开区块的AOI事件",
|
||
"operation": "新增",
|
||
"version": "1.18",
|
||
"author": "why117"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnCommandOutputClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "当command命令有成功消息输出时触发",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "命令名称",
|
||
"param_name": "command",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "命令返回的消息",
|
||
"param_name": "message",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "增加命令及命令组件有返回值时事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "lidi"
|
||
},
|
||
{
|
||
"comment": "分类从“玩家”改为“世界”",
|
||
"operation": "调整",
|
||
"version": "1.21",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GetEntityByCoordReleaseClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家点击屏幕后松开时触发,多个手指点在屏幕上时,只有最后一个手指松开时触发。",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "点击屏幕后松开事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ChunkLoadedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:客户端区块加载完成时",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "区块所在维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的x坐标,对应方块X坐标区间为[x * 16, x * 16 + 15]",
|
||
"param_name": "chunkPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的z坐标,对应方块Z坐标区间为[z * 16, z * 16 + 15]",
|
||
"param_name": "chunkPosZ",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "在监听白名单内的客户端区块加载完成事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "liaoyi"
|
||
},
|
||
{
|
||
"comment": "该事件不再需要添加区块白名单",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ChunkAcquireDiscardedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:客户端区块即将被卸载时",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "区块所在维度",
|
||
"param_name": "dimension",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的x坐标,对应方块X坐标区间为[x * 16, x * 16 + 15]",
|
||
"param_name": "chunkPosX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "区块的z坐标,对应方块Z坐标区间为[z * 16, z * 16 + 15]",
|
||
"param_name": "chunkPosZ",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "在监听白名单内的客户端区块即将被卸载事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "liaoyi"
|
||
},
|
||
{
|
||
"comment": "该事件不再需要添加区块白名单",
|
||
"operation": "调整",
|
||
"version": "1.24",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GameTypeChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "个人游戏模式发生变化时客户端触发。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家Id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "切换前的游戏模式",
|
||
"param_name": "oldGameType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "切换后的游戏模式",
|
||
"param_name": "newGameType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "个人游戏模式发生变化事件",
|
||
"operation": "新增",
|
||
"version": "1.19",
|
||
"author": "gzhuabo"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "StartDestroyBlockClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家开始挖方块时触发。创造模式下不触发。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块的坐标",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(float,float,float)"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "方块的附加值",
|
||
"param_name": "auxValue",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可阻止玩家进入挖方块的状态。需要与StartDestroyBlockServerEvent一起修改。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
},
|
||
{
|
||
"param_comment": "方块被敲击面,参考[Facing枚举](../枚举值/Facing.md)",
|
||
"param_name": "face",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家开始挖方块的事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
},
|
||
{
|
||
"comment": "新增face参数",
|
||
"operation": "调整",
|
||
"version": "2.11",
|
||
"author": "ljj"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ExtinguishFireClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家扑灭火焰时触发。下雨,倒水等方式熄灭火焰不会触发。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "火焰方块的坐标",
|
||
"param_name": "pos",
|
||
"param_type": "tuple(float,float,float)"
|
||
},
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "修改为True时,可阻止玩家扑灭火焰。需要与ExtinguishFireServerEvent一起修改。",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家扑灭火焰事件",
|
||
"operation": "新增",
|
||
"version": "1.20",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PerspChangeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "视角切换时会触发的事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "切换前的视角",
|
||
"param_name": "from",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "切换后的视角",
|
||
"param_name": "to",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "视角切换事件",
|
||
"operation": "新增",
|
||
"version": "1.21",
|
||
"author": "sutao"
|
||
},
|
||
{
|
||
"comment": "修复了在设置界面切换视角时不会触发该事件的问题",
|
||
"operation": "修复",
|
||
"version": "1.25",
|
||
"author": "likaiyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ScreenSizeChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "改变屏幕大小时会触发的事件",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "屏幕大小改变前的宽度",
|
||
"param_name": "beforeX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "屏幕大小改变前的高度",
|
||
"param_name": "beforeY",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "屏幕大小改变后的宽度",
|
||
"param_name": "afterX",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "屏幕大小改变后的高度",
|
||
"param_name": "afterY",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "屏幕大小改变事件",
|
||
"operation": "新增",
|
||
"version": "2.5",
|
||
"author": "dengruitao"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlayerTryDropItemClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:玩家丢弃物品时触发",
|
||
"doc_class_path": [
|
||
"物品"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "物品dict",
|
||
"param_name": "itemDict",
|
||
"param_type": "dict"
|
||
},
|
||
{
|
||
"param_comment": "是否取消此次操作",
|
||
"param_name": "cancel",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增客户端玩家尝试丢弃物品的事件。",
|
||
"operation": "新增",
|
||
"version": "1.25",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnModBlockNeteaseEffectCreatedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "自定义方块实体绑定的特效创建成功事件,在自定义方块实体中绑定的特效创建成功时触发以及使用接口CreateFrameEffectForBlockEntity或CreateParticleEffectForBlockEntity为自定义方块实体添加特效成功时触发。",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "创建成功的特效的自定义键值名称",
|
||
"param_name": "effectName",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "该特效的id",
|
||
"param_name": "id",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该特效的类型,0为粒子特效,1为序列帧特效",
|
||
"param_name": "effectType",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "该特效绑定的自定义方块实体的世界坐标",
|
||
"param_name": "blockPos",
|
||
"param_type": "tuple(float,float,float)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "自定义方块实体绑定的特效创建成功事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "xujiarong02"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "HealthChangeClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "生物生命值发生变化时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "变化前的生命值",
|
||
"param_name": "from",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "变化后的生命值",
|
||
"param_name": "to",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "生物生命值发生变化的事件",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "czh"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "EntityModelChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:实体模型切换时触发",
|
||
"doc_class_path": [
|
||
"实体"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "实体id",
|
||
"param_name": "entityId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "新的模型名字",
|
||
"param_name": "newModel",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "原来的模型名字",
|
||
"param_name": "oldModel",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "新增实体模型切换时触发的事件。",
|
||
"operation": "新增",
|
||
"version": "2.0",
|
||
"author": "guanmingyu"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "CameraMotionStartClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "相机运动器开始事件。相机添加运动器后,运动器开始运行时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "运动器id",
|
||
"param_name": "motionId",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "相机运动器开始事件",
|
||
"operation": "新增",
|
||
"version": "2.5",
|
||
"author": "wangdingdong"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "CameraMotionStopClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "相机运动器停止事件。相机添加运动器并开始运行后,运动器自动停止时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "运动器id",
|
||
"param_name": "motionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "是否移除该运动器,设置为False则保留,默认为True,即运动器停止后自动移除",
|
||
"param_name": "remove",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "相机运动器停止事件",
|
||
"operation": "新增",
|
||
"version": "2.5",
|
||
"author": "wangdingdong"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ModBlockEntityLoadedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端自定义方块实体初始化完成时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "自定义方块实体的位置X",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Y",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Z",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端自定义方块实体初始化完成时触发",
|
||
"operation": "新增",
|
||
"version": "2.8",
|
||
"author": "yangzhiwei"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ModBlockEntityRemoveClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端自定义方块实体卸载时触发",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "自定义方块实体的位置X",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Y",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Z",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端自定义方块实体卸载时触发",
|
||
"operation": "新增",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "ModBlockEntityTickClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端自定义方块实体tick事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "自定义方块实体的位置X",
|
||
"param_name": "posX",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Y",
|
||
"param_name": "posY",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "自定义方块实体的位置Z",
|
||
"param_name": "posZ",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "维度id",
|
||
"param_name": "dimensionId",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "方块的identifier,包含命名空间及名称",
|
||
"param_name": "blockName",
|
||
"param_type": "str"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端自定义方块实体tick事件,每秒20次",
|
||
"operation": "新增",
|
||
"version": "2.10",
|
||
"author": "xsf"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "AchievementButtonMovedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:使用自定义成就系统的时,拖动成就入口结束时触发",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "移动前该控件相对父节点的坐标信息,第一项为横轴,第二项为纵轴",
|
||
"param_name": "oldPosition",
|
||
"param_type": "tuple(float,float)"
|
||
},
|
||
{
|
||
"param_comment": "移动后该控件相对父节点的坐标信息,第一项为横轴,第二项为纵轴",
|
||
"param_name": "newPosition",
|
||
"param_type": "tuple(float,float)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "使用自定义成就系统的时,拖动成就入口结束时触发",
|
||
"operation": "新增",
|
||
"version": "2.9",
|
||
"author": "cxz"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GyroSensorChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:陀螺仪传感器姿态发生变化时",
|
||
"doc_class_path": [
|
||
"控制"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "x轴角速度,单位为弧度/s",
|
||
"param_name": "xDiff",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "y轴角速度,单位为弧度/s",
|
||
"param_name": "yDiff",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "z轴角速度,单位为弧度/s",
|
||
"param_name": "zDiff",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "当前屏幕朝向,0竖屏正向 1横屏向左 2竖屏倒置 3横屏向右",
|
||
"param_name": "orientation",
|
||
"param_type": "int"
|
||
},
|
||
{
|
||
"param_comment": "触发时间戳,秒",
|
||
"param_name": "timestamp",
|
||
"param_type": "float"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "陀螺仪传感器姿态发生变化事件",
|
||
"operation": "新增",
|
||
"version": "2.11",
|
||
"author": "xsf"
|
||
},
|
||
{
|
||
"comment": "新增orientation表示当前屏幕朝向",
|
||
"operation": "调整",
|
||
"version": "3.2",
|
||
"author": "qyk"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "GameRenderTickEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "客户端渲染帧开始时触发该事件,一秒触发次数为当前的帧数",
|
||
"doc_class_path": [
|
||
"世界"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端渲染帧开始时触发",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "gx"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnLocalPlayerStartJumpClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "本地玩家开始跳跃时触发",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家开始跳跃事件",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "OnLocalPlayerActionClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "玩家动作事件,当本地玩家开始/停止某些动作时触发该事件",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "动作事件枚举,详见Minecraft枚举值文档的[PlayerActionType](../枚举值/PlayerActionType.md)",
|
||
"param_name": "actionType",
|
||
"param_type": "int"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "玩家动作事件",
|
||
"operation": "新增",
|
||
"version": "3.2",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "PlayerAttackEntityEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:当本地玩家攻击时触发该事件。",
|
||
"doc_class_path": [
|
||
"玩家"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "玩家id",
|
||
"param_name": "playerId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "受击者id",
|
||
"param_name": "victimId",
|
||
"param_type": "str"
|
||
},
|
||
{
|
||
"param_comment": "客户端收到的是真实伤害值,且修改无效",
|
||
"param_name": "damage",
|
||
"param_type": "float"
|
||
},
|
||
{
|
||
"param_comment": "本次攻击是否产生暴击,不支持修改",
|
||
"param_name": "isCrit",
|
||
"param_type": "bool"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端新增玩家攻击实体事件,只有本地玩家会触发",
|
||
"operation": "新增",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "BlockAnimateRandomTickEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "触发时机:以摄像机为中心,随机选取周围的方块触发Tick,触发的数量取决于设备性能。只有添加了netease:block_animate_random_tick的自定义方块才会触发此事件",
|
||
"doc_class_path": [
|
||
"方块"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "方块坐标",
|
||
"param_name": "blockPos",
|
||
"param_type": "tuple(float,float,float)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "客户端新增类似樱花树叶/末地烛的随机动效Tick事件",
|
||
"operation": "新增",
|
||
"version": "3.3",
|
||
"author": "xgb"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
},
|
||
{
|
||
"name": "HudButtonChangedClientEvent",
|
||
"path": "client.clientEvent",
|
||
"desc": "当原生HUD按钮位置或大小发生改变时触发,例如玩家使用了自定义控件功能会触发,可在该事件中修改mod按钮的位置防止重叠",
|
||
"doc_class_path": [
|
||
"UI"
|
||
],
|
||
"param": [
|
||
{
|
||
"param_comment": "修改后的按钮列表",
|
||
"param_name": "changedList",
|
||
"param_type": "tuple(dict)"
|
||
}
|
||
],
|
||
"return": {
|
||
"return_type": "",
|
||
"return_comment": ""
|
||
},
|
||
"state": [
|
||
{
|
||
"comment": "当原生HUD按钮位置或大小改变时触发",
|
||
"operation": "新增",
|
||
"version": "3.3",
|
||
"author": "lidi"
|
||
}
|
||
],
|
||
"side": "客户端"
|
||
}
|
||
]
|
||
} |