diff --git a/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json b/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json new file mode 100644 index 0000000..761c63d --- /dev/null +++ b/data/fzsd/advancements/game_event/on_placed_block/on_placed_liquid.json @@ -0,0 +1,13 @@ +{ + "parent": "fzsd:game_event/on_placed_block", + "criteria": { + "on_placed_liquid": { + "trigger": "minecraft:placed_block", + "conditions": { + "item": { + "tag": "fzsd:bucket_of_liquid" + } + } + } + } +} \ No newline at end of file diff --git a/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction b/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction index 9b2d63a..fc7e9f0 100644 --- a/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction +++ b/data/fzsd/functions/game_event/advancement/on_placed_block.mcfunction @@ -1,9 +1,8 @@ # 调用者:advancements/fzsd:~ -## 调试 -execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "放置了方块"}] - ## 运行事件 +execute if entity @s[advancements={fzsd:game_event/on_placed_block/on_placed_liquid=true}] run function #fzsd:game_event/player/on_placed_liquid +execute if entity @s[advancements={fzsd:game_event/on_placed_block/on_placed_liquid=false}] run function #fzsd:game_event/player/on_placed_solid function #fzsd:game_event/player/on_placed_block ## 重置事件进度 diff --git a/data/fzsd/functions/game_event/callback/on_placed_liquid.mcfunction b/data/fzsd/functions/game_event/callback/on_placed_liquid.mcfunction new file mode 100644 index 0000000..70a52a1 --- /dev/null +++ b/data/fzsd/functions/game_event/callback/on_placed_liquid.mcfunction @@ -0,0 +1,2 @@ +## 调试 +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "放置了流体"}] \ No newline at end of file diff --git a/data/fzsd/functions/game_event/callback/on_placed_solid.mcfunction b/data/fzsd/functions/game_event/callback/on_placed_solid.mcfunction new file mode 100644 index 0000000..8886c41 --- /dev/null +++ b/data/fzsd/functions/game_event/callback/on_placed_solid.mcfunction @@ -0,0 +1,2 @@ +## 调试 +execute if score fzsd.logger.level fzsd.variable.integer matches ..400 run tellraw @a [{"nbt": "fzsd.level.debug", "interpret": true, "storage": "fzsd:logger"}, {"text": "事件已触发:玩家"}, {"selector": "@s"}, {"text": "放置了实体方块"}] \ No newline at end of file diff --git a/data/fzsd/tags/functions/game_event/player/on_placed_block.json b/data/fzsd/tags/functions/game_event/player/on_placed_block.json index 5210f29..a1dc310 100644 --- a/data/fzsd/tags/functions/game_event/player/on_placed_block.json +++ b/data/fzsd/tags/functions/game_event/player/on_placed_block.json @@ -1,6 +1,5 @@ { "replace": false, "values": [ - "#fzsd:module/scoreboard/assign/scoreboard/placement_count" ] } \ No newline at end of file diff --git a/data/fzsd/tags/functions/game_event/player/on_placed_liquid.json b/data/fzsd/tags/functions/game_event/player/on_placed_liquid.json new file mode 100644 index 0000000..a4f2eea --- /dev/null +++ b/data/fzsd/tags/functions/game_event/player/on_placed_liquid.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "fzsd:game_event/callback/on_placed_liquid" + ] +} \ No newline at end of file diff --git a/data/fzsd/tags/functions/game_event/player/on_placed_solid.json b/data/fzsd/tags/functions/game_event/player/on_placed_solid.json new file mode 100644 index 0000000..1b6d87d --- /dev/null +++ b/data/fzsd/tags/functions/game_event/player/on_placed_solid.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "fzsd:game_event/callback/on_placed_solid", + "#fzsd:module/scoreboard/assign/scoreboard/placement_count" + ] +} \ No newline at end of file diff --git a/data/fzsd/tags/items/bucket_of_liquid.json b/data/fzsd/tags/items/bucket_of_liquid.json new file mode 100644 index 0000000..83463e8 --- /dev/null +++ b/data/fzsd/tags/items/bucket_of_liquid.json @@ -0,0 +1,8 @@ +{ + "replace": false, + "values": [ + "minecraft:lava_bucket", + "minecraft:water_bucket", + "#fzsd:bucket_of_mob" + ] +} \ No newline at end of file diff --git a/data/fzsd/tags/items/bucket_of_mob.json b/data/fzsd/tags/items/bucket_of_mob.json new file mode 100644 index 0000000..15cd1a1 --- /dev/null +++ b/data/fzsd/tags/items/bucket_of_mob.json @@ -0,0 +1,11 @@ +{ + "replace": false, + "values": [ + "minecraft:cod_bucket", + "minecraft:salmon_bucket", + "minecraft:axolotl_bucket", + "minecraft:pufferfish_bucket", + "minecraft:powder_snow_bucket", + "minecraft:tropical_fish_bucket" + ] +} \ No newline at end of file