Compare commits
3 Commits
sync-20260
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9cd2bb07a0 | ||
|
|
707e3a7b2b | ||
|
|
8af5e1ad39 |
@@ -12,6 +12,12 @@ selection: 14
|
||||

|
||||
|
||||
或者点击下列链接进行跳转
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.8.html" rel="noopenner">3.8更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.7.html" rel="noopenner">3.7更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.6.html" rel="noopenner">3.6更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.5.html" rel="noopenner">3.5更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.4.html" rel="noopenner">3.4更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.3.html" rel="noopenner">3.3更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.2.html" rel="noopenner">3.2更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.1.html" rel="noopenner">3.1更新信息 </a>
|
||||
- <a href="../../../mcdocs/1-ModAPI/更新信息/3.0.html" rel="noopenner">3.0更新信息 </a>
|
||||
|
||||
14
mcguide/10-新内容/3-编辑器插件/1-编辑器插件总览.md
Normal file
14
mcguide/10-新内容/3-编辑器插件/1-编辑器插件总览.md
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
front: https://nie.res.netease.com/r/pic/20221108/151b6d0d-5ea5-43fc-a346-45c25572a2ca.gif
|
||||
hard: 入门
|
||||
time: 2分钟
|
||||
---
|
||||
|
||||
# 编辑器插件总览
|
||||
|
||||
编辑器插件是指开发者可以通过特定的API开发和定制MC Studio中编辑器内容的功能。
|
||||
您可以大幅度的定制自己常用的编辑器变成自己最顺手的工具链,还可以把这套工具链分享给其他开发者进行使用。
|
||||
|
||||
## 公测时间
|
||||
|
||||
目前编辑器插件还处于实验性阶段,我们无法保证是否会对编辑器产生不可预料的后果,所以目前我们仅邀请部分开发者进行使用,并逐步开放编辑器API给全体开发者。
|
||||
0
mcguide/10-新内容/3-编辑器插件/README.md
Normal file
0
mcguide/10-新内容/3-编辑器插件/README.md
Normal file
BIN
mcguide/10-新内容/3-编辑器插件/images/gxxx.png
Normal file
BIN
mcguide/10-新内容/3-编辑器插件/images/gxxx.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
mcguide/10-新内容/3-编辑器插件/images/xunichangjing.png
Normal file
BIN
mcguide/10-新内容/3-编辑器插件/images/xunichangjing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 312 KiB |
@@ -942,7 +942,6 @@ draggable | enum | "not_draggable" | 使控件可以被拖动。控件应能够
|
||||
follows_cursor | boolean | false | 控件是否跟随鼠标或手柄指针移动,仅在调用<a href="../../mcdocs/1-ModAPI/接口/自定义UI/通用.html#pushscreen" rel="noopenner"> PushScreen </a>接口创建的UI中才会正常生效
|
||||
grid_position | array [row, column] | 取决于自身 | 用于设置控件在grid中的位置,这也允许修改原版硬编码网格的特定网格项
|
||||
collection_index | int | 取决于自身 | 用于设置控件在集合中的索引
|
||||
collection_name | string | | 该控件的集合名称。该控件的值会向子控件传递。该属性仅适用于 工厂、堆叠面板、集合面板、网格。
|
||||
priority | int | 0 | 该控件的优先级,数字越小优先级越高
|
||||
layer | int | 0 | 当前控件相对父节点的层级,最终显示层级取决于父节点到该节点的layer之和,较高的层级将会渲染在上层
|
||||
alpha | number | 1.0 | 控件的不透明度。取值0.0-1.0。它只会影响UI控件本身,其子控件不受影响。如果希望透明度同时应用于父控件和子控件,请使用propagate_alpha
|
||||
@@ -1390,26 +1389,7 @@ input_panel与panel类似,可以用来放置其他控件。还可以用来检
|
||||
**注**
|
||||
|
||||
排序的顺序和子控件的排序有关,需要手动调整。
|
||||
### collection\_panel
|
||||
|
||||
collection_panel与panel类似,可以用来放置其他控件。除此之外还有集合绑定功能。
|
||||
|
||||
```json
|
||||
"collection_panel_name": {
|
||||
"type": "collection_panel",
|
||||
"layer": 1,
|
||||
"collection_name": "netease_ui_container",
|
||||
"controls": [
|
||||
{
|
||||
"9@fakeplayer_bag.fakeplayer_bag_grid_item": {
|
||||
"anchor_from": "top_left",
|
||||
"anchor_to": "top_left",
|
||||
"collection_index": 9
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
### edit\_box
|
||||
|
||||
edit_box是输入框控件,用来输入文字信息,可以获取输入内容,设置输入框内容,触发输入中和输入完成事件,设置最大输入值等。下面的示例展示了一个搜索框的信息。
|
||||
@@ -1787,15 +1767,7 @@ touch_path = scroll_view_path + "/scroll_touch/scroll_view/panel/background_and_
|
||||
mouse_path = scroll_view_path + "/scroll_mouse/scroll_view/stack_panel/background_and_viewport/scrolling_view_port/scrolling_content"
|
||||
```
|
||||
|
||||
在PC端进行游戏时,按F11可以切换鼠标和触摸屏两种操作模式,而手机端通常只有触摸屏这一种操作模式。不同的操作模式,scroll_view的scrolling_content会生成在不同的路径下,触摸屏使用touch_path获得scrolling_content的绝对路径,而鼠标控制使用mouse_path获得。如果不想让路径随操作模式变化,可以指定$touch变量为true,此时路径将固定为touch_path。
|
||||
|
||||
```json
|
||||
"scroll_view0@common.scrolling_panel": {
|
||||
// 手动指定$touch变量为true
|
||||
"$touch": true
|
||||
...
|
||||
}
|
||||
```
|
||||
在PC端进行游戏时,按F11可以切换鼠标和触摸屏两种操作模式,而手机端通常只有触摸屏这一种操作模式。不同的操作模式,scroll_view的scrolling_content会生成在不同的路径下,触摸屏使用touch_path获得scrolling_content的绝对路径,而鼠标控制使用mouse_path获得。
|
||||
|
||||
### grid
|
||||
|
||||
@@ -2669,4 +2641,4 @@ def OnRichTextCreateFinishCallback(self):
|
||||
|
||||
##### 使用事项
|
||||
- 富文本是Python实现的一个复合控件,在生成富文本后会有部分数据缓存在RichTextItem实例中,因此不支持使用clone接口复制已创建完成的富文本,但是clone没有调用过readRichText的富文本是可行的。
|
||||
- 我们在内部会缓存路径与RichTextItem实例的映射,使用GetRichTextItem接口,传入相同路径返回的RichTextItem实例也会是相同的。
|
||||
- 我们在内部会缓存路径与RichTextItem实例的映射,使用GetRichTextItem接口,传入相同路径返回的RichTextItem实例也会是相同的。
|
||||
94
mcguide/20-玩法开发/15-自定义游戏内容/1-自定义物品/9-自定义鱼竿.md
Normal file
94
mcguide/20-玩法开发/15-自定义游戏内容/1-自定义物品/9-自定义鱼竿.md
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
front:
|
||||
hard: 入门
|
||||
time: 分钟
|
||||
---
|
||||
|
||||
# 自定义鱼竿
|
||||
|
||||
## 概述
|
||||
|
||||
属于特殊的自定义物品,在支持自定义物品所有特性的基础上,还具有原版鱼竿相关功能,可以自定义鱼线长、鱼线颜色,以及鱼漂,其中鱼漂支持自定义实体
|
||||
|
||||
|
||||
|
||||
## 注册
|
||||
|
||||
1. 与自定义基础物品的注册1-6步相同
|
||||
|
||||
|
||||
1. 在behavior/netease_items_beh的json中添加武器/工具相关的定义,包括:
|
||||
|
||||
custom_item_type为custom_item_type
|
||||
|
||||
一个netease:fishing_hook组件,选填。组件的参数见[json组件](#json组件)
|
||||
|
||||
```json
|
||||
{
|
||||
"minecraft:item": {
|
||||
"description": {
|
||||
"category": "Custom",
|
||||
"identifier": "customshield:test_fishing_rod",
|
||||
"custom_item_type": "fishing_rod"
|
||||
},
|
||||
"components": {
|
||||
"netease:fishing_hook":{
|
||||
"hook_entity":["minecraft:creeper"],//代表投掷出的将会是一个苦力怕实体作为鱼漂,苦力实体无AI。
|
||||
"line_max":50,//代表鱼线可以达到的最长长度(鱼漂与玩家实体的直线距离),超过这个长度后鱼线将会直接断开
|
||||
"line_color":[0.6, 0.5, 0.3, 1.0]//线的颜色和透明度
|
||||
}
|
||||
}
|
||||
},
|
||||
"format_version": "1.10"
|
||||
}
|
||||
```
|
||||
|
||||
## JSON组件
|
||||
|
||||
### 网易components
|
||||
|
||||
* netease:fishing_hook
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| -------- | ---- | --------- | ---------------------------------------------- |
|
||||
| hook_entity | str | | 实体的identify,填入的实体除了无AI以外,支持动画、动画控制器等实体一系列操控 |
|
||||
| line_max | int | 32 | 代表鱼线可以达到的最长长度(鱼漂与玩家实体的直线距离),超过这个长度后鱼线将会直接断开。如果不配置代表和原版鱼线一致为32米 |
|
||||
| line_color | list(rgba) | | 代表鱼线的初始颜色与透明度,如果不配置默认为原版鱼竿黑色 |
|
||||
|
||||
|
||||
## 新增的事件和接口
|
||||
|
||||
### 事件
|
||||
|
||||
* <a href="../../../../mcdocs/1-ModAPI/事件/玩家.html#playerfishingserverevent">PlayerFishingServerEvent</a>
|
||||
|
||||
服务端,钓鱼成功收杆时触发事件
|
||||
|
||||
* <a href="../../../../mcdocs/1-ModAPI/事件/玩家html#playerfishingafterserverevent">PlayerFishingAfterServerEvent</a>
|
||||
|
||||
服务端,钓鱼成功收杆后触发事件
|
||||
|
||||
* <a href="../../../../mcdocs/1-ModAPI/事件/玩家html#playerstartfishingserverevent">PlayerStartFishingServerEvent</a>
|
||||
|
||||
服务端,玩家开始钓鱼事件
|
||||
|
||||
|
||||
### 接口
|
||||
* <a href="../../../../mcdocs/1-ModAPI/接口/玩家/背包.html#getplayerfishitem">GetPlayerFishItem</a>
|
||||
|
||||
服务端接口。获取玩家钓鱼时候的鱼竿物品字典
|
||||
|
||||
|
||||
* <a href="../../../../mcdocs/1-ModAPI/接口/玩家/行为.html#getplayerisfishing">GetPlayerIsFishing</a>
|
||||
|
||||
客户端接口。获取玩家是否在钓鱼
|
||||
|
||||
|
||||
* <a href="../../../../mcdocs/1-ModAPI/接口/玩家/背包.html#getplayerfishhookentity">GetPlayerFishHookEntity</a>
|
||||
|
||||
客户端接口。获取玩家钓鱼时候的鱼漂实体id
|
||||
|
||||
|
||||
## demo解释
|
||||
|
||||
[自定义鱼竿](../../13-模组SDK编程/60-Demo示例.md#CustomFishHookItemMod)中定义了一个自定义鱼竿
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
front: https://nie.res.netease.com/r/pic/20220408/fd58eff7-ab4c-4f98-94b5-87912c6e8e4d.png
|
||||
hard: 入门
|
||||
time: 15分钟
|
||||
selection: true
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
---
|
||||
front: https://nie.res.netease.com/r/pic/20220408/fd58eff7-ab4c-4f98-94b5-87912c6e8e4d.png
|
||||
hard: 入门
|
||||
time: 15分钟
|
||||
selection: true
|
||||
---
|
||||
|
||||
# 模型规范指南
|
||||
|
||||
[点击前往快捷链接](../16-美术/6-模型和动作/6-模型规范指南.md)
|
||||
[点击前往快捷链接](../16-美术/6-模型和动作/6-模型规范指南.md)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
front: https://nie.res.netease.com/r/pic/20220408/fd58eff7-ab4c-4f98-94b5-87912c6e8e4d.png
|
||||
hard: 入门
|
||||
time: 15分钟
|
||||
selection: true
|
||||
|
||||
Reference in New Issue
Block a user