Detect Opening/Closing Containers
コンテナの開閉を検知します
- 1.20.1
以下のバージョンは右のReleasesからどうぞ。
For the following versions, please check Releases on the right.
- 1.19.x
Oh! My Dat!(https://github.com/Ai-Akaishi/OhMyDat)
Player Item Tuner(https://github.com/Ai-Akaishi/PlayerItemTuner)
開いた時に呼び出したいファンクションの登録
Registration of functions to be called when opened
close_detector/tags/functions/on_opened.json
{
"values": [
"your_datapack:open"
]
}
閉じた時に呼び出したいファンクションの登録
Registration of functions to be called when closed
close_detector/tags/functions/on_closed.json
{
"values": [
"your_datapack:close"
]
}
ロックされていた時に呼び出したいファンクションの登録
Registration of functions to be called when locked
close_detector/tags/functions/on_locked.json
{
"values": [
"your_datapack:lock"
]
}
開いているコンテナの種類はpredicateで簡単に記述できます。 The type of open container can be easily described with predicate.
- open:chest
- open:trapped_chest
- open:ender_chest
- open:barrel
- open:crafting_table
- open:cartography_table
- open:hopper
- open:dropper
- open:dispenser
- open:furnace
- open:blast_furnace
- open:smoker
- open:brewing_stand
- open:grindstone
- open:enchanting_table
- open:stonecutter
- open:beacon
- open:lectern
- open:loom
- open:smithing_table
- open:anvil(any type of anvils)
- open:anvil/normal
- open:anvil/chipped
- open:anvil/damaged
- open:shulker_box(any type of shulker_boxs)
- open:shulker_box/normal
- open:shulker_box/white_shulker_box
- open:shulker_box/orange_shulker_box
- open:shulker_box/magenta_shulker_box
- open:shulker_box/light_blue_shulker_box
- open:shulker_box/yellow_shulker_box
- open:shulker_box/lime_shulker_box
- open:shulker_box/pink_shulker_box
- open:shulker_box/gray_shulker_box
- open:shulker_box/light_gray_shulker_box
- open:shulker_box/cyan_shulker_box
- open:shulker_box/purple_shulker_box
- open:shulker_box/blue_shulker_box
- open:shulker_box/brown_shulker_box
- open:shulker_box/green_shulker_box
- open:shulker_box/red_shulker_box
- open:shulker_box/black_shulker_box
- open:chest_boat
- open:chest_minecart
- open:hopper_minecart
樽を開いている場合にメッセージを出す
Show a message when a barrel is open.
execute if predicate open:barrel run say I'm looking through the barrels now.
These codes are released under the MIT License, see LICENSE.