Просмотр исходного кода

这是为什么呢,为什么会保留物品呢

HerobrineXia 5 лет назад
Родитель
Сommit
956fe488c5

+ 4 - 3
data/item/functions/disable_throw.mcfunction

@@ -5,6 +5,7 @@ data modify entity @s Owner set from entity @s Thrower
 
 # 将物品传送给与丢弃者 UUID 相同的玩家
 execute store result score @s UUID run data get entity @s Thrower[0]
-tag @s add item_force_tp
-execute as @a if score @s UUID = @e[type=item,tag=item_force_tp,limit=1] UUID run tp @e[type=item,tag=item_force_tp] @s
-tag @s remove item_force_tp
+execute as @a if score @s UUID = @e[type=item,tag=item_force_tp,limit=1] UUID run tag @s add force_tp
+execute if entity @a[tag=force_tp,gamemode=spectator] run kill @s
+tp @s @a[tag=force_tp,limit=1]
+tag @a remove force_tp

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

@@ -6,7 +6,7 @@ execute if score $survival mem matches 1.. unless score $state mem matches 5 as
 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.. unless score $survival mem matches 1.. as @a[team=!debugging] run function item:disable_slot/check_slot
+execute if score $state mem matches 1.. unless score $state mem matches 6 unless score $survival mem matches 1.. as @a[team=!debugging] run function item:disable_slot/check_slot
 execute if score $state mem matches 0 as @a run function ltw:state/0/state/check_slot
 execute if score $state mem matches 0.. run kill @e[type=item,tag=LockTempItem]
 

+ 0 - 15
data/item/tags/items/game_item.json

@@ -1,15 +0,0 @@
-{
-    "values": [
-        "minecraft:trident",
-        "minecraft:acacia_planks",
-        "minecraft:birch_planks",
-        "minecraft:bedrock",
-        "minecraft:crimson_planks",
-        "minecraft:warped_planks",
-        "minecraft:gold_block",
-        "minecraft:bricks",
-        "minecraft:mossy_cobblestone",
-        "minecraft:purpur_block",
-        "minecraft:prismarine"
-    ]
-}

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

@@ -27,4 +27,5 @@ spectate
 
 # 清理物品
 clear @s #mini:game_item{game_item:1b}
+clear @s barrier{LockItem:1b}
 recipe take @s *

+ 11 - 1
data/mini/tags/items/game_item.json

@@ -1,6 +1,16 @@
 {
     "values": [
         "minecraft:trident",
-        "minecraft:stick"
+        "minecraft:stick",
+        "minecraft:acacia_planks",
+        "minecraft:birch_planks",
+        "minecraft:bedrock",
+        "minecraft:crimson_planks",
+        "minecraft:warped_planks",
+        "minecraft:gold_block",
+        "minecraft:bricks",
+        "minecraft:mossy_cobblestone",
+        "minecraft:purpur_block",
+        "minecraft:prismarine"
     ]
 }