更新3.4API
This commit is contained in:
@@ -67,6 +67,70 @@ direction = clientApi.GetDirFromRot((0, 0))
|
||||
|
||||
|
||||
|
||||
## GetIntPos
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span><span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
### 服务端接口
|
||||
|
||||
<span id="s0"></span>
|
||||
method in mod.server.extraServerApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取坐标所在方块的位置,即浮点数坐标向下取整后的整数坐标。
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 坐标元组 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| tuple(int,int,int) | 坐标所在方块的位置 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import mod.server.extraServerApi as serverApi
|
||||
serverApi.GetIntPos((1.2,1.3,1.4))
|
||||
```
|
||||
|
||||
|
||||
|
||||
### 客户端接口
|
||||
|
||||
<span id="c0"></span>
|
||||
method in mod.client.extraClientApi
|
||||
|
||||
- 描述
|
||||
|
||||
获取坐标所在方块的位置,即浮点数坐标向下取整后的整数坐标。
|
||||
|
||||
- 参数
|
||||
|
||||
| 参数名 | <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| pos | tuple(float,float,float) | 坐标元组 |
|
||||
|
||||
- 返回值
|
||||
|
||||
| <div style="width: 4em">数据类型</div> | 说明 |
|
||||
| :--- | :--- |
|
||||
| tuple(int,int,int) | 坐标所在方块的位置 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
import mod.client.extraClientApi as clientApi
|
||||
clientApi.GetIntPos((1.2,1.3,1.4))
|
||||
```
|
||||
|
||||
|
||||
|
||||
## GetLocalPosFromWorld
|
||||
|
||||
<span style="display:inline;color:#ff5555">服务端</span><span style="display:inline;color:#7575f9">客户端</span>
|
||||
|
||||
Reference in New Issue
Block a user