Kaynağa Gözat

物品特效

龙腾猫跃 3 yıl önce
ebeveyn
işleme
c6df85ee06

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

@@ -11,4 +11,13 @@ execute if score $state mem matches 0 as @a run function ltw:state/0/state/check
 execute if score $state mem matches 0.. run kill @e[type=item,tag=LockTempItem]
 
 # 检查购买物品
-execute as @a run function item:shop/check
+execute as @a run function item:shop/check
+
+# 物品特效
+execute as @e[tag=item_green] at @s run particle minecraft:glow ~ ~0.3 ~ 0.5 0.5 0.5 0 1 normal
+execute as @e[tag=item_blue] at @s run particle minecraft:dragon_breath ~ ~0.3 ~ 0.7 0.7 0.7 0.01 1 normal
+execute as @e[tag=item_blue] at @s run particle minecraft:dragon_breath ~ ~0.3 ~ 1.3 1.3 1.3 0.01 1 normal
+execute as @e[tag=item_purple] at @s run particle minecraft:wax_on ~ ~0.3 ~ 0 0 0 6 1 normal
+execute as @e[tag=item_purple] at @s run particle minecraft:wax_on ~ ~0.3 ~ 0.7 0.7 0.7 1 1 normal
+execute as @e[tag=item_purple] at @s run particle minecraft:wax_on ~ ~0.3 ~ 1.5 1.5 1.5 1 2 normal
+execute as @e[tag=item_purple] at @s run particle minecraft:wax_on ~ ~0.3 ~ 2.5 2.5 2.5 1 1 normal

+ 4 - 1
data/item/functions/tick20.mcfunction

@@ -1,3 +1,6 @@
 
 # 检测容器
-function item:container/check/call
+function item:container/check/call
+
+# 物品特效
+execute as @e[tag=item_white] at @s run particle minecraft:electric_spark ~ ~0.3 ~ 0.2 0.2 0.2 0 1 normal

+ 13 - 7
data/ltw/functions/state/6/generate_background.mcfunction

@@ -1,9 +1,15 @@
 # 生成单个奖励位置的背景
 
-execute if entity @e[type=item,tag=item_white,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ white_stained_glass
-execute if entity @e[type=item,tag=item_green,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ lime_stained_glass
-execute if entity @e[type=item,tag=item_blue,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ light_blue_stained_glass
-execute if entity @e[type=item,tag=item_purple,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ magenta_stained_glass
-execute if entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~-3 ~ sea_lantern
-execute unless entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ black_stained_glass
-execute unless entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~-3 ~ black_concrete
+execute if entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~ ~ light
+execute if entity @e[type=item,tag=item_white,dx=0,dy=0,dz=0] run setblock ~ ~-1 ~ black_concrete_powder
+execute if entity @e[type=item,tag=item_green,dx=0,dy=0,dz=0] run setblock ~ ~-1 ~ blue_concrete_powder
+execute if entity @e[type=item,tag=item_blue,dx=0,dy=0,dz=0] run setblock ~ ~-1 ~ magenta_concrete_powder
+execute if entity @e[type=item,tag=item_purple,dx=0,dy=0,dz=0] run setblock ~ ~-1 ~ orange_concrete_powder
+execute if entity @e[type=item,tag=item_white,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ gray_stained_glass
+execute if entity @e[type=item,tag=item_green,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ light_blue_stained_glass
+execute if entity @e[type=item,tag=item_blue,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ magenta_stained_glass
+execute if entity @e[type=item,tag=item_purple,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ orange_stained_glass
+
+execute unless entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~ ~ air
+execute unless entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~-1 ~ air
+execute unless entity @e[type=item,dx=0,dy=0,dz=0] run setblock ~ ~-2 ~ black_stained_glass