LTCatt 6 éve
szülő
commit
bce5fe5a7b

+ 1 - 1
data/item/functions/tick2.mcfunction

@@ -6,7 +6,7 @@ execute if score $state mem matches 1.. as @e[type=item] if data entity @s Throw
 execute as @a if data entity @s Inventory[{"tag":{"bonus_new":1b}}] run function item:bonus_item/call
 
 # 检测玩家第九格锁定
-execute if score $state mem matches 1.. as @a unless data entity @s Inventory[{Slot:8b,tag:{GameItem:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b},Count:1b}] run function item:disable_slot
+execute if score $state mem matches 1.. as @a unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b},Count:1b}] run function item:disable_slot
 execute if score $state mem matches 1.. as @a unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b},Count:1b}] if data entity @s Inventory[{tag:{LockItem:1b},Count:1b}] run clear @s red_dye{LockItem:1b}
 
 # 清除临时物品

+ 2 - 0
data/ltw/functions/shop/refresh_gold.mcfunction

@@ -12,3 +12,5 @@ scoreboard players operation @s temp /= #count_9 mem
 scoreboard players operation @s temp = @s gold
 scoreboard players operation @s temp %= #count_9 mem
 # 给予金粒
+
+# TODO : 给予指定数量的物品

+ 2 - 0
data/mini/functions/main/player_enter.mcfunction

@@ -7,6 +7,8 @@ scoreboard players set @s[tag=rejoining] mini_score -1000
 scoreboard players set @s[tag=watcher] mini_score -1000000
 function mini:main/update_player_count
 
+clear @s #mini:game_item{game_item:1b}
+
 execute if score $mini_type mem matches 1 run function mini:parkour/player_enter
 execute if score $mini_type mem matches 2 run function mini:tntrun/player_enter
 execute if score $mini_type mem matches 3 run function mini:hotpm/player_enter

+ 2 - 2
data/mini/functions/phantom/game/give_trident.mcfunction

@@ -1,2 +1,2 @@
-clear @s trident{GameItem:1b}
-replaceitem entity @s hotbar.8 trident{Damage:248,GameItem:1b,display:{Name:'{"text":"补给用三叉戟","italic":false}'}} 1
+clear @s trident{game_item:1b}
+replaceitem entity @s hotbar.8 trident{Damage:248,game_item:1b,display:{Name:'{"text":"补给用三叉戟","italic":false}'}} 1

+ 1 - 1
data/mini/functions/phantom/game/use_trident.mcfunction

@@ -3,4 +3,4 @@ scoreboard players set @s countdown_fast 28
 scoreboard players reset @s use_trident
 
 # 清除三叉戟以防bug
-clear @s trident{GameItem:1b}
+clear @s trident{game_item:1b}

+ 3 - 3
data/mini/functions/phantom/tick2.mcfunction

@@ -2,14 +2,14 @@
 execute as @a[tag=mini_running] if score @s use_trident matches 1.. run function mini:phantom/game/use_trident
 
 # 给予三叉戟
-execute as @a[tag=mini_running] unless data entity @s Inventory[{id:"minecraft:trident",tag:{GameItem:1b}}] unless score @s countdown_fast matches 1.. run function mini:phantom/game/give_trident
+execute as @a[tag=mini_running] unless data entity @s Inventory[{id:"minecraft:trident",tag:{game_item:1b}}] unless score @s countdown_fast matches 1.. run function mini:phantom/game/give_trident
 
 # 清理错位的三叉戟
-execute as @a[tag=mini_running] unless score @s countdown_fast matches 1.. unless data entity @s Inventory[{id:"minecraft:trident",Slot:8b,tag:{GameItem:1b}}] if data entity @s Inventory[{id:"minecraft:trident",tag:{GameItem:1b}}] run function mini:phantom/game/give_trident
+execute as @a[tag=mini_running] unless score @s countdown_fast matches 1.. unless data entity @s Inventory[{id:"minecraft:trident",Slot:8b,tag:{game_item:1b}}] if data entity @s Inventory[{id:"minecraft:trident",tag:{game_item:1b}}] run function mini:phantom/game/give_trident
 
 # 更改丢出的三叉戟的nbt
 execute as @e[type=trident,tag=!fixed_trident] run function mini:phantom/game/fix_trident
 
 # 删除掉在地上的三叉戟
 kill @e[type=trident,nbt={inGround:1b}]
-kill @e[type=item,nbt={Item:{id:"minecraft:trident",tag:{GameItem:1b}}}]
+kill @e[type=item,nbt={Item:{id:"minecraft:trident",tag:{game_item:1b}}}]

+ 1 - 1
data/mini/functions/slime/player_enter.mcfunction

@@ -21,4 +21,4 @@ gamemode adventure @s[tag=!watcher,tag=!rejoining,tag=!debug]
 execute if entity @s[tag=rejoining] run function mini:slime/player_failed
 
 # 给予物品
-replaceitem entity @s hotbar.8 stick{GameItem:1b,Enchantments:[{id:"knockback",lvl:1}],Unbreakable:1b,display:{Name:'{"text":"击退棒","italic":false}'}} 1
+replaceitem entity @s hotbar.8 stick{game_item:1b,Enchantments:[{id:"knockback",lvl:1}],Unbreakable:1b,display:{Name:'{"text":"击退棒","italic":false}'}} 1

+ 6 - 0
data/mini/tags/items/game_item.json

@@ -0,0 +1,6 @@
+{
+    "values": [
+        "minecraft:trident",
+        "minecraft:stick"
+    ]
+}