Browse Source

新增药水与物品

LTCatt 6 years ago
parent
commit
8a297f0333

+ 12 - 1
data/item/loot_tables/gameparty/ranks/blue.json

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 2,
+    "weight": 4,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -25,6 +25,17 @@
             "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:golden_apple",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"附魔生命果\\\",\\\"italic\\\":0,\\\"color\\\":\\\"light_purple\\\"}\"}}"
+        }
+    ]
 }
 
 ]}]}

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

@@ -2,7 +2,7 @@
 
 {
     "type": "minecraft:item",
-    "weight": 20,
+    "weight": 24,
     "name": "minecraft:nether_star",
     "functions": [
         {
@@ -15,6 +15,17 @@
         }
     ]
 },
+{
+    "type": "minecraft:item",
+    "weight": 4,
+    "name": "minecraft:splash_potion",
+    "functions": [
+        {
+            "function": "minecraft:set_nbt",
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"喷溅型浮空药水 (0:10)\\\",\\\"color\\\":\\\"green\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":25,\"Amplifier\":0,\"Duration\":200}],\"CustomPotionColor\":11458519,\"display\":{\"Name\":\"{\\\"text\\\":\\\"喷溅型浮空药水\\\",\\\"italic\\\":0}\"}}"
+        }
+    ]
+},
 {
     "type": "minecraft:item",
     "weight": 4,

+ 2 - 2
data/item/loot_tables/gameparty/ranks/white.json

@@ -18,7 +18,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"跳跃提升 II \n(0:20)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":8,\"Amplifier\":1,\"Duration\":400}]}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"跳跃药水 II (0:20)\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"CustomPotionEffects\":[{\"Id\":8,\"Amplifier\":1,\"Duration\":400}],\"CustomPotionColor\":2292811,\"display\":{\"Name\":\"{\\\"text\\\":\\\"跳跃药水\\\",\\\"italic\\\":0}\"}}"
         }
     ]
 },
@@ -29,7 +29,7 @@
     "functions": [
         {
             "function": "minecraft:set_nbt",
-            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"金苹果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b}"
+            "tag": "{\"item_name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"color\\\":\\\"white\\\"}\",\"is_bonus\":1b,\"bonus_new\":1b,\"bonus_return\":1b,\"display\":{\"Name\":\"{\\\"text\\\":\\\"生命果\\\",\\\"italic\\\":0}\"}}"
         }
     ]
 },

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

@@ -1,5 +1,6 @@
 {
     "values": [
+        "minecraft:splash_potion",
         "minecraft:potion",
         "minecraft:iron_axe",
         "minecraft:ender_pearl",

+ 1 - 1
data/ltw/functions/state/0/player_enter.mcfunction

@@ -7,7 +7,7 @@ title @s actionbar ""
 clear @s
 
 # 重置玩家血量上限
-execute as @a run attribute @s generic.max_health base set 20
+attribute @s generic.max_health base set 20
 
 # 状态效果
 effect clear @s

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

@@ -4,7 +4,7 @@ title @s clear
 title @s actionbar ""
 
 # 重置玩家血量上限
-execute as @a run attribute @s generic.max_health base set 20
+attribute @s generic.max_health base set 20
 
 # 状态效果
 effect clear @s

+ 1 - 2
data/test/functions/generate_bonus.mcfunction

@@ -2,7 +2,6 @@
 
 tag @a remove watcher
 scoreboard players set $game_type mem 1
-scoreboard players set $round mem 4
+scoreboard players set $round mem 5
 function ltw:state/6/state_enter
-scoreboard players set $state mem 0
 gamemode creative @a