Kaynağa Gözat

添加注释

aqupa 4 yıl önce
ebeveyn
işleme
016892e4dd

+ 1 - 0
data/mini/functions/rgb/game/conditions/blue_ge.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# rgb_B 大于等于 value
 
 execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_B
 

+ 7 - 0
data/mini/functions/rgb/game/conditions/blue_l.mcfunction

@@ -0,0 +1,7 @@
+# as rule marker
+# rgb_B 小于 value
+
+execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_B
+
+execute store result score #temp rgb_sys run data get entity @s data.conditions[{type:"blue_l"}].value
+execute unless score #temp_scr rgb_sys < #temp rgb_sys run data modify entity @s data.enable set value 0

+ 1 - 0
data/mini/functions/rgb/game/conditions/destroy_rule.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# 销毁 value 条规则
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.destroy_rule
 scoreboard players operation #temp_scr rgb_sys += @a[tag=rgb_op,limit=1] rgb_destroy_rule

+ 1 - 0
data/mini/functions/rgb/game/conditions/green_ge.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# rgb_G 大于等于 value
 
 execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_G
 

+ 7 - 0
data/mini/functions/rgb/game/conditions/green_l.mcfunction

@@ -0,0 +1,7 @@
+# as rule marker
+# rgb_G 小于 value
+
+execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_G
+
+execute store result score #temp rgb_sys run data get entity @s data.conditions[{type:"green_l"}].value
+execute unless score #temp_scr rgb_sys < #temp rgb_sys run data modify entity @s data.enable set value 0

+ 2 - 1
data/mini/functions/rgb/game/conditions/in_water.mcfunction

@@ -1,5 +1,6 @@
 # as rule marker
-# 自动归零
+# 在水中 value/4 秒
+# 离开水自动归零
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.in_water
 scoreboard players set #temp rgb_sys 0

+ 1 - 0
data/mini/functions/rgb/game/conditions/obtain_rule.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# 获得 value 条规则
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.obtain_rule
 scoreboard players operation #temp_scr rgb_sys += @a[tag=rgb_op,limit=1] rgb_obtain_rule

+ 2 - 1
data/mini/functions/rgb/game/conditions/on_air.mcfunction

@@ -1,5 +1,6 @@
 # as rule marker
-# 自动归零
+# 离开地面 value/4 秒
+# 落地自动归零
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.on_air
 scoreboard players set #temp rgb_sys 0

+ 2 - 1
data/mini/functions/rgb/game/conditions/on_pumpkin.mcfunction

@@ -1,5 +1,6 @@
 # as rule marker
-# 自动归零
+# 站在南瓜上 value/4 秒
+# 离开南瓜自动归零
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.on_pumpkin
 scoreboard players set #temp rgb_sys 0

+ 1 - 0
data/mini/functions/rgb/game/conditions/place_rule.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# 放置 value 条规则
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.place_rule
 scoreboard players operation #temp_scr rgb_sys += @a[tag=rgb_op,limit=1] rgb_place_rule

+ 1 - 0
data/mini/functions/rgb/game/conditions/red_ge.mcfunction

@@ -1,4 +1,5 @@
 # as rule marker
+# rgb_R 大于等于 value
 
 execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_R
 

+ 7 - 0
data/mini/functions/rgb/game/conditions/red_l.mcfunction

@@ -0,0 +1,7 @@
+# as rule marker
+# rgb_R 小于 value
+
+execute store result score #temp_scr rgb_sys run scoreboard players get @a[tag=rgb_op,limit=1] rgb_R
+
+execute store result score #temp rgb_sys run data get entity @s data.conditions[{type:"red_l"}].value
+execute unless score #temp_scr rgb_sys < #temp rgb_sys run data modify entity @s data.enable set value 0

+ 2 - 1
data/mini/functions/rgb/game/conditions/shift.mcfunction

@@ -1,5 +1,6 @@
 # as rule marker
-# 自动归零
+# 下蹲 value/4 秒
+# 站起自动归零
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.shift
 scoreboard players set #temp rgb_sys 0

+ 2 - 1
data/mini/functions/rgb/game/conditions/smokey.mcfunction

@@ -1,5 +1,6 @@
 # as rule marker
-# 自动归零
+# 站在烟雾中 value/4 秒
+# 离开烟雾自动归零
 
 execute store result score #temp_scr rgb_sys run data get entity @s data.player.conditions.smokey
 scoreboard players set #temp rgb_sys 0

+ 20 - 0
data/mini/loot_tables/rgb/danger.json

@@ -0,0 +1,20 @@
+{
+    "pools": [
+        {
+            "rolls": 1,
+            "entries": [
+                {
+                    "type": "minecraft:item",
+                    "name": "minecraft:armor_stand",
+                    "weight": 1,
+                    "functions": [
+                        {
+                            "function": "minecraft:set_nbt",
+                            "tag": "{conditions:[{name:'{\"text\":\"R<10\",\"color\":\"red\"}',type:'red_l',value:10s}],events:[{name:'{\"text\":\"清除脚下方块\",\"color\":\"yellow\"}',type:'place_air'}]}"
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}

+ 1 - 1
data/mini/loot_tables/rgb/effect.json

@@ -10,7 +10,7 @@
                     "functions": [
                         {
                             "function": "minecraft:set_nbt",
-                            "tag": "{conditions:[{name:'{\"text\":\"R<10\",\"color\":\"red\"}',type:'red_l',value:10s}],events:[{name:'{\"text\":\"清除脚下方块\",\"color\":\"yellow\"}',type:'place_air'}]}"
+                            "tag": "{conditions:[{name:'{\"text\":\"R≥10\",\"color\":\"red\"}',type:'red_ge',value:10s}],events:[{name:'{\"text\":\"脚下方块消失\",\"color\":\"yellow\"}',type:'eff_float',value:3s}]}"
                         }
                     ]
                 }