Compare commits
10 Commits
12m26d
...
all-contri
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
77bdd38c05 | ||
|
|
0f012cde17 | ||
|
|
e74c284815 | ||
|
|
8c8ae31c08 | ||
|
|
31dea08de7 | ||
|
|
c51b5bb73c | ||
|
|
da08f15ac2 | ||
|
|
a510d13f2b | ||
|
|
5ee48218b8 | ||
|
|
915e1dcf98 |
@@ -16,6 +16,15 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"doc"
|
"doc"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "LiangJi23333",
|
||||||
|
"name": "LiangJi23333",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/102958768?v=4",
|
||||||
|
"profile": "https://github.com/LiangJi23333",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ git push --set-upstream origin your-branch-name
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MCNeteaseDevs"><img src="https://avatars.githubusercontent.com/u/186891705?v=4?s=100" width="100px;" alt="MCNeteaseDevs"/><br /><sub><b>MCNeteaseDevs</b></sub></a><br /><a href="#doc-MCNeteaseDevs" title="Documentation">📖</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MCNeteaseDevs"><img src="https://avatars.githubusercontent.com/u/186891705?v=4?s=100" width="100px;" alt="MCNeteaseDevs"/><br /><sub><b>MCNeteaseDevs</b></sub></a><br /><a href="#doc-MCNeteaseDevs" title="Documentation">📖</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/LiangJi23333"><img src="https://avatars.githubusercontent.com/u/102958768?v=4?s=100" width="100px;" alt="LiangJi23333"/><br /><sub><b>LiangJi23333</b></sub></a><br /><a href="#doc-LiangJi23333" title="Documentation">📖</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -1759,6 +1759,8 @@ PC和IOS平台没有这个问题
|
|||||||
|
|
||||||
而对于scrolling_content的绝对路径,一共有以下两种,可以通过UI-API<a href="../../mcdocs/1-ModAPI/接口/自定义UI/UI界面.html#getallchildrenpath">GetAllChildrenPath</a>清楚的看到。
|
而对于scrolling_content的绝对路径,一共有以下两种,可以通过UI-API<a href="../../mcdocs/1-ModAPI/接口/自定义UI/UI界面.html#getallchildrenpath">GetAllChildrenPath</a>清楚的看到。
|
||||||
|
|
||||||
|
#### 特别注意
|
||||||
|
|
||||||
```python
|
```python
|
||||||
scroll_view_path = "/scroll_view0"
|
scroll_view_path = "/scroll_view0"
|
||||||
touch_path = scroll_view_path + "/scroll_touch/scroll_view/panel/background_and_viewport/scrolling_view_port/scrolling_content"
|
touch_path = scroll_view_path + "/scroll_touch/scroll_view/panel/background_and_viewport/scrolling_view_port/scrolling_content"
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ time: 分钟
|
|||||||
| ----------------------- | ---- | ------ | ------------------------------------------------------------ |
|
| ----------------------- | ---- | ------ | ------------------------------------------------------------ |
|
||||||
| identifier | str | | 包括命名空间及物品名。需要全局唯一。建议使用mod名称作为命名空间 |
|
| identifier | str | | 包括命名空间及物品名。需要全局唯一。建议使用mod名称作为命名空间 |
|
||||||
| register_to_create_menu | bool | false | 是否注册到创造栏 |
|
| register_to_create_menu | bool | false | 是否注册到创造栏 |
|
||||||
| category | str | Nature | 注册到创造栏的分类,可选的值有:<br/>Construction<br/>Nature<br/>Equipment<br/>Items |
|
| category | str | Nature | 注册到创造栏的分类,可选的值有:<br/>Construction<br/>Nature<br/>Equipment<br/>Items<br/>None |
|
||||||
|
| base_block | str | | 继承的特殊方块类型,可选的值有:<br/>mob_spawner 自定义刷怪箱<br/>portal 自定义传送门<br/>custom_crop_block 自定义农作物<br/>custom_heavy_block 自定义重力方块<br/>liquid 自定义静态流体方块<br/>flowing_liquid 自定义动态流体方块<br/>netease_container 自定义容器 |
|
||||||
|
|
||||||
## components
|
## components
|
||||||
|
|
||||||
@@ -121,7 +122,7 @@ time: 分钟
|
|||||||
|
|
||||||
### minecraft:destructible_by_explosion
|
### minecraft:destructible_by_explosion
|
||||||
|
|
||||||
可用于控制挖掘所需的时间。该值的含义与[官方wiki](https://minecraft-zh.gamepedia.com/%E6%8C%96%E6%8E%98#.E6.96.B9.E5.9D.97.E7.A1.AC.E5.BA.A6)的“硬度”一致
|
可用于控制爆炸抗性。原版方块的爆炸抗性见[官方wiki](https://minecraft-zh.gamepedia.com/%E7%88%86%E7%82%B8#.E7.88.86.E7.82.B8.E6.8A.97.E6.80.A7)
|
||||||
|
|
||||||
- 如果设置为 `true`,方块会采用默认的爆炸抗性。
|
- 如果设置为 `true`,方块会采用默认的爆炸抗性。
|
||||||
- 如果设置为 `false`,方块将不可被爆炸破坏。
|
- 如果设置为 `false`,方块将不可被爆炸破坏。
|
||||||
@@ -212,6 +213,7 @@ time: 分钟
|
|||||||
| value | bool | | 必须设置,用于设置无法摆放在水源和流水方块中 |
|
| value | bool | | 必须设置,用于设置无法摆放在水源和流水方块中 |
|
||||||
|
|
||||||
- 可以在方块的loottable中设置被水流摧毁后的掉落物
|
- 可以在方块的loottable中设置被水流摧毁后的掉落物
|
||||||
|
- 当**base_block**字段为**custom_crop_block**的时候,会自动注册此组件,无需再次注册。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -330,9 +332,9 @@ time: 分钟
|
|||||||
|
|
||||||
主要用于[多面向](./2-功能.md#duomianxiang)的功能
|
主要用于[多面向](./2-功能.md#duomianxiang)的功能
|
||||||
|
|
||||||
| 键 | 类型 | 默认值 | 解释 |
|
| 键 | 类型 | 默认值 | 解释 |
|
||||||
| ---- | ------ | ------ | ----------------------------------------------------- |
|
| ---- | ------ | ------ | --------------------------------------------------- |
|
||||||
| type | string | | direction:四面向方块facing_direction:六面向方块 |
|
| type | string | | direction:四面向方块,facing_direction:六面向方块 |
|
||||||
|
|
||||||
<span id="netease:fuel "></span>
|
<span id="netease:fuel "></span>
|
||||||
|
|
||||||
|
|||||||
@@ -44,17 +44,19 @@ time: 60分钟
|
|||||||
|
|
||||||
#### 1. 无root安装node.js
|
#### 1. 无root安装node.js
|
||||||
|
|
||||||
|
**强制要求安装node16+的版本,不然守护进程跑不起来**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 下载nodejs
|
# 下载nodejs
|
||||||
cd ~/downloads
|
cd ~/downloads
|
||||||
wget https://nodejs.org/dist/v15.7.0/node-v15.7.0-linux-x64.tar.xz
|
wget https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.xz
|
||||||
|
|
||||||
# 创建工作目录并解压
|
# 创建工作目录并解压
|
||||||
mkdir -p ~/apps/node-v15.7.0
|
mkdir -p ~/apps/node-v16.20.2
|
||||||
tar -xJf node-v15.7.0-linux-x64.tar.xz --no-wildcards-match-slash --anchored --exclude */CHANGELOG.md --exclude */LICENSE --exclude */README.md --strip 1 -C ~/apps/node-v15.7.0
|
tar -xJf node-v16.20.2-linux-x64.tar.xz --no-wildcards-match-slash --anchored --exclude */CHANGELOG.md --exclude */LICENSE --exclude */README.md --strip 1 -C ~/apps/node-v16.20.2
|
||||||
|
|
||||||
# 添加path变量
|
# 添加path变量
|
||||||
export PATH=~/apps/node-v15.7.0/bin:$PATH
|
export PATH=~/apps/node-v16.20.2/bin:$PATH
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
|
|
||||||
# 检查nodejs版本
|
# 检查nodejs版本
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ selection: true
|
|||||||
|
|
||||||
最近,在山头测试中,我们发现很多开发者的模组明明在单人游戏运行是非常正常的,但在山头、多人联机环境下就会出现功能无效或者异常的情况
|
最近,在山头测试中,我们发现很多开发者的模组明明在单人游戏运行是非常正常的,但在山头、多人联机环境下就会出现功能无效或者异常的情况
|
||||||
|
|
||||||
后面我们发现,实际上只要遵循 ServerSystem 和 ClientSystem 分离的原则。基本上就能保证开发的模组兼容山头服和多人联机
|
只要遵循 ServerSystem 与 ClientSystem 严格分离 的原则,大部分兼容性问题都能自然消失。
|
||||||
|
|
||||||
## 开发范例
|
## 开发范例
|
||||||
|
|
||||||
> 下方代码仅供参考和通俗化解释,并不能实际运行!
|
> 下方代码为错误示范。仅供参考和通俗化解释,并不能实际运行!
|
||||||
|
|
||||||
**modClient.py**
|
**modClient.py**
|
||||||
```python
|
```python
|
||||||
@@ -36,12 +36,12 @@ class ModClient(clientApi.GetClientSystemCls()):
|
|||||||
**modServer.py**
|
**modServer.py**
|
||||||
```python
|
```python
|
||||||
import mod.client.extraClientApi as serverApi
|
import mod.client.extraClientApi as serverApi
|
||||||
from xxx.xxx.xxx import ModClient
|
from xxx.xxx.xxx import ModClient #错误引用客户端侧
|
||||||
|
|
||||||
class ModServer(serverApi.GetServerSystemCls()):
|
class ModServer(serverApi.GetServerSystemCls()):
|
||||||
|
|
||||||
def ServerRegister(self):
|
def ServerRegister(self):
|
||||||
ModClient.NoClientApiRegister()
|
ModClient.NoClientApiRegister() #在多人游戏出现功能无效或者异常
|
||||||
print("register successfully")
|
print("register successfully")
|
||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
@@ -56,4 +56,4 @@ class ModServer(serverApi.GetServerSystemCls()):
|
|||||||
|
|
||||||
当你遵循上述开发原则,即客户端和服务端分离,您开发的模组基本天然兼容多人联机和我的山头的环境
|
当你遵循上述开发原则,即客户端和服务端分离,您开发的模组基本天然兼容多人联机和我的山头的环境
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user