Skip to content

Commit ddc29f9

Browse files
committed
New translations food.md (Chinese Simplified)
1 parent 806b121 commit ddc29f9

File tree

1 file changed

+9
-10
lines changed
  • translated/zh_cn/develop/items

1 file changed

+9
-10
lines changed

translated/zh_cn/develop/items/food.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ new Item.Settings().food(new FoodComponent.Builder().build())
2525

2626
现在,只要让物品可食用,没有别的。
2727

28-
`FoodComponent` 类有很多方法,允许你修改玩家吃你的物品时发生的事情:
28+
`FoodComponent` 类有某些方法,允许你修改玩家吃你的物品时发生的事情:
2929

30-
| 方法 | 描述 |
31-
| -------------------- | -------------------------------------------------------- |
32-
| `nutrition` | 设置你的物品会补充的饥饿值的数量。 |
33-
| `saturationModifier` | 设置你的物品会增加的饱和度的数量。 |
34-
| `alwaysEdible` | 允许无论饥饿值均能吃你的物品。 |
35-
| `snack` | 将你的物品描述为零食。 |
36-
| `statusEffect` | 吃你的物品时添加状态效果。 通常传递到此方法的是一个状态效果实例和概率,其中概率是小数(`1f = 100%`|
30+
| 方法 | 描述 |
31+
| -------------------- | ----------------- |
32+
| `nutrition` | 设置你的物品会补充的饥饿值的数量。 |
33+
| `saturationModifier` | 设置你的物品会增加的饱和度的数量。 |
34+
| `alwaysEdible` | 允许无论饥饿值均能吃你的物品。 |
3735

3836
按照你的喜好修改了 builder 后,可以调用 `build()` 方法以获取 `FoodComponent`
3937

38+
如果您想在玩家吃食物时添加状态效果,则需要将 `ConsumableComponent``FoodComponent` 类一起使用,如以下示例所示:
39+
4040
@[code transcludeWith=:::5](@/reference/latest/src/main/java/com/example/docs/item/ModItems.java)
4141

4242
[创建你的第一个物品](./first-item) 类似,该示例将使用上述的组件:
@@ -46,7 +46,6 @@ new Item.Settings().food(new FoodComponent.Builder().build())
4646
这会让物品:
4747

4848
- 总是可食用,无论饥饿值均可以吃。
49-
- 是“零食”。
5049
- 吃完会总会给予 6 秒中毒 II。
5150

52-
<VideoPlayer src="/assets/develop/items/food_0.webm" title="Eating the Suspicious Substance" />
51+
<VideoPlayer src="/assets/develop/items/food_0.webm" title="Eating the Poisonous Apple" />

0 commit comments

Comments
 (0)