2.6
This commit is contained in:
@@ -197,7 +197,7 @@ customTips 设置支持自定义格式:包含四种自带格式:
|
||||
| explosionResistance | float | 方块爆炸抗性|
|
||||
| loot | str | loot table控制掉落物(只有定义了"minecraft:loot"组件的方块有数据,其余默认为空字符串"")|
|
||||
| mapColor | str | 用十六进制颜色定义该方块在地图上显示的颜色(只有定义了"minecraft:map_color"组件的方块以及部分原版方块有数据,其余默认为"#0")|
|
||||
| unwalkable | bool | 生物是否可在上方行走,默认为false(只有定义了"<a href="../../../mconline/100-历史归档教程/20-玩法地图教程/第07章:使用实验玩法增加自定义内容/课程01.接触新自定义方块.html#minecraft-unwalkable">minecraft:unwalkable</a>"组件的方块有数据,其余默认为false)|
|
||||
| unwalkable | bool | 生物是否可在上方行走,默认为false(只有定义了"<a href="../../../mconline/20-玩法地图教程/第07章:使用实验玩法增加自定义内容/课程01.接触新自定义方块.html#minecraft-unwalkable">minecraft:unwalkable</a>"组件的方块有数据,其余默认为false)|
|
||||
| tier | dict/None | 与挖掘相关的属性,具体见<a href="../../20-玩法开发/15-自定义游戏内容/2-自定义方块/1-JSON组件.html">挖掘属性</a>(只有定义了"netease:tier"组件的方块有数据,其余默认为None)|
|
||||
| renderLayer | int | 方块渲染时使用的<a href="../../../mcdocs/1-ModAPI/枚举值/RenderLayer.html" rel="noopenner"> 材质 </a>|
|
||||
| solid | bool | 方块是否为实心方块,影响生物在方块内是否受到窒息伤害|
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
front:
|
||||
front:
|
||||
hard: 入门
|
||||
time: 分钟
|
||||
---
|
||||
@@ -281,7 +281,7 @@ c = Vector3.Dot(a, b) # 1 * 0 + 2 * 3 + 3 * 1 = 9
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :------------- |
|
||||
| float | 两个向量的点积 |
|
||||
| Vector3 | 两个向量的叉积 |
|
||||
|
||||
- 示例
|
||||
|
||||
@@ -296,6 +296,72 @@ c = Vector3.Cross(a, b)
|
||||
|
||||
## 成员方法
|
||||
|
||||
### x
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的x坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量x的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.x # 打印 3.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### y
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的y坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量y的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.y # 打印 4.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### z
|
||||
|
||||
- 描述
|
||||
|
||||
返回该向量的z坐标值。
|
||||
|
||||
- 返回值
|
||||
|
||||
| 数据类型 | 说明 |
|
||||
| :------- | :-------------- |
|
||||
| float | 该向量z的坐标值 |
|
||||
|
||||
- 示例
|
||||
|
||||
```python
|
||||
from common.utils.mcmath import Vector3
|
||||
a = Vector3(3.0, 4.0, 0.0)
|
||||
print a.z # 打印 0.0
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Length
|
||||
|
||||
- 描述
|
||||
@@ -551,4 +617,4 @@ print a / 2 # 打印结果(1.5, 2, 0)
|
||||
|
||||
- 描述
|
||||
|
||||
判断两个向量是否不等,当各分量均相等时返回False
|
||||
判断两个向量是否不等,当各分量均相等时返回False
|
||||
|
||||
Reference in New Issue
Block a user