# 事件动作

### 播放音效

```
play_sound:
  name: itemsadder:ambient.creepy
  volume: 1
  pitch: 1
```

### 停止播放音效

```
stop_sound:
  name: "itemsadder:music_disc.cdk_sunday"
```

### 执行命令

```
execute_commands:
  first_example:
    command: 'tellraw {player} {"text":"wow you did something!","color":"gold"}'
    as_console: true
  second:
    command: 'help'
    as_console: false
  third:
    command: 'give {player} diamond'
    as_console: true 
```

其中：

* command：具体执行的命令。
* as\_console：是否以控制台身份执行。

### 粒子效果

```
play_particle:
  name: "ENCHANTMENT_TABLE"
```

粒子效果的id可以在 [**Minecraft Wiki**](https://minecraft.fandom.com/zh/wiki/%E7%B2%92%E5%AD%90) 查看。

### 发射状粒子效果

```
shoot_particle:
  name: FLAME
  distance: 7
```

是否武器、枪，其中 `distance` 代表距离。

### 增加耐久值

```
increment_durability:
  amount: 10
```

### 减去耐久值

```
decrement_durability:
  amount: 10
```

### 增加使用次数

```
increment_usages:
  amount: 1
```

### 减去使用次数

```
decrement_amount:
  amount: 1
```

### 减去物品数量

```
decrement_amount:
  amount: 1
```

### 掉落经验值

```
drop_exp:
  chance: 50
  min_amount: 1
  max_amount: 3
```

其中：

* chance：触发几率。
* min\_amount、max\_amount：分布为最小值和最大值。

### 食物

```
feed:
  amount: 6
  saturation: 2
```

其中，`amount` 代表饱食度，`saturation` 代表饱和度。

### 给予物品

```
give_item:
  item: empty_cup
  amount: 1
```

### 掉落物品

```
drop_item:
  item: 2d_furniture
  chance: 99.9
  max_amount: 3
  min_amount: 1
```

### 播放不死图腾动画

```
play_totem_animation: animatedtitles:bruh
```

### 放置方块

```
set_block:
  block: rocks
  target: RELATIVE
  decrement_amount: true
```

其中：

* block：放置的方块。
* target：放置的对象。
* decrement\_amount：放置后是否减少本来的数量。

### 放置家具

```
place_furniture:
  furniture: furniture
  decrement_amount: true
```

### 给予自身药水

```
potion_effect:
  type: UNLUCK
  duration: 100
  amplifier: 0
```

其中：

* type：药水的类型。
* duration：药水的时长。
* amplifier：药水的等级。

### 移除自身药水

```
remove_potion_effect:
  type: GLOWING
```

### 给予对象药水

```
target_potion_effect:
  type: GLOWING
  duration: 70
  amplifier: 15
```

对象指的是攻击或者解除的实体等，其中：

* type：药水的类型。
* duration：药水的时长。
* amplifier：药水的等级。

### 移除对象药水

```
target_remove_potion_effect:
  type: GLOWING
```

### 增加玩家 IA 属性

```
increment_player_stat:
  name: "itemsadder:mana_bar"
  amount: 1
```

### 减少玩家 IA 属性

```
decrement_player_stat:
  name: "itemsadder:mana_bar"
  amount: 1
```

### 攻击实体

```
damage_entity:
  damage: 4
```

其中：

* damage：攻击的伤害值。

### 攻击附近实体

```
damage_entity_in_sight:
  damage: 4
  distance: 7
```

```
damage_near_entities:
  entity_groups:
   - HOSTILE
   - PLAYERS
   - PASSIVE
  damage: 4
  range: 7
```

其中：

* entity\_groups：实体类型，分布为主动（怪物）、玩家和被动（动物）。
* range、distance：距离。

### 爆炸

```
explosion:
  power: 2
  fire: true
  break_blocks: true
```

其中：

* power：爆炸威力。
* fire：是否着火。
* break\_blocks：是否破坏方块。

### 大范围破坏

```
multiple_break:
  keep_ores: true
  drop_all_blocks:
    enabled: true
    need_silk_touch: true
  size: 3
  depth: 3
```

其中：

* keep\_ores：是否保留矿石不破坏。
* drop\_all\_blocks：是否掉落所有方块和是否需要精准采集附魔。
* size：破坏的大小。
* depth：破坏的深度。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/itemsadder-doc/shi-jian/shi-jian-dong-zuo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
