Sfoglia il codice sorgente

让进度均可以获得(理论上)

LTCatt 5 anni fa
parent
commit
47e7d9e3b0

+ 14 - 7
data/ltw/advancements/vs/diamond1.json

@@ -21,13 +21,20 @@
       "function": "ltw:advancement/bonus_2"
     },
     "criteria": {
-      "get_score":{
-          "trigger": "minecraft:impossible"
-      }
+        "obsidian": {
+          "trigger": "minecraft:inventory_changed",
+          "conditions": {
+            "items": [
+              {
+                "item": "minecraft:obsidian"
+              }
+            ]
+          }
+        }
     },
     "requirements": [
-      [
-          "get_score"
-      ]
+        [
+          "obsidian"
+        ]
     ]
-  }
+}

+ 15 - 8
data/ltw/advancements/vs/diamond2.json

@@ -5,10 +5,10 @@
         "item": "minecraft:enchanting_table"
       },
       "title": {
-        "text": "不可能的附魔师"
+        "text": "附魔师?!    "
       },
       "description": [
-        {"text": "用不知道从哪找到的书制作附魔台\n", "color":"gray"},
+        {"text": "制作一个附魔台\n", "color":"gray"},
         {"text": "奖励: ","color":"green"},
         {"text": "4 绿宝石","color":"white"}
       ],
@@ -21,13 +21,20 @@
       "function": "ltw:advancement/bonus_4"
     },
     "criteria": {
-      "get_score":{
-          "trigger": "minecraft:impossible"
-      }
+        "c": {
+          "trigger": "minecraft:inventory_changed",
+          "conditions": {
+            "items": [
+              {
+                "item": "minecraft:enchanting_table"
+              }
+            ]
+          }
+        }
     },
     "requirements": [
-      [
-          "get_score"
-      ]
+        [
+          "c"
+        ]
     ]
 }

+ 1 - 0
data/mini/functions/main/tick5.mcfunction

@@ -1,6 +1,7 @@
 
 # 触发单个模块
 execute if score $mini_type mem matches 1 run function mini:parkour/tick5
+execute if score $mini_type mem matches 2 run function mini:tntrun/tick5
 execute if score $mini_type mem matches 3 run function mini:hotpm/tick5
 execute if score $mini_type mem matches 5 run function mini:phantom/tick5
 execute if score $mini_type mem matches 6 run function mini:diamond/tick5

+ 3 - 1
data/mini/functions/tntrun/player_enter.mcfunction

@@ -14,7 +14,9 @@ attribute @s generic.max_health base set 20
 
 # 传送玩家
 spreadplayers 1019.5 2020.5 2 2 false @s[team=playing,tag=!rejoining]
-# schedule: tp @a ~ ~-3 ~
+
+# 清理 tag
+tag @s remove layer_bottom
 
 # 两秒后才开始 TNT 掉落
 tag @s remove tntrun_pc

+ 0 - 7
data/mini/functions/tntrun/tick2.mcfunction

@@ -9,10 +9,3 @@ execute as @e[tag=tntrun_edge] at @s unless entity @a[tag=tntrun_pc,distance=..1
 # 玩家死亡判断
 execute as @a[tag=mini_running] at @s if block ~ ~-1 ~ magma_block run function mini:tntrun/player_failed
 execute as @a[tag=mini_running] at @s if block ~ ~-2 ~ magma_block run function mini:tntrun/player_failed
-
-# 显示层数
-scoreboard players reset * layer
-execute as @a[tag=mini_running] at @s if entity @s[y=35,dy=10] run scoreboard players set @s layer 4
-execute as @a[tag=mini_running] at @s if entity @s[y=30,dy=3] run scoreboard players set @s layer 3
-execute as @a[tag=mini_running] at @s if entity @s[y=25,dy=3] run scoreboard players set @s layer 2
-execute as @a[tag=mini_running] at @s if entity @s[y=20,dy=3] run scoreboard players set @s layer 1 

+ 13 - 0
data/mini/functions/tntrun/tick5.mcfunction

@@ -0,0 +1,13 @@
+
+# 显示层数
+scoreboard players reset * temp
+execute as @a[tag=mini_running] at @s if entity @s[y=35,dy=10] run scoreboard players set @s temp 4
+execute as @a[tag=mini_running] at @s if entity @s[y=30,dy=3] run scoreboard players set @s temp 3
+execute as @a[tag=mini_running] at @s if entity @s[y=25,dy=3] run scoreboard players set @s temp 2
+execute as @a[tag=mini_running] at @s if entity @s[y=20,dy=3] run scoreboard players set @s temp 1
+scoreboard players reset * layer
+scoreboard players operation @a[tag=mini_running] layer = @s temp
+
+# 进度判断
+tag @a[scores={layer=1}] add layer_bottom
+advancement grant @a[tag=layer_bottom,scores={layer=4}] only ltw:parkour/tnt3

+ 8 - 3
data/mini/loot_tables/diamond.json

@@ -1,8 +1,8 @@
-{"pools": [{"rolls": {"max": 3,"min": 2},"entries": [
+{"pools": [{"rolls": {"max": 4,"min": 2},"entries": [
 
     {
         "type": "minecraft:item",
-        "weight": 2,
+        "weight": 3,
         "name": "minecraft:nether_star",
         "functions": [
             {
@@ -24,8 +24,13 @@
     },
     {
         "type": "minecraft:item",
-        "weight": 5,
+        "weight": 6,
         "name": "minecraft:diamond"
+    },
+    {
+        "type": "minecraft:item",
+        "weight": 2,
+        "name": "minecraft:book"
     }
     
     ]}]}