家具的执行动作
通过和家具互动来执行命令
items:
lamp:
display_name: "Lamp"
permission: myitems.decorative.lamp
lore:
- lore-decorative-item
resource:
material: PAPER
generate: false
model_path: lamp
behaviours:
furniture:
light_level: 13
solid: true
events:
placed_armorstand:
interact:
execute_commands:
the_first_command:
command: help
as_console: false在该示例中, 当玩家和家具进行交互时, 它会让玩家执行 /help 命令.
显然, 除了 执行命令, 你也可以向 placed_armorstand 添加更多的 动作和交互事件.
通过交互打开交易菜单
在该例子中, 您可以看到如何将 交易菜单 添加到家具中, 这对于创建自定义机器来说非常有用.
最后更新于