浏览代码

更多的物品!

LTCatt 6 年之前
父节点
当前提交
14b031d55c

+ 2 - 1
data/item/functions/bonus_item/add_score.mcfunction

@@ -1,3 +1,4 @@
 #as player
 execute store result score #bonus_add_score mem run data get block 0 0 0 RecordItem.tag.bonus_add_score
-scoreboard players operation @s total_score += #bonus_add_score mem
+scoreboard players operation @s total_score += #bonus_add_score mem
+scoreboard players operation @s total_score_disp += #bonus_add_score mem

+ 2 - 2
data/item/functions/bonus_item/rank/random.mcfunction

@@ -9,7 +9,7 @@ scoreboard players operation $t_quality mem *= $c_10 mem
 scoreboard players operation $t_quality mem += $random mem
 
 # 根据品质生成不同的物品
-execute if score $t_quality mem matches ..34 run function item:bonus_item/rank/white
-execute if score $t_quality mem matches 35..64 run function item:bonus_item/rank/green
+execute if score $t_quality mem matches ..30 run function item:bonus_item/rank/white
+execute if score $t_quality mem matches 30..64 run function item:bonus_item/rank/green
 execute if score $t_quality mem matches 65..84 run function item:bonus_item/rank/blue
 execute if score $t_quality mem matches 85.. run function item:bonus_item/rank/purple

+ 15 - 0
data/item/loot_tables/gameparty/ranks/blue.json

@@ -21,6 +21,21 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"击退铁剑\\\",\\\"color\\\":\\\"aqua\\\"}\",\"Enchantments\":[{\"id\":\"knockback\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:snowball",
+    "functions": [
+        {
+            "function": "minecraft:set_count",
+            "count": 64
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"雪球 x64\\\",\\\"color\\\":\\\"aqua\\\"}\",\"Enchantments\":[{\"id\":\"knockback\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
 }
 
 ]}]}

+ 45 - 1
data/item/loot_tables/gameparty/ranks/green.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 24,
+    "weight": 32,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -54,6 +54,50 @@
             "tag": "{\"item_name\":\"{\\\"text\\\":\\\"弓, 箭 x3\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"bonus_give_items\":[{\"id\":\"minecraft:arrow\",\"Count\":3,\"tag\":{\"is_bonus\":1b,\"bonus_clear_nbt\":1b}}]}"
         }
     ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:netherite_helmet",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金头盔\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:netherite_chestplate",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金胸甲\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:netherite_leggings",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金护腿\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 1,
+    "name": "minecraft:netherite_boots",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"下界合金靴子\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
 }
 
 ]}]}

+ 45 - 0
data/item/loot_tables/gameparty/ranks/white.json

@@ -15,6 +15,51 @@
         }
     ]
 },
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:fishing_rod",
+    "functions": [
+        {
+            "function": "minecraft:set_damage",
+            "damage":{"min": 0.05, "max": 0.11}
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"破损的钓鱼竿\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:shield",
+    "functions": [
+        {
+            "function": "minecraft:set_damage",
+            "damage":{"min": 0.05, "max": 0.13}
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"破损的盾牌\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:wooden_sword",
+    "functions": [
+        {
+            "function": "minecraft:set_damage",
+            "damage":{"min": 0.04, "max": 0.1}
+        },
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"破损的击退木剑\\\",\\\"color\\\":\\\"white\\\"}\",\"Enchantments\":[{\"id\":\"knockback\",\"lvl\":1}],\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 4,

+ 3 - 0
data/item/tags/items/bonus.json

@@ -3,6 +3,8 @@
         "minecraft:iron_sword",
         "minecraft:ender_pearl",
         "minecraft:stone_sword",
+        "minecraft:snowball",
+        "minecraft:wooden_sword",
         "minecraft:netherite_sword",
         "minecraft:arrow",
         "minecraft:nether_star",
@@ -11,6 +13,7 @@
         "minecraft:iron_chestplate",
         "minecraft:iron_leggings",
         "minecraft:iron_boots",
+        "minecraft:fishing_rod",
         "minecraft:shield",
         "minecraft:bow"
     ]

+ 1 - 1
data/ltw/functions/state/6/state_enter.mcfunction

@@ -8,4 +8,4 @@ scoreboard objectives setdisplay sidebar total_score
 scoreboard objectives setdisplay list total_score_disp
 
 # 初始化倒计时
-scoreboard players set $countdown mem 5
+scoreboard players set $countdown mem 15

+ 1 - 1
data/ltw/functions/state/6/tick20.mcfunction

@@ -4,4 +4,4 @@ title @a subtitle {"score":{"name":"$countdown","objective":"mem"}}
 title @a title [""]
 
 # 退出状态
-execute if score $countdown mem matches 0 run function ltw:state/7/state_enter
+execute if score $countdown mem matches ..11 run function ltw:state/7/state_enter

+ 8 - 8
data/mini/functions/main/show_result.mcfunction

@@ -5,11 +5,11 @@ execute if entity @a[tag=mini_rank2] unless entity @a[tag=mini_rank3] run tellra
 execute unless entity @a[tag=mini_rank2] run tellraw @s [{"text":"\n>> 小游戏结束 >>\n\n","color":"gold","bold":true},{"text": "第一名 - ","color":"green","bold": false},{"selector": "@a[tag=mini_rank1]","color":"white","bold": false},"\n"]
 
 # 记分
-scoreboard players add @s[tag=mini_rank1,tag=!watcher] total_score 3
-scoreboard players add @s[tag=mini_rank1,tag=!watcher] total_score_disp 3
-scoreboard players add @s[tag=mini_rank2,tag=!watcher] total_score 2
-scoreboard players add @s[tag=mini_rank2,tag=!watcher] total_score_disp 2
-scoreboard players add @s[tag=mini_rank3,tag=!watcher] total_score 1
-scoreboard players add @s[tag=mini_rank3,tag=!watcher] total_score_disp 1
-scoreboard players add @s[tag=mini_rank4,tag=!watcher] total_score 0
-scoreboard players add @s[tag=mini_rank4,tag=!watcher] total_score_disp 0
+# scoreboard players add @s[tag=mini_rank1,tag=!watcher] total_score 3
+# scoreboard players add @s[tag=mini_rank1,tag=!watcher] total_score_disp 3
+# scoreboard players add @s[tag=mini_rank2,tag=!watcher] total_score 2
+# scoreboard players add @s[tag=mini_rank2,tag=!watcher] total_score_disp 2
+# scoreboard players add @s[tag=mini_rank3,tag=!watcher] total_score 1
+# scoreboard players add @s[tag=mini_rank3,tag=!watcher] total_score_disp 1
+# scoreboard players add @s[tag=mini_rank4,tag=!watcher] total_score 0
+# scoreboard players add @s[tag=mini_rank4,tag=!watcher] total_score_disp 0