From d5ac52d30c7c19b6ab221a3dd9b601991df1d18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BB=B6=E7=9A=93?= <1214946206@qq.com> Date: Sat, 3 Jul 2021 09:22:22 +0800 Subject: [PATCH] 2.1.0 --- .../scoreboards/digcounter/toolsfix2.json | 48 +++++++++++++++++++ data/fz/functions/login/onlogin.mcfunction | 1 + .../digcounter/toolsfix2.mcfunction | 6 +++ 3 files changed, 55 insertions(+) create mode 100644 data/fz/advancements/scoreboards/digcounter/toolsfix2.json create mode 100644 data/fz/functions/scoreboards/digcounter/toolsfix2.mcfunction diff --git a/data/fz/advancements/scoreboards/digcounter/toolsfix2.json b/data/fz/advancements/scoreboards/digcounter/toolsfix2.json new file mode 100644 index 0000000..633f1a7 --- /dev/null +++ b/data/fz/advancements/scoreboards/digcounter/toolsfix2.json @@ -0,0 +1,48 @@ +{ + "criteria": { + "tools_hit_entities": { + "trigger": "minecraft:player_hurt_entity", + "conditions": { + "player": [ + { + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "mainhand": { + "items": [ + "iron_axe", + "stone_axe", + "golden_axe", + "wooden_axe", + "diamond_axe", + "netherite_axe", + "iron_shovel", + "stone_shovel", + "golden_shovel", + "wooden_shovel", + "diamond_shovel", + "netherite_shovel", + "iron_hoe", + "stone_hoe", + "golden_hoe", + "wooden_hoe", + "diamond_hoe", + "netherite_hoe", + "iron_pickaxe", + "stone_pickaxe", + "golden_pickaxe", + "wooden_pickaxe", + "diamond_pickaxe", + "netherite_pickaxe" + ] + } + } + } + } + ] + } + } + }, + "rewards": {"function": "fz:scoreboards/digcounter/toolsfix2"} +} \ No newline at end of file diff --git a/data/fz/functions/login/onlogin.mcfunction b/data/fz/functions/login/onlogin.mcfunction index d645c31..d817020 100644 --- a/data/fz/functions/login/onlogin.mcfunction +++ b/data/fz/functions/login/onlogin.mcfunction @@ -10,6 +10,7 @@ advancement revoke @s only fz:scoreboards/killcounter advancement revoke @s only fz:scoreboards/tradingcounter advancement revoke @s only fz:scoreboards/digcounter/digtrigger advancement revoke @s only fz:scoreboards/digcounter/toolsfix +advancement revoke @s only fz:scoreboards/digcounter/toolsfix2 advancement revoke @s only fz:config/sneak advancement revoke @s only fz:config/unsneak diff --git a/data/fz/functions/scoreboards/digcounter/toolsfix2.mcfunction b/data/fz/functions/scoreboards/digcounter/toolsfix2.mcfunction new file mode 100644 index 0000000..de1fd51 --- /dev/null +++ b/data/fz/functions/scoreboards/digcounter/toolsfix2.mcfunction @@ -0,0 +1,6 @@ +#为digtrigger函数修正非挖掘的使用带来的加分(使用工具攻击实体) +#判断条件用于排除地毯小人 +execute unless score @s carpetBot matches 1 run scoreboard players remove @s digCounter 1 +execute unless score @s carpetBot matches 1 run scoreboard players remove 总挖掘量 digCounter 1 +execute unless score @s carpetBot matches 1 run scoreboard players remove 总挖掘量 totalList 1 +advancement revoke @s only fz:scoreboards/digcounter/toolsfix2 \ No newline at end of file