Ver código fonte

Merge branches 'master' and 'master' of github.com:LTCatt/LTW3

HerobrineXia 6 anos atrás
pai
commit
9c1c0805d3

+ 0 - 0
data/item/test_check.mcfunction → data/item/functions/test_check.mcfunction


+ 0 - 0
data/item/test_summon.mcfunction → data/item/functions/test_summon.mcfunction


+ 1 - 0
data/test/functions/check_item.mcfunction

@@ -0,0 +1 @@
+execute as @a if data entity @s Inventory[{"tag":{"ltw_item_new":1b}}] run function test:check_item_

+ 7 - 0
data/test/functions/check_item_.mcfunction

@@ -0,0 +1,7 @@
+setblock 8 12 2009 jukebox
+data modify block 8 12 2009 RecordItem set from entity @s Inventory[{"tag":{"ltw_item_new":1b}}]
+tellraw @a [{"selector": "@s"},{"text":"获得了道具:"},{"nbt": "RecordItem.tag.ltw_item_name","block": "8 12 2009","interpret": true}]
+data modify block 8 12 2009 RecordItem.tag.ltw_item_new set value 0b
+clear @s #test:items{"ltw_item_new":1b}
+fill 8 12 2009 8 12 2009 air destroy
+execute positioned 8 12 2009 run tp @e[type=item,sort=nearest,limit=1] ~ ~ ~

+ 1 - 0
data/test/functions/get_test_item.mcfunction

@@ -0,0 +1 @@
+summon item ~ ~ ~ {Item:{id:"fishing_rod",Count:1,tag:{"ltw_item":1b,"ltw_item_new":1b,"ltw_item_name":'{"text":"[破损的钓鱼竿]","color":"green"}'}},CustomName:'{"text":"破损的钓鱼竿","color":"green"}',Tags:["team_green"],Age:-32768,PickupDelay:32767,NoGravity:1,Invulnerable:1,CustomNameVisible:1,Glowing:1}

+ 5 - 0
data/test/tags/items/items.json

@@ -0,0 +1,5 @@
+{
+    "values": [
+        "minecraft:fishing_rod"
+    ]
+}