2
0
Эх сурвалжийг харах

直接在原位生成物品

LTCatt 6 жил өмнө
parent
commit
11e7c18cc8

+ 11 - 10
data/ltw/functions/state/7/state_enter.mcfunction

@@ -18,17 +18,18 @@ setblock 0 11 2000 minecraft:redstone_block
 # 生成奖励物品
 execute store result score $t_player_count mem if entity @a[tag=!watcher]
 scoreboard players set $t_player_count mem 8
-execute if score $t_player_count mem matches 1.. positioned 9.0 13.0 2014.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 2.. positioned 5.0 13.0 2014.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 3.. positioned 0.0 13.0 2009.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 4.. positioned 0.0 13.0 2005.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 5.. positioned 5.0 13.0 2000.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 6.. positioned 9.0 13.0 2000.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 7.. positioned 14.0 13.0 2005.0 run function item:bonus_item/rank/random
-execute if score $t_player_count mem matches 8.. positioned 14.0 13.0 2009.0 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 1.. positioned 9.0 12.5 2012.5 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 2.. positioned 5.0 12.5 2012.5 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 3.. positioned 1.5 12.5 2009.0 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 4.. positioned 1.5 12.5 2005.0 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 5.. positioned 5.0 12.5 2001.5 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 6.. positioned 9.0 12.5 2001.5 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 7.. positioned 12.5 12.5 2005.0 run function item:bonus_item/rank/random
+execute if score $t_player_count mem matches 8.. positioned 12.5 12.5 2009.0 run function item:bonus_item/rank/random
 
-# 清空区域
-execute as @e[type=item] at @s run fill ~-0.5 ~-0.5 ~-0.5 ~0.5 ~0.5 ~0.5 air
+# 生成拾取窗口
+execute as @e[type=item] at @s run fill ~-0.2 ~ ~-0.2 ~0.2 ~ ~0.2 air
+execute as @e[type=item] at @s run fill ~-0.2 ~1 ~-0.2 ~0.2 ~1 ~0.2 barrier
 
 # 防止幽灵实体分 tick 执行
 schedule function ltw:state/7/state_enter2 1t

+ 6 - 4
data/ltw/functions/state/7/state_enter2.mcfunction

@@ -1,4 +1,10 @@
 
+# 传送回背景生成点
+execute as @e[type=item,x=-1,y=12,z=1999,dx=3,dy=2,dz=50] at @s run tp @s ~-1.5 ~0.5 ~
+execute as @e[type=item,x=13,y=12,z=1999,dx=3,dy=2,dz=50] at @s run tp @s ~1.5 ~0.5 ~
+execute as @e[type=item,x=-1,y=12,z=1999,dx=50,dy=2,dz=3] at @s run tp @s ~ ~0.5 ~-1.5
+execute as @e[type=item,x=-1,y=12,z=2013,dx=50,dy=2,dz=3] at @s run tp @s ~ ~0.5 ~1.5
+
 # 生成奖励物品背景
 execute as @e[type=item,tag=item_white] at @s run fill ~-0.5 ~-0.5 ~-0.5 ~0.5 ~0.5 ~0.5 white_concrete_powder
 execute as @e[type=item,tag=item_green] at @s run fill ~-0.5 ~-0.5 ~-0.5 ~0.5 ~0.5 ~0.5 lime_concrete_powder
@@ -10,7 +16,3 @@ execute as @e[type=item,x=-1,y=12,z=1999,dx=2,dy=2,dz=50] at @s run tp @s ~1.5 ~
 execute as @e[type=item,x=13,y=12,z=1999,dx=2,dy=2,dz=50] at @s run tp @s ~-1.5 ~-0.5 ~
 execute as @e[type=item,x=-1,y=12,z=1999,dx=50,dy=2,dz=2] at @s run tp @s ~ ~-0.5 ~1.5
 execute as @e[type=item,x=-1,y=12,z=2013,dx=50,dy=2,dz=2] at @s run tp @s ~ ~-0.5 ~-1.5
-
-# 生成拿取窗口
-execute as @e[type=item] at @s run fill ~-0.1 ~ ~-0.1 ~0.1 ~ ~0.1 air
-execute as @e[type=item] at @s run fill ~-0.1 ~1 ~-0.1 ~0.1 ~1 ~0.1 barrier